aboutsummaryrefslogtreecommitdiffstats
path: root/disk-utils/cfdisk.c
diff options
context:
space:
mode:
authorBenno Schulenberg <bensberg@telfort.nl>2025-05-28 11:37:01 +0200
committerKarel Zak <kzak@redhat.com>2025-05-29 12:04:28 +0200
commit42b60bce24536266869e512e43ad5be460dad399 (patch)
tree1610d40cf6139920cf87d50732cb46a09a890f69 /disk-utils/cfdisk.c
parent27dd83b942c949fa123bd8cc00c8fd054666dc2c (diff)
downloadutil-linux-42b60bce24536266869e512e43ad5be460dad399.tar.gz
lib/colors: call gettext() only when the argument of --color is invalid
Instead of calling gettext() before starting to interpret the argument of option -L/--color, call it only when it's needed: when the argument is not recognized. Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
Diffstat (limited to 'disk-utils/cfdisk.c')
-rw-r--r--disk-utils/cfdisk.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c
index fdd74fbf94..e4e16001ea 100644
--- a/disk-utils/cfdisk.c
+++ b/disk-utils/cfdisk.c
@@ -2781,8 +2781,7 @@ int main(int argc, char *argv[])
case 'L':
colormode = UL_COLORMODE_AUTO;
if (optarg)
- colormode = colormode_or_err(optarg,
- _("unsupported color mode"));
+ colormode = colormode_or_err(optarg);
break;
case 'r':
read_only = 1;