]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
blkid: correct an erroneous error message stable/v2.41
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:50 +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>
(cherry picked from commit 6bbf884525cad2702b1e69a0ac022db3ef92154d)

misc-utils/blkid.c

index 63e61b5fae1f02d6da7360f2481247b949ad4bf2..562fbce32591c2be8a0db6cbfc0f40935d1b6829 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++);