]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sfdisk: make unhiding as complete as possible
authorSami Kerola <kerolasa@iki.fi>
Sun, 7 Jul 2013 19:54:16 +0000 (20:54 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 9 Jul 2013 12:24:47 +0000 (14:24 +0200)
It is unlikely anyone will ever need this, but I like idea commands being
complete.  The partition id's that can be unhide after this change are;

Hidden HPFS/NTFS
Hidden W95 FAT32
Hidden W95 FAT32 (LBA)
Hidden W95 FAT16 (LBA)

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
fdisks/sfdisk.c

index 6efef47373e6e9ee86b318a0b4965fc87dcd3426..6b757a778ca6c8bed45f35336032dab00d3d54fd 100644 (file)
@@ -2992,7 +2992,8 @@ set_unhidden(struct disk_desc *z, char *pnam) {
 
     pno = asc_to_index(pnam, z);
     id = z->partitions[pno].p.sys_type;
-    if (id == 0x11 || id == 0x14 || id == 0x16 || id == 0x17)
+    if (id == 0x11 || id == 0x14 || id == 0x16 || id == 0x17 ||
+       id == 0x17 || id == 0x1b || id == 0x1c || id == 0x1e)
        id -= 0x10;
     else
        errx(EXIT_FAILURE, _("partition %s has id %x and is not hidden"), pnam, id);