diff options
| author | Benno Schulenberg <bensberg@telfort.nl> | 2025-05-28 11:37:01 +0200 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2025-05-29 12:04:28 +0200 |
| commit | 42b60bce24536266869e512e43ad5be460dad399 (patch) | |
| tree | 1610d40cf6139920cf87d50732cb46a09a890f69 /disk-utils/sfdisk.c | |
| parent | 27dd83b942c949fa123bd8cc00c8fd054666dc2c (diff) | |
| download | util-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/sfdisk.c')
| -rw-r--r-- | disk-utils/sfdisk.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c index 41b5558ead..7f2f3deea2 100644 --- a/disk-utils/sfdisk.c +++ b/disk-utils/sfdisk.c @@ -2437,8 +2437,7 @@ int main(int argc, char *argv[]) case OPT_COLOR: colormode = UL_COLORMODE_AUTO; if (optarg) - colormode = colormode_or_err(optarg, - _("unsupported color mode")); + colormode = colormode_or_err(optarg); break; case OPT_MOVEDATA: sf->movedata = 1; |
