#include "system.h"
#include <rpmlib.h>
#include <rpmmacro.h>
#include "debug.h"
Go to the source code of this file.
Data Structures | |
struct | fsinfo |
Functions | |
void | freeFilesystems (void) |
Release storage used by file system usage cache. | |
static int | getFilesystemList (void) |
Get information for mounted file systems. | |
int | rpmGetFilesystemList (const char ***listptr, int *num) |
Return (cached) file system mount points. | |
int | rpmGetFilesystemUsage (const char **fileList, int_32 *fssizes, int numFiles, uint_32 **usagesPtr, int flags) |
Determine per-file system usage for a list of files. | |
Variables | |
static struct fsinfo * | filesystems = NULL |
static const char ** | fsnames = NULL |
static int | numFilesystems = 0 |
Definition in file fs.c.
void freeFilesystems | ( | void | ) |
Release storage used by file system usage cache.
Definition at line 28 of file fs.c.
References _free(), filesystems, fsnames, fsinfo::mntPoint, and numFilesystems.
Referenced by getFilesystemList(), and main().
static int getFilesystemList | ( | void | ) | [static] |
Get information for mounted file systems.
Definition at line 145 of file fs.c.
References _, _free(), filesystems, freeFilesystems(), fsnames, getmntent(), MOUNTED, numFilesystems, our_mntent::our_mntdir, RPMERR_MTAB, RPMERR_STAT, rpmError, RPMMESS_DEBUG, rpmMessage, strerror, xcalloc(), xrealloc(), and xstrdup().
Referenced by rpmGetFilesystemList(), and rpmGetFilesystemUsage().
int rpmGetFilesystemList | ( | const char *** | listptr, | |
int * | num | |||
) |
Return (cached) file system mount points.
listptr | addess of file system names (or NULL) | |
num | address of number of file systems (or NULL) |
Definition at line 268 of file fs.c.
References fsnames, getFilesystemList(), and numFilesystems.
Referenced by fsnamesTag(), fssizesTag(), and rpmtsInitDSI().
int rpmGetFilesystemUsage | ( | const char ** | fileList, | |
int_32 * | fssizes, | |||
int | numFiles, | |||
uint_32 ** | usagesPtr, | |||
int | flags | |||
) |
Determine per-file system usage for a list of files.
fileList | array of absolute file names | |
fssizes | array of file sizes | |
numFiles | number of files in list |
usagesPtr | address of per-file system usage array (or NULL) |
flags | (unused) |
Definition at line 282 of file fs.c.
References _, _free(), alloca(), dirName, filesystems, fsnames, getFilesystemList(), numFilesystems, RPMERR_BADDEV, RPMERR_STAT, rpmError, rpmGetPath(), strerror, and xcalloc().
Referenced by fssizesTag().
struct fsinfo* filesystems = NULL [static] |
Definition at line 21 of file fs.c.
Referenced by freeFilesystems(), getFilesystemList(), and rpmGetFilesystemUsage().
const char** fsnames = NULL [static] |
Definition at line 24 of file fs.c.
Referenced by freeFilesystems(), getFilesystemList(), rpmGetFilesystemList(), and rpmGetFilesystemUsage().
int numFilesystems = 0 [static] |
Definition at line 26 of file fs.c.
Referenced by freeFilesystems(), getFilesystemList(), rpmGetFilesystemList(), and rpmGetFilesystemUsage().