]> sourceware.org Git - lvm2.git/commitdiff
improve message for invalid device arg in process_each_pv
authorDavid Teigland <teigland@redhat.com>
Thu, 1 Oct 2020 17:34:36 +0000 (12:34 -0500)
committerDavid Teigland <teigland@redhat.com>
Thu, 1 Oct 2020 17:34:36 +0000 (12:34 -0500)
Multiple commands process pvs by name using process_each_pv()
and will now have an improved error message for a device
that's excluded by filters.

tools/toollib.c

index f6879745b0a34b17c96169d8e2afcd097bed7169..f2372e095bc82856cc5436dedd7f78130a153bad 100644 (file)
@@ -3839,7 +3839,7 @@ static int _get_arg_devices(struct cmd_context *cmd,
                }
 
                if (!(dil->dev = dev_cache_get(cmd, sl->str, cmd->filter))) {
-                       log_error("Failed to find device for physical volume \"%s\".", sl->str);
+                       log_error("Cannot use %s: %s", sl->str, devname_error_reason(sl->str));
                        ret_max = ECMD_FAILED;
                } else {
                        strncpy(dil->pvid, dil->dev->pvid, ID_LEN);
This page took 2.189599 seconds and 5 git commands to generate.