[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH parted 1/2] ui: Do not truncate flag names when printing
From: |
Hans de Goede |
Subject: |
[PATCH parted 1/2] ui: Do not truncate flag names when printing |
Date: |
Fri, 18 Dec 2009 10:33:17 +0100 |
The partition_print_flags() function was truncating the flag names,
but these are translated strings, and thus can contain multibyte
characters. Truncating multibyte chars in a non multibyte aware way
is not good and was causing issues when printing tables in Russian:
http://bugzilla.redhat.com/show_bug.cgi?id=543029
Since the truncating does not seem to make sense at all this patch
simply removes it (it was likely an attempt to stay within 80 chars
when printing, but as one partition can have multiple flags set this
won't work)
* parted/parted.c (partition_print_flags): Don't truncate flag names.
---
parted/parted.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/parted/parted.c b/parted/parted.c
index 6919701..5074bdf 100644
--- a/parted/parted.c
+++ b/parted/parted.c
@@ -1254,7 +1254,7 @@ partition_print_flags (PedPartition* part)
_res = res;
ped_realloc (&_res, strlen (res) + 1 + strlen (name));
res = _res;
- strncat (res, name, 21);
+ strcat(res, name);
}
}
--
1.6.5.2
- [PATCH parted 1/2] ui: Do not truncate flag names when printing,
Hans de Goede <=