fdisk_gpt: simplify GPT partition name printing
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 27 Nov 2016 19:47:01 +0000 (20:47 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 27 Nov 2016 19:47:01 +0000 (20:47 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util-linux/fdisk_gpt.c

index 9b17b4a57440073c5caa02cf5656a57f3d8ab98e..45d2aa6e72b6312cd4c41e0ac43f09567780ceac 100644 (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
 }