]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
mount.nfs: teach [u]mount.nfs[4] to exit with EX_SUCCESS instead of 0
authorChuck Lever <chuck.lever@oracle.com>
Mon, 24 Sep 2007 15:28:38 +0000 (11:28 -0400)
committerNeil Brown <neilb@suse.de>
Tue, 25 Sep 2007 01:50:15 +0000 (11:50 +1000)
Use the newly defined EX_SUCCESS exit code in all the right places.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Neil Brown <neilb@suse.de>
utils/mount/mount.c
utils/mount/nfs4mount.c
utils/mount/nfsmount.c
utils/mount/nfsumount.c
utils/mount/stropts.c

index 251394380e76b49763119e2c307ef43cf1fd8b1c..751fbb9c74b0c1a5c5b6007da4ef1f6d78dddaea 100644 (file)
@@ -237,7 +237,7 @@ static int add_mtab(char *spec, char *mount_point, char *fstype,
 
        if (flags & MS_REMOUNT) {
                update_mtab(ment.mnt_dir, &ment);
-               return 0;
+               return EX_SUCCESS;
        }
 
        lock_mtab();
@@ -261,7 +261,7 @@ static int add_mtab(char *spec, char *mount_point, char *fstype,
                goto fail_close;
        }
 
-       result = 0;
+       result = EX_SUCCESS;
 
 fail_close:
        endmntent(mtab);
@@ -421,7 +421,7 @@ int main(int argc, char *argv[])
                        printf("%s ("PACKAGE_STRING")\n", progname);
                else
                        mount_usage();
-               exit(0);
+               exit(EX_SUCCESS);
        }
 
        if ((argc < 3)) {
@@ -444,7 +444,7 @@ int main(int argc, char *argv[])
                        break;
                case 'V':
                        printf("%s: ("PACKAGE_STRING")\n", progname);
-                       exit(0);
+                       exit(EX_SUCCESS);
                case 'w':
                        flags &= ~MS_RDONLY;
                        break;
index c4e8bfb0a3ba7d1a04339604d8e6db55fbeb13a7..4790c7998b11ff548fd4ef9d4dcbad639d7c664c 100644 (file)
@@ -448,7 +448,7 @@ int nfs4mount(const char *spec, const char *node, int flags,
                }
        }
 
-       return 0;
+       return EX_SUCCESS;
 
 fail:
        return retval;
index 583948208e0b43e741ec152dfadac84d04519cb8..6c34a2b3aaf91ebd49a3a23c9e3f5e2e0d1b74d6 100644 (file)
@@ -863,7 +863,7 @@ noauth_flavors:
                }
        }
 
-       return 0;
+       return EX_SUCCESS;
 
        /* abort */
  fail:
index a78ab266f6664fbf42b6a91998121e6d1713ede7..ca9c801bab6f48abd0e7a3d5a9a2a0de058d0a4b 100644 (file)
@@ -209,7 +209,7 @@ static int do_nfs_umount(const char *spec, char *opts)
                return EX_USAGE;
        }
 
-       return 0;
+       return EX_SUCCESS;
 }
 
 static struct option umount_longopts[] =
@@ -305,7 +305,7 @@ int nfsumount(int argc, char *argv[])
                        /* umount might call us twice.  The second time there will
                         * be no entry in mtab and we should just exit quietly
                         */
-                       return 0;
+                       return EX_SUCCESS;
 
                only_root:
                        nfs_error(_("%s: You are not permitted to unmount %s"),
index 236a3b455f078aad944b72ac666fabb6bd4066ad..a04596d1f59dba32ef5154960cbbf62d1b2b59e2 100644 (file)
@@ -283,7 +283,7 @@ int nfsmount_s(const char *spec, const char *node, int flags,
                }
        }
 
-       return 0;
+       return EX_SUCCESS;
 }
 
 /*
@@ -339,5 +339,5 @@ int nfs4mount_s(const char *spec, const char *node, int flags,
                }
        }
 
-       return 0;
+       return EX_SUCCESS;
 }