From: Benno Schulenberg Date: Tue, 16 Sep 2025 13:44:41 +0000 (+0200) Subject: blkid: correct an erroneous error message X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fheads%2Fstable%2Fv2.41;p=thirdparty%2Futil-linux.git blkid: correct an erroneous error message Running `blkid -p -n no /dev/sda2` would report: blkid: error: -u 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 (cherry picked from commit 6bbf884525cad2702b1e69a0ac022db3ef92154d) --- diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c index 63e61b5fa..562fbce32 100644 --- a/misc-utils/blkid.c +++ b/misc-utils/blkid.c @@ -651,7 +651,7 @@ static char **list_to_types(const char *list, int *flag) p += 2; } if (!p || !*p) { - warnx(_("error: -u argument is empty")); + warnx(_("invalid argument: %s"), list); goto err; } for (i = 1; p && (p = strchr(p, ',')); i++, p++);