git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06e993b
)
cat: Give a better error if the user specified no drives on command line.
author
Richard W.M. Jones
<rjones@redhat.com>
Fri, 19 Nov 2010 13:05:49 +0000
(13:05 +0000)
committer
Richard W.M. Jones
<rjones@redhat.com>
Fri, 19 Nov 2010 13:06:22 +0000
(13:06 +0000)
cat/virt-cat.c
patch
|
blob
|
history
diff --git
a/cat/virt-cat.c
b/cat/virt-cat.c
index
58ebd8e
..
3510a94
100644
(file)
--- a/
cat/virt-cat.c
+++ b/
cat/virt-cat.c
@@
-220,6
+220,10
@@
main (int argc, char *argv[])
if (optind >= argc || argc - optind < 1)
usage (EXIT_FAILURE);
+ /* User must have specified some drives. */
+ if (drvs == NULL)
+ usage (EXIT_FAILURE);
+
/* Add drives, inspect and mount. Note that inspector is always true,
* and there is no -m option.
*/