From: Marco van Wieringen Date: Wed, 22 Sep 2010 18:01:16 +0000 (+0200) Subject: AIX also supports setmntent/getmntent so use that instead of much more complicated... X-Git-Tag: Release-5.2.1~1086 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6b6104ee5192239b0b23deedf1c73875699061e1;p=bacula%2Fbacula AIX also supports setmntent/getmntent so use that instead of much more complicated other interface which is left for AIX systems that might not support the setmntent/getmntent interface. --- diff --git a/bacula/src/lib/mntent_cache.c b/bacula/src/lib/mntent_cache.c index 147135b24e..c130fa2d95 100644 --- a/bacula/src/lib/mntent_cache.c +++ b/bacula/src/lib/mntent_cache.c @@ -68,7 +68,7 @@ #include #if defined(HAVE_GETMNTENT) -#if defined(HAVE_LINUX_OS) || defined(HAVE_HPUX_OS) +#if defined(HAVE_LINUX_OS) || defined(HAVE_HPUX_OS) || defined(HAVE_AIX_OS) #include #elif defined(HAVE_SUN_OS) #include @@ -159,7 +159,7 @@ static void refresh_mount_cache(void) #if defined(HAVE_GETMNTENT) FILE *fp; struct stat st; -#if defined(HAVE_LINUX_OS) || defined(HAVE_HPUX_OS) || defined(HAVE_IRIX_OS) +#if defined(HAVE_LINUX_OS) || defined(HAVE_HPUX_OS) || defined(HAVE_IRIX_OS) || defined(HAVE_AIX_OS) struct mntent *mnt; #if defined(HAVE_LINUX_OS) @@ -176,6 +176,10 @@ static void refresh_mount_cache(void) if ((fp = setmntent(MOUNTED, "r")) == (FILE *)NULL) { return; } +#elif defined(HAVE_AIX_OS) + if ((fp = setmntent(MNTTAB, "r")) == (FILE *)NULL) { + return; + } #endif while ((mnt = getmntent(fp)) != (struct mntent *)NULL) {