]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
blkid: correct an erroneous error message
authorBenno Schulenberg <bensberg@telfort.nl>
Tue, 16 Sep 2025 13:44:41 +0000 (15:44 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 17 Sep 2025 08:18:10 +0000 (10:18 +0200)
Running `blkid -p -n no /dev/sda2` would report:

  blkid: error: -u <list> argument is empty

(Mentioning -u instead of -n, and falsely claiming emptiness.)

Now the above command will report:

  blkid: invalid argument: no

(I don't think option -n needs to be mentioned, as it will be obvious
when inspecting the command line.  Not mentioning the option allows
reusing an existing error message, avoiding needless ballooning and
allowing the patch to be applied to the stable branch.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
misc-utils/blkid.c

index 3960b0d9779ad43a85a5bacdbec24e43539e2f1a..a8580e538c3613cca46dd59b8d88626a64c27ba6 100644 (file)
@@ -651,7 +651,7 @@ static char **list_to_types(const char *list, int *flag)
                p += 2;
        }
        if (!p || !*p) {
-               warnx(_("error: -u <list> argument is empty"));
+               warnx(_("invalid argument: %s"), list);
                goto err;
        }
        for (i = 1; p && (p = strchr(p, ',')); i++, p++);