X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmount%2Ffstab.c;h=051fa38c872503e37dfaca9e5c89c4ec4f2f7738;hp=e19e58b0d95fa9d246e6a0034adf5480644bf6c2;hb=706bfd7c94d48659a1411fdef2a3a61d4719f1aa;hpb=58080798db321d025143df39c97f707ea994ba26 diff --git a/utils/mount/fstab.c b/utils/mount/fstab.c index e19e58b..051fa38 100644 --- a/utils/mount/fstab.c +++ b/utils/mount/fstab.c @@ -1,4 +1,4 @@ -/* 1999-02-22 Arkadiusz Mi¶kiewicz +/* 1999-02-22 Arkadiusz Miskiewicz * - added Native Language Support * Sun Mar 21 1999 - Arnaldo Carvalho de Melo * - fixed strerr(errno) in gettext calls @@ -285,7 +285,7 @@ handler (int sig) { } static void -setlkw_timeout (int sig) { +setlkw_timeout (__attribute__((unused)) int sig) { /* nothing, fcntl will fail anyway */ } @@ -546,8 +546,12 @@ update_mtab (const char *dir, struct mntent *instead) * from the present mtab before renaming. */ struct stat sbuf; - if (stat (MOUNTED, &sbuf) == 0) - chown (MOUNTED_TEMP, sbuf.st_uid, sbuf.st_gid); + if (stat (MOUNTED, &sbuf) == 0) { + if (chown (MOUNTED_TEMP, sbuf.st_uid, sbuf.st_gid) < 0) { + nfs_error(_("%s: error changing owner of %s: %s"), + progname, MOUNTED_TEMP, strerror (errno)); + } + } } /* rename mtemp to mtab */