fdisk_gpt: simplify GPT partition name printing

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2016-11-27 20:47:01 +01:00
parent 29516ac0e4
commit 710b6ce9b0

View File

@ -94,11 +94,11 @@ gpt_print_wide36(uint16_t *s)
while (i < ARRAY_SIZE(buf)-1) {
if (s[i] == 0)
break;
buf[i] = (s[i] < 0x7f) ? s[i] : '?';
buf[i] = (0x20 <= s[i] && s[i] < 0x7f) ? s[i] : '?';
i++;
}
buf[i] = '\0';
fputs(printable_string(NULL, buf), stdout);
fputs(buf, stdout);
#endif
}