From: Steve Dickson <SteveD@redhat.com>
To: nfs@lists.sourceforge.net
Subject: [PATCH 05/11] nfs-utils: mount:Fixed exit status
Date: Mon, 26 Feb 2007 06:18:10 -0500 [thread overview]
Message-ID: <45E2C1F2.2000603@RedHat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: patch-05.dif --]
[-- Type: text/x-patch, Size: 1230 bytes --]
commit 200d810e3fa2c7f35932faac87a6409fac5a9d4d
Author: Steve Dickson <steved@redhat.com>
Date: Sat Feb 24 15:21:52 2007 -0500
Return the correct exit status on failed mounts
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/utils/mount/mount.c b/utils/mount/mount.c
index 13bffbc..8440055 100644
--- a/utils/mount/mount.c
+++ b/utils/mount/mount.c
@@ -472,21 +472,24 @@ int main(int argc, char *argv[])
}
}
- if (!mnt_err && !fake) {
- if(!(flags & MS_REMOUNT)) {
- mnt_err = do_mount_syscall(spec, mount_point,
- nfs_mount_vers == 4 ? "nfs4" : "nfs", flags, mount_opts);
-
- if(mnt_err) {
- mount_error(mount_point);
- exit(-1);
- }
- }
- if(!nomtab) {
- add_mtab(spec, mount_point, nfs_mount_vers == 4 ? "nfs4" : "nfs",
- flags, extra_opts, 0, 0);
+ if (fake)
+ return 0;
+ if (mnt_err)
+ exit(EX_FAIL);
+
+ if(!(flags & MS_REMOUNT)) {
+ mnt_err = do_mount_syscall(spec, mount_point,
+ nfs_mount_vers == 4 ? "nfs4" : "nfs", flags, mount_opts);
+
+ if(mnt_err) {
+ mount_error(mount_point);
+ exit(EX_FAIL);
}
}
+ if(!nomtab) {
+ add_mtab(spec, mount_point, nfs_mount_vers == 4 ? "nfs4" : "nfs",
+ flags, extra_opts, 0, 0);
+ }
return 0;
}
[-- Attachment #3: Type: text/plain, Size: 345 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #4: Type: text/plain, Size: 140 bytes --]
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
reply other threads:[~2007-02-26 11:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45E2C1F2.2000603@RedHat.com \
--to=steved@redhat.com \
--cc=nfs@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox