fs.h File Reference

Access mounted file system information. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Functions

void | rpmFreeFilesystems (void)
| Release storage used by file system usage cache. More...
int | rpmGetFilesystemList (const char ***listptr, rpmuint32_t *num)
| Return (cached) file system mount points. More...
int | rpmGetFilesystemUsage (const char **fileList, rpmuint32_t *fssizes, int numFiles, rpmuint64_t **usagesPtr, int flags)
| Determine per-file system usage for a list of files. More...

## Detailed Description

Access mounted file system information.

Definition in file fs.h.

## Function Documentation

void rpmFreeFilesystems | ( | void |  | ) |

Release storage used by file system usage cache.

Definition at line 33 of file fs.c.

References _free(), fsnames, fsinfo::mntPoint, and numFilesystems.

Referenced by getFilesystemList(), and rpmcliFini().

int rpmGetFilesystemList | ( | const char *** | listptr,
|  | rpmuint32_t * | num
| ) |  |

Return (cached) file system mount points.

Return values

  listptr | addess of file system names (or NULL)
  num | address of number of file systems (or NULL)

Returns
  0 on success, 1 on error

Definition at line 289 of file fs.c.

References fsnames, getFilesystemList(), and numFilesystems.

Referenced by fsnamesTag(), fssizesTag(), and rpmtsInitDSI().

int rpmGetFilesystemUsage | ( | const char ** | fileList,
|  | rpmuint32_t * | fssizes,
|  | int | numFiles,
|  | rpmuint64_t ** | usagesPtr,
|  | int | flags
| ) |  |

Determine per-file system usage for a list of files.

Parameters

  fileList | array of absolute file names
  fssizes | array of file sizes
  numFiles | number of files in list

Return values

  usagesPtr | address of per-file system usage array (or NULL)

Parameters

  flags | (unused)

Returns
  0 on success, 1 on error

Definition at line 301 of file fs.c.

References _, _free(), alloca(), dirName, errno, fsnames, getFilesystemList(), numFilesystems, rpmGetPath(), rpmlog(), RPMLOG_ERR, Stat(), and xcalloc().

Referenced by fssizesTag().