summaryrefslogtreecommitdiff
path: root/lib/fs.c
diff options
context:
space:
mode:
authorewt <devnull@localhost>1998-03-04 16:52:59 +0000
committerewt <devnull@localhost>1998-03-04 16:52:59 +0000
commit4786aaf0660172b5778e4cc6197f0be6cb7b8118 (patch)
tree14cea63529116f5a52394b2e60340531c270ec0b /lib/fs.c
parent619bdbe02e1b693afffe29226114c4cccc9e1d6b (diff)
downloadlibrpm-tizen-4786aaf0660172b5778e4cc6197f0be6cb7b8118.tar.gz
librpm-tizen-4786aaf0660172b5778e4cc6197f0be6cb7b8118.tar.bz2
librpm-tizen-4786aaf0660172b5778e4cc6197f0be6cb7b8118.zip
1) header file cleanups
2) use new dependency scheme 3) changed " #if" to "# if" CVS patchset: 2024 CVS date: 1998/03/04 16:52:59
Diffstat (limited to 'lib/fs.c')
-rw-r--r--lib/fs.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/fs.c b/lib/fs.c
index 4243ae7f1..9a94aa18e 100644
--- a/lib/fs.c
+++ b/lib/fs.c
@@ -113,43 +113,43 @@ static int getFilesystemList(void) {
struct stat sb;
int i;
char * mntdir;
- #if GETMNTENT_ONE || GETMNTENT_TWO
+# if GETMNTENT_ONE || GETMNTENT_TWO
our_mntent item, * itemptr;
FILE * mtab;
- #elif HAVE_GETMNTINFO_R
+# elif HAVE_GETMNTINFO_R
struct statfs * mounts = NULL;
int mntCount = 0, bufSize = 0, flags = MNT_NOWAIT;
int nextMount = 0;
- #endif
+# endif
- #if GETMNTENT_ONE || GETMNTENT_TWO
+# if GETMNTENT_ONE || GETMNTENT_TWO
mtab = fopen(MOUNTED, "r");
if (!mtab) {
rpmError(RPMERR_MTAB, _("failed to open %s: %s"), MOUNTED,
strerror(errno));
return 1;
}
- #elif HAVE_GETMNTINFO_R
+# elif HAVE_GETMNTINFO_R
getmntinfo_r(&mounts, flags, &mntCount, &bufSize);
- #endif
+# endif
filesystems = malloc(sizeof(*filesystems) * (numAlloced + 1));
while (1) {
- #if GETMNTENT_ONE
+# if GETMNTENT_ONE
/* this is Linux */
itemptr = getmntent(mtab);
if (!itemptr) break;
item = *itemptr;
mntdir = item.our_mntdir;
- #elif GETMNTENT_TWO
+# elif GETMNTENT_TWO
/* Solaris, maybe others */
if (getmntent(mtab, &item)) break;
mntdir = item.our_mntdir;
- #elif HAVE_GETMNTINFO_R
+# elif HAVE_GETMNTINFO_R
if (nextMount == mntCount) break;
mntdir = mounts[nextMount++].f_mntonname;
- #endif
+# endif
if (stat(mntdir, &sb)) {
rpmError(RPMERR_STAT, "failed to stat %s: %s", mntdir,
@@ -172,11 +172,11 @@ static int getFilesystemList(void) {
filesystems[num++].mntPoint = strdup(mntdir);
}
- #if GETMNTENT_ONE || GETMNTENT_TWO
+# if GETMNTENT_ONE || GETMNTENT_TWO
fclose(mtab);
- #elif HAVE_GETMNTINFO_R
+# elif HAVE_GETMNTINFO_R
free(mounts);
- #endif
+# endif
filesystems[num].mntPoint = NULL;