From 6bbf884525cad2702b1e69a0ac022db3ef92154d 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 --- 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 3960b0d97..a8580e538 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