From: Dan McGee <dan-fd97jBR+K/6hPH1hqNUYSQ@public.gmane.org>
To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 2/2] nilfs-tune: catch and handle missing device argument
Date: Fri, 23 Dec 2011 09:11:16 -0600 [thread overview]
Message-ID: <1324653076-13692-2-git-send-email-dan@archlinux.org> (raw)
In-Reply-To: <1324653076-13692-1-git-send-email-dan-fd97jBR+K/6hPH1hqNUYSQ@public.gmane.org>
Before:
$ nilfs-tune -l
nilfs-tune 2.1.0
cannot open device -l: No such file or directory
After:
$ ./sbin/nilfs-tune/nilfs-tune -l
nilfs-tune 2.1.0
Usage: nilfs-tune [-h] [-l] [-i interval] [-L volume_name]
[-m block_max] [-O [^]feature[,...]]
[-U UUID] device
Signed-off-by: Dan McGee <dan-fd97jBR+K/6hPH1hqNUYSQ@public.gmane.org>
---
sbin/nilfs-tune/nilfs-tune.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/sbin/nilfs-tune/nilfs-tune.c b/sbin/nilfs-tune/nilfs-tune.c
index cd5ef24..6655029 100644
--- a/sbin/nilfs-tune/nilfs-tune.c
+++ b/sbin/nilfs-tune/nilfs-tune.c
@@ -187,6 +187,12 @@ static void parse_options(int argc, char *argv[],
exit(EXIT_FAILURE);
}
}
+
+ if (optind == argc)
+ {
+ nilfs_tune_usage();
+ exit(EXIT_FAILURE);
+ }
}
#define MINUTE (60)
--
1.7.8.1
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2011-12-23 15:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-23 15:11 [PATCH 1/2] nilfs-tune: add static/const specifiers where applicable Dan McGee
[not found] ` <1324653076-13692-1-git-send-email-dan-fd97jBR+K/6hPH1hqNUYSQ@public.gmane.org>
2011-12-23 15:11 ` Dan McGee [this message]
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=1324653076-13692-2-git-send-email-dan@archlinux.org \
--to=dan-fd97jbr+k/6hph1hqnuysq@public.gmane.org \
--cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.