From 6b6104ee5192239b0b23deedf1c73875699061e1 Mon Sep 17 00:00:00 2001 From: Marco van Wieringen Date: Wed, 22 Sep 2010 20:01:16 +0200 Subject: [PATCH] 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. --- bacula/src/lib/mntent_cache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) { -- 2.39.5