From 201cf2d69ccf86878746dabdf06048cc50b0e308 Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Wed, 9 Nov 2011 13:35:13 -0500 Subject: [PATCH] For dos partitions of type 0, output 0x00, not 0x0 Signed-off-by: David Zeuthen --- src/udiskslinuxpartition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/udiskslinuxpartition.c b/src/udiskslinuxpartition.c index 4058c6a..e6f535e 100644 --- a/src/udiskslinuxpartition.c +++ b/src/udiskslinuxpartition.c @@ -151,7 +151,7 @@ udisks_linux_partition_update (UDisksLinuxPartition *partition, { char *endp; gint type_as_int = strtol (type, &endp, 0); - if (type_as_int > 0 && *endp == '\0') + if (type[0] != '\0' && *endp == '\0') { /* ensure 'dos' partition types are always of the form 0x0c (e.g. with two digits) */ snprintf (type_buf, sizeof type_buf, "0x%02x", type_as_int); -- 2.7.4