From fb942d08e2ea9c9078869e0ea8d30175859c1995 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Tue, 16 Sep 2025 15:44:41 +0200 Subject: [PATCH] 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) --- misc-utils/blkid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++); -- 2.47.3