X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=cat%2Fvirt-cat.c;h=3510a94861809eafbee9a830b4991d78c9dafdb3;hp=58ebd8ec6c61b3c42ebe7efbdc0ca440962373a4;hb=3bd883f344a5d6f155f7252e8a478d5b7935d7c6;hpb=06e993b7bac2fa1d506b24848c4ffddbdfdf49bc;ds=sidebyside diff --git a/cat/virt-cat.c b/cat/virt-cat.c index 58ebd8e..3510a94 100644 --- 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. */