---
name: "dpm_getpoolfs"
section: "3"
platform: "linux"
package: "libdpm-dev"
version: "1.10.0-2+b3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/dpm_getpoolfs"
---

# dpm\_getpoolfs(3)

get list of filesystems for a given pool

## NAME

dpm\_getpoolfs - get list of filesystems for a given pool

## SYNOPSIS

**#include \<sys/types.h\>**\
 **#include "dpm\_api.h"**

**int dpm\_getpoolfs (char \****poolname***,** **int \****nbfs***,** **struct dpm\_fs \*\****dpm\_fs***)**

## DESCRIPTION

**dpm\_getpoolfs** gets list of filesystems for a given pool.

The input argument is:

- *poolname*

  specifies the disk pool name previously defined using **dpm\_addpool**.

The output arguments are:

- *nbfs*

  will be set to the number of replies in the array of filesystems.

- *dpm\_fs*

  will be set to the address of an array of dpm\_fs structures allocated by the API. The client application is responsible for freeing the array when not needed anymore.

```
struct dpm_fs {
	char		poolname[CA_MAXPOOLNAMELEN+1];
	char		server[CA_MAXHOSTNAMELEN+1];
	char		fs[80];
	u_signed64	capacity;
	u_signed64	free;
	int		status;
	int		weight;
};
```

## RETURN VALUE

This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, **serrno** is set appropriately.

## ERRORS

- **EFAULT**

  *poolname*, *nbfs* or *dpm\_fs* is a NULL pointer.

- **ENOMEM**

  Memory could not be allocated for storing the reply.

- **EINVAL**

  The pool is unknown or the length of *poolname* exceeds **CA\_MAXPOOLNAMELEN**.

- **SENOSHOST**

  Host unknown.

- **SECOMERR**

  Communication error.
