From: rpeterso@sourceware.org <rpeterso@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/gfs2/mount mount.gfs2.c umount.gfs2.c
Date: 28 Jul 2006 13:58:12 -0000 [thread overview]
Message-ID: <20060728135812.25630.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: rpeterso at sourceware.org 2006-07-28 13:58:10
Modified files:
gfs2/mount : mount.gfs2.c umount.gfs2.c
Log message:
1. Allow SIGINT signals so that gdb can break into hung mounts.
2. Remove multiple trailing slashes for directory and mount point.
3. Accept the -f option on umount that's sent to us during shutdown.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/mount.gfs2.c.diff?cvsroot=cluster&r1=1.15&r2=1.16
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/mount/umount.gfs2.c.diff?cvsroot=cluster&r1=1.11&r2=1.12
--- cluster/gfs2/mount/mount.gfs2.c 2006/07/25 13:58:16 1.15
+++ cluster/gfs2/mount/mount.gfs2.c 2006/07/28 13:58:10 1.16
@@ -30,6 +30,7 @@
sigfillset(&sigs);
sigdelset(&sigs, SIGTRAP);
sigdelset(&sigs, SIGSEGV);
+ sigdelset(&sigs, SIGINT);
sigprocmask(how, &sigs, (sigset_t *) 0);
}
@@ -83,9 +84,11 @@
if (optind < argc && argv[optind]) {
strncpy(mo->dir, argv[optind], PATH_MAX);
- l = strlen(mo->dir);
- if (mo->dir[l-1] == '/')
- mo->dir[l-1] = 0;
+ l = strlen(mo->dir) - 1;
+ while (l > 0 && mo->dir[l] == '/') {
+ mo->dir[l] = '\0';
+ l--;
+ };
}
log_debug("mount %s %s", mo->dev, mo->dir);
--- cluster/gfs2/mount/umount.gfs2.c 2006/07/25 13:58:16 1.11
+++ cluster/gfs2/mount/umount.gfs2.c 2006/07/28 13:58:10 1.12
@@ -37,13 +37,16 @@
/* FIXME: check for "quiet" option and don't print in that case */
while (cont) {
- optchar = getopt(argc, argv, "hVvX:");
+ optchar = getopt(argc, argv, "fhVvX:");
switch (optchar) {
case EOF:
cont = 0;
break;
+ case 'f': /* autofs umount from /sbin/halt uses this */
+ break;
+
case 'v':
++verbose;
break;
@@ -68,9 +71,11 @@
if (optind < argc && argv[optind]) {
strncpy(mo->dir, argv[optind], PATH_MAX);
- l = strlen(mo->dir);
- if (mo->dir[l-1] == '/')
- mo->dir[l-1] = 0;
+ l = strlen(mo->dir) - 1;
+ while (l > 0 && mo->dir[l] == '/') {
+ mo->dir[l] = '\0';
+ l--;
+ };
}
log_debug("umount %s", mo->dir);
next reply other threads:[~2006-07-28 13:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-28 13:58 rpeterso [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-06-13 18:13 [Cluster-devel] cluster/gfs2/mount mount.gfs2.c umount.gfs2.c teigland
2007-06-13 18:12 teigland
2006-07-25 13:58 teigland
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=20060728135812.25630.qmail@sourceware.org \
--to=rpeterso@sourceware.org \
/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;
as well as URLs for NNTP newsgroup(s).