]> sourceware.org Git - lvm2.git/commitdiff
vgscan --mknodes
authorAlasdair Kergon <agk@redhat.com>
Fri, 14 Nov 2003 14:03:48 +0000 (14:03 +0000)
committerAlasdair Kergon <agk@redhat.com>
Fri, 14 Nov 2003 14:03:48 +0000 (14:03 +0000)
tools/args.h
tools/commands.h
tools/vgscan.c

index e64d97546ca59be94e7fa6e015acfa1cb069cb54..35a4fb1fc23642c2a50e96613cfcb36e0e3b4294 100644 (file)
@@ -26,6 +26,7 @@ arg(units_ARG, '\0', "units", string_arg)
 arg(nosuffix_ARG, '\0', "nosuffix", NULL)
 arg(removemissing_ARG, '\0', "removemissing", NULL)
 arg(abort_ARG, '\0', "abort", NULL)
+arg(mknodes_ARG, '\0', "mknodes", NULL)
 
 /* Allow some variations */
 arg(resizable_ARG, '\0', "resizable", yes_no_arg)
index 3c03b80a403825d805e16f703522aba9721223b3..5be9ca3fdc176b37efeadae986e34ffd6277c6f0 100644 (file)
@@ -752,11 +752,12 @@ xx(vgscan,
    "\t[-d|--debug]\n"
    "\t[-h|--help]\n"
    "\t[--ignorelockingfailure]\n"
+   "\t[--mknodes]\n"
    "\t[-P|--partial] " "\n"
    "\t[-v|--verbose]\n" 
    "\t[--version]" "\n",
 
-   ignorelockingfailure_ARG, partial_ARG)
+   ignorelockingfailure_ARG, mknodes_ARG, partial_ARG)
 
 xx(vgsplit,
    "Move physical volumes into a new volume group",
index eb239c12af8af309f1b010871c17b11f59a16f84..d9856c4cfa1e1aed0c07df77bd278fe26d4c9cb5 100644 (file)
@@ -45,6 +45,8 @@ static int vgscan_single(struct cmd_context *cmd, const char *vg_name,
 
 int vgscan(struct cmd_context *cmd, int argc, char **argv)
 {
+       int maxret, ret;
+
        if (argc) {
                log_error("Too many parameters on command line");
                return EINVALID_CMD_LINE;
@@ -58,6 +60,14 @@ int vgscan(struct cmd_context *cmd, int argc, char **argv)
 
        log_print("Reading all physical volumes.  This may take a while...");
 
-       return process_each_vg(cmd, argc, argv, LCK_VG_READ, 1, NULL,
-                              &vgscan_single);
+       maxret = process_each_vg(cmd, argc, argv, LCK_VG_READ, 1, NULL,
+                                &vgscan_single);
+
+       if (arg_count(cmd, mknodes_ARG)) {
+               ret = vgmknodes(cmd, argc, argv);
+               if (ret > maxret)
+                       maxret = ret;
+       }
+
+       return maxret;
 }
This page took 0.042487 seconds and 5 git commands to generate.