ref: ce76af64fe93cfe5103cf9b5f44693d8aebef24c
parent: c770b09f43cde887feb3d82d936cddd12288a6e6
author: cinap_lenrek <[email protected]>
date: Sun May 31 07:19:22 EDT 2015
disk/edisk: little improvements - make UU() shorter by using long long constant to encode node field - store Flag as a mask, not as a shift count - put the attributes before the name in cmdsum() as it is fixed length
--- a/sys/src/cmd/disk/prep/edisk.c
+++ b/sys/src/cmd/disk/prep/edisk.c
@@ -63,7 +63,7 @@
};
struct Flag {
- int s;
+ uvlong f;
char c;
char *desc;
};
@@ -93,100 +93,100 @@
static Type *type9;
/* RFC4122, but in little endian format */
-#define UU(a,b,c,d,e,f,g,h,i,j) { \
+#define UU(a,b,c,d,e) { \
(a)&255,((a)>>8)&255,((a)>>16)&255,((a)>>24)&255, \
(b)&255,((b)>>8)&255, \
(c)&255,((c)>>8)&255, \
((d)>>8)&255,(d)&255, \
- (e)&255,(f)&255,(g)&255,(h)&255,(i)&255,(j)&255}
+ ((e)>>40)&255, ((e)>>32)&255, ((e)>>24)&255, ((e)>>16)&255, ((e)>>8)&255, (e)&255}
static Type types[100] = {
-{UU(0x00000000,0x0000,0x0000,0x0000,0x00,0x00,0x00,0x00,0x00,0x00), "", "Unused entry"},
-{UU(0x024DEE41,0x33E7,0x11D3,0x9D69,0x00,0x08,0xC7,0x81,0xF3,0x9F), "mbr", "MBR partition"},
-{UU(0xC12A7328,0xF81F,0x11D2,0xBA4B,0x00,0xA0,0xC9,0x3E,0xC9,0x3B), "esp", "EFI System Partition"},
-{UU(0x21686148,0x6449,0x6E6F,0x744E,0x65,0x65,0x64,0x45,0x46,0x49), "bios", "BIOS boot partition"},
-{UU(0xD3BFE2DE,0x3DAF,0x11DF,0xBA40,0xE3,0xA5,0x56,0xD8,0x95,0x93), "iffs", "Intel Fast Flash"},
-{UU(0xF4019732,0x066E,0x4E12,0x8273,0x34,0x6C,0x56,0x41,0x49,0x4F), "sony", "Sony boot"},
-{UU(0xBFBFAFE7,0xA34F,0x448A,0x9A5B,0x62,0x13,0xEB,0x73,0x6C,0x22), "lenovo", "Lenovo boot"},
-{UU(0xE3C9E316,0x0B5C,0x4DB8,0x817D,0xF9,0x2D,0xF0,0x02,0x15,0xAE), "msr", "Microsoft Reserved Partition"},
-{UU(0xEBD0A0A2,0xB9E5,0x4433,0x87C0,0x68,0xB6,0xB7,0x26,0x99,0xC7), "dos", "Microsoft Basic data"},
-{UU(0x5808C8AA,0x7E8F,0x42E0,0x85D2,0xE1,0xE9,0x04,0x34,0xCF,0xB3), "ldmm", "Logical Disk Manager metadata"},
-{UU(0xAF9B60A0,0x1431,0x4F62,0xBC68,0x33,0x11,0x71,0x4A,0x69,0xAD), "ldmd", "Logical Disk Manager data"},
-{UU(0xDE94BBA4,0x06D1,0x4D40,0xA16A,0xBF,0xD5,0x01,0x79,0xD6,0xAC), "recovery", "Windows Recovery Environment"},
-{UU(0x37AFFC90,0xEF7D,0x4E96,0x91C3,0x2D,0x7A,0xE0,0x55,0xB1,0x74), "gpfs", "IBM General Parallel File System"},
-{UU(0xE75CAF8F,0xF680,0x4CEE,0xAFA3,0xB0,0x01,0xE5,0x6E,0xFC,0x2D), "storagespaces", "Storage Spaces"},
-{UU(0x75894C1E,0x3AEB,0x11D3,0xB7C1,0x7B,0x03,0xA0,0x00,0x00,0x00), "hpuxdata", "HP-UX Data"},
-{UU(0xE2A1E728,0x32E3,0x11D6,0xA682,0x7B,0x03,0xA0,0x00,0x00,0x00), "hpuxserv", "HP-UX Service"},
-{UU(0x0FC63DAF,0x8483,0x4772,0x8E79,0x3D,0x69,0xD8,0x47,0x7D,0xE4), "linuxdata", "Linux Data"},
-{UU(0xA19D880F,0x05FC,0x4D3B,0xA006,0x74,0x3F,0x0F,0x84,0x91,0x1E), "linuxraid", "Linux RAID"},
-{UU(0x0657FD6D,0xA4AB,0x43C4,0x84E5,0x09,0x33,0xC8,0x4B,0x4F,0x4F), "linuxswap", "Linux Swap"},
-{UU(0xE6D6D379,0xF507,0x44C2,0xA23C,0x23,0x8F,0x2A,0x3D,0xF9,0x28), "linuxlvm", "Linux Logical Volume Manager"},
-{UU(0x933AC7E1,0x2EB4,0x4F13,0xB844,0x0E,0x14,0xE2,0xAE,0xF9,0x15), "linuxhome", "Linux /home"},
-{UU(0x3B8F8425,0x20E0,0x4F3B,0x907F,0x1A,0x25,0xA7,0x6F,0x98,0xE8), "linuxsrv", "Linux /srv"},
-{UU(0x7FFEC5C9,0x2D00,0x49B7,0x8941,0x3E,0xA1,0x0A,0x55,0x86,0xB7), "linuxcrypt", "Linux Plain dm-crypt"},
-{UU(0xCA7D7CCB,0x63ED,0x4C53,0x861C,0x17,0x42,0x53,0x60,0x59,0xCC), "luks", "LUKS"},
-{UU(0x8DA63339,0x0007,0x60C0,0xC436,0x08,0x3A,0xC8,0x23,0x09,0x08), "linuxreserved", "Linux Reserved"},
-{UU(0x83BD6B9D,0x7F41,0x11DC,0xBE0B,0x00,0x15,0x60,0xB8,0x4F,0x0F), "fbsdboot", "FreeBSD Boot"},
-{UU(0x516E7CB4,0x6ECF,0x11D6,0x8FF8,0x00,0x02,0x2D,0x09,0x71,0x2B), "fbsddata", "FreeBSD Data"},
-{UU(0x516E7CB5,0x6ECF,0x11D6,0x8FF8,0x00,0x02,0x2D,0x09,0x71,0x2B), "fbsdswap", "FreeBSD Swap"},
-{UU(0x516E7CB6,0x6ECF,0x11D6,0x8FF8,0x00,0x02,0x2D,0x09,0x71,0x2B), "fbsdufs", "FreeBSD Unix File System"},
-{UU(0x516E7CB8,0x6ECF,0x11D6,0x8FF8,0x00,0x02,0x2D,0x09,0x71,0x2B), "fbsdvvm", "FreeBSD Vinum volume manager"},
-{UU(0x516E7CBA,0x6ECF,0x11D6,0x8FF8,0x00,0x02,0x2D,0x09,0x71,0x2B), "fbsdzfs", "FreeBSD ZFS"},
-{UU(0x48465300,0x0000,0x11AA,0xAA11,0x00,0x30,0x65,0x43,0xEC,0xAC), "applehfs", "Apple HFS+"},
-{UU(0x55465300,0x0000,0x11AA,0xAA11,0x00,0x30,0x65,0x43,0xEC,0xAC), "appleufs", "Apple UFS"},
-{UU(0x6A898CC3,0x1DD2,0x11B2,0x99A6,0x08,0x00,0x20,0x73,0x66,0x31), "applezfs", "Apple ZFS"},
-{UU(0x52414944,0x0000,0x11AA,0xAA11,0x00,0x30,0x65,0x43,0xEC,0xAC), "appleraid", "Apple RAID"},
-{UU(0x52414944,0x5F4F,0x11AA,0xAA11,0x00,0x30,0x65,0x43,0xEC,0xAC), "appleraidoff", "Apple RAID, offline"},
-{UU(0x426F6F74,0x0000,0x11AA,0xAA11,0x00,0x30,0x65,0x43,0xEC,0xAC), "appleboot", "Apple Boot"},
-{UU(0x4C616265,0x6C00,0x11AA,0xAA11,0x00,0x30,0x65,0x43,0xEC,0xAC), "applelabel", "Apple Label"},
-{UU(0x5265636F,0x7665,0x11AA,0xAA11,0x00,0x30,0x65,0x43,0xEC,0xAC), "appletv", "Apple TV Recovery"},
-{UU(0x53746F72,0x6167,0x11AA,0xAA11,0x00,0x30,0x65,0x43,0xEC,0xAC), "applecs", "Apple Core Storage"},
-{UU(0x6A82CB45,0x1DD2,0x11B2,0x99A6,0x08,0x00,0x20,0x73,0x66,0x31), "solarisboot", "Solaris Boot"},
-{UU(0x6A85CF4D,0x1DD2,0x11B2,0x99A6,0x08,0x00,0x20,0x73,0x66,0x31), "solarisroot", "Solaris Root"},
-{UU(0x6A87C46F,0x1DD2,0x11B2,0x99A6,0x08,0x00,0x20,0x73,0x66,0x31), "solarisswap", "Solaris Swap"},
-{UU(0x6A8B642B,0x1DD2,0x11B2,0x99A6,0x08,0x00,0x20,0x73,0x66,0x31), "solarisbakup", "Solaris Backup"},
-{UU(0x6A898CC3,0x1DD2,0x11B2,0x99A6,0x08,0x00,0x20,0x73,0x66,0x31), "solarisusr", "Solaris /usr"},
-{UU(0x6A8EF2E9,0x1DD2,0x11B2,0x99A6,0x08,0x00,0x20,0x73,0x66,0x31), "solarisvar", "Solaris /var"},
-{UU(0x6A90BA39,0x1DD2,0x11B2,0x99A6,0x08,0x00,0x20,0x73,0x66,0x31), "solarishome", "Solaris /home"},
-{UU(0x6A9283A5,0x1DD2,0x11B2,0x99A6,0x08,0x00,0x20,0x73,0x66,0x31), "solarisalt", "Solaris Alternate sector"},
-{UU(0x6A945A3B,0x1DD2,0x11B2,0x99A6,0x08,0x00,0x20,0x73,0x66,0x31), "solaris", "Solaris Reserved"},
-{UU(0x6A9630D1,0x1DD2,0x11B2,0x99A6,0x08,0x00,0x20,0x73,0x66,0x31), "solaris", "Solaris Reserved"},
-{UU(0x6A980767,0x1DD2,0x11B2,0x99A6,0x08,0x00,0x20,0x73,0x66,0x31), "solaris", "Solaris Reserved"},
-{UU(0x6A96237F,0x1DD2,0x11B2,0x99A6,0x08,0x00,0x20,0x73,0x66,0x31), "solaris", "Solaris Reserved"},
-{UU(0x6A8D2AC7,0x1DD2,0x11B2,0x99A6,0x08,0x00,0x20,0x73,0x66,0x31), "solaris", "Solaris Reserved"},
-{UU(0x49F48D32,0xB10E,0x11DC,0xB99B,0x00,0x19,0xD1,0x87,0x96,0x48), "nbsdswap", "NetBSD Swap"},
-{UU(0x49F48D5A,0xB10E,0x11DC,0xB99B,0x00,0x19,0xD1,0x87,0x96,0x48), "nbsdffs", "NetBSD FFS"},
-{UU(0x49F48D82,0xB10E,0x11DC,0xB99B,0x00,0x19,0xD1,0x87,0x96,0x48), "nbsdlfs", "NetBSD LFS"},
-{UU(0x49F48DAA,0xB10E,0x11DC,0xB99B,0x00,0x19,0xD1,0x87,0x96,0x48), "nbsdraid", "NetBSD RAID"},
-{UU(0x2DB519C4,0xB10F,0x11DC,0xB99B,0x00,0x19,0xD1,0x87,0x96,0x48), "nbsdcat", "NetBSD Concatenated"},
-{UU(0x2DB519EC,0xB10F,0x11DC,0xB99B,0x00,0x19,0xD1,0x87,0x96,0x48), "nbsdcrypt", "NetBSD Encrypted"},
-{UU(0xFE3A2A5D,0x4F32,0x41A7,0xB725,0xAC,0xCC,0x32,0x85,0xA3,0x09), "chromeoskern", "ChromeOS kernel"},
-{UU(0x3CB8E202,0x3B7E,0x47DD,0x8A3C,0x7F,0xF2,0xA1,0x3C,0xFC,0xEC), "chromeosroot", "ChromeOS rootfs"},
-{UU(0x2E0A753D,0x9E48,0x43B0,0x8337,0xB1,0x51,0x92,0xCB,0x1B,0x5E), "chromeos", "ChromeOS future use"},
-{UU(0x42465331,0x3BA3,0x10F1,0x802A,0x48,0x61,0x69,0x6B,0x75,0x21), "haikubfs", "Haiku BFS"},
-{UU(0x85D5E45E,0x237C,0x11E1,0xB4B3,0xE8,0x9A,0x8F,0x7F,0xC3,0xA7), "midbsdboot", "MidnightBSD Boot"},
-{UU(0x85D5E45A,0x237C,0x11E1,0xB4B3,0xE8,0x9A,0x8F,0x7F,0xC3,0xA7), "midbsddata", "MidnightBSD Data"},
-{UU(0x85D5E45B,0x237C,0x11E1,0xB4B3,0xE8,0x9A,0x8F,0x7F,0xC3,0xA7), "midbsdswap", "MidnightBSD Swap"},
-{UU(0x0394EF8B,0x237E,0x11E1,0xB4B3,0xE8,0x9A,0x8F,0x7F,0xC3,0xA7), "midbsdufs", "MidnightBSD Unix File System"},
-{UU(0x85D5E45C,0x237C,0x11E1,0xB4B3,0xE8,0x9A,0x8F,0x7F,0xC3,0xA7), "midbsdvvm", "MidnightBSD Vinum volume manager"},
-{UU(0x85D5E45D,0x237C,0x11E1,0xB4B3,0xE8,0x9A,0x8F,0x7F,0xC3,0xA7), "midbsdzfs", "MidnightBSD ZFS"},
-{UU(0x45B0969E,0x9B03,0x4F30,0xB4C6,0xB4,0xB8,0x0C,0xEF,0xF1,0x06), "cephjournal", "Ceph Journal"},
-{UU(0x45B0969E,0x9B03,0x4F30,0xB4C6,0x5E,0xC0,0x0C,0xEF,0xF1,0x06), "cephcrypt", "Ceph dm-crypt Encrypted Journal"},
-{UU(0x4FBD7E29,0x9D25,0x41B8,0xAFD0,0x06,0x2C,0x0C,0xEF,0xF0,0x5D), "cephosd", "Ceph OSD"},
-{UU(0x4FBD7E29,0x9D25,0x41B8,0xAFD0,0x5E,0xC0,0x0C,0xEF,0xF0,0x5D), "cephcryptosd", "Ceph dm-crypt OSD"},
-{UU(0x824CC7A0,0x36A8,0x11E3,0x890A,0x95,0x25,0x19,0xAD,0x3F,0x61), "openbsd", "OpenBSD Data"},
-{UU(0xCEF5A9AD,0x73BC,0x4601,0x89F3,0xCD,0xEE,0xEE,0xE3,0x21,0xA1), "qnx6", "QNX6 Power-safe file system"},
-{UU(0xC91818F9,0x8025,0x47AF,0x89D2,0xF0,0x30,0xD7,0x00,0x0C,0x2C), "plan9", "Plan 9"},
+{UU(0x00000000,0x0000,0x0000,0x0000,0x000000000000ULL), "", "Unused entry"},
+{UU(0x024DEE41,0x33E7,0x11D3,0x9D69,0x0008C781F39FULL), "mbr", "MBR partition"},
+{UU(0xC12A7328,0xF81F,0x11D2,0xBA4B,0x00A0C93EC93BULL), "esp", "EFI System Partition"},
+{UU(0x21686148,0x6449,0x6E6F,0x744E,0x656564454649ULL), "bios", "BIOS boot partition"},
+{UU(0xD3BFE2DE,0x3DAF,0x11DF,0xBA40,0xE3A556D89593ULL), "iffs", "Intel Fast Flash"},
+{UU(0xF4019732,0x066E,0x4E12,0x8273,0x346C5641494FULL), "sony", "Sony boot"},
+{UU(0xBFBFAFE7,0xA34F,0x448A,0x9A5B,0x6213EB736C22ULL), "lenovo", "Lenovo boot"},
+{UU(0xE3C9E316,0x0B5C,0x4DB8,0x817D,0xF92DF00215AEULL), "msr", "Microsoft Reserved Partition"},
+{UU(0xEBD0A0A2,0xB9E5,0x4433,0x87C0,0x68B6B72699C7ULL), "dos", "Microsoft Basic data"},
+{UU(0x5808C8AA,0x7E8F,0x42E0,0x85D2,0xE1E90434CFB3ULL), "ldmm", "Logical Disk Manager metadata"},
+{UU(0xAF9B60A0,0x1431,0x4F62,0xBC68,0x3311714A69ADULL), "ldmd", "Logical Disk Manager data"},
+{UU(0xDE94BBA4,0x06D1,0x4D40,0xA16A,0xBFD50179D6ACULL), "recovery", "Windows Recovery Environment"},
+{UU(0x37AFFC90,0xEF7D,0x4E96,0x91C3,0x2D7AE055B174ULL), "gpfs", "IBM General Parallel File System"},
+{UU(0xE75CAF8F,0xF680,0x4CEE,0xAFA3,0xB001E56EFC2DULL), "storagespaces", "Storage Spaces"},
+{UU(0x75894C1E,0x3AEB,0x11D3,0xB7C1,0x7B03A0000000ULL), "hpuxdata", "HP-UX Data"},
+{UU(0xE2A1E728,0x32E3,0x11D6,0xA682,0x7B03A0000000ULL), "hpuxserv", "HP-UX Service"},
+{UU(0x0FC63DAF,0x8483,0x4772,0x8E79,0x3D69D8477DE4ULL), "linuxdata", "Linux Data"},
+{UU(0xA19D880F,0x05FC,0x4D3B,0xA006,0x743F0F84911EULL), "linuxraid", "Linux RAID"},
+{UU(0x0657FD6D,0xA4AB,0x43C4,0x84E5,0x0933C84B4F4FULL), "linuxswap", "Linux Swap"},
+{UU(0xE6D6D379,0xF507,0x44C2,0xA23C,0x238F2A3DF928ULL), "linuxlvm", "Linux Logical Volume Manager"},
+{UU(0x933AC7E1,0x2EB4,0x4F13,0xB844,0x0E14E2AEF915ULL), "linuxhome", "Linux /home"},
+{UU(0x3B8F8425,0x20E0,0x4F3B,0x907F,0x1A25A76F98E8ULL), "linuxsrv", "Linux /srv"},
+{UU(0x7FFEC5C9,0x2D00,0x49B7,0x8941,0x3EA10A5586B7ULL), "linuxcrypt", "Linux Plain dm-crypt"},
+{UU(0xCA7D7CCB,0x63ED,0x4C53,0x861C,0x1742536059CCULL), "luks", "LUKS"},
+{UU(0x8DA63339,0x0007,0x60C0,0xC436,0x083AC8230908ULL), "linuxreserved", "Linux Reserved"},
+{UU(0x83BD6B9D,0x7F41,0x11DC,0xBE0B,0x001560B84F0FULL), "fbsdboot", "FreeBSD Boot"},
+{UU(0x516E7CB4,0x6ECF,0x11D6,0x8FF8,0x00022D09712BULL), "fbsddata", "FreeBSD Data"},
+{UU(0x516E7CB5,0x6ECF,0x11D6,0x8FF8,0x00022D09712BULL), "fbsdswap", "FreeBSD Swap"},
+{UU(0x516E7CB6,0x6ECF,0x11D6,0x8FF8,0x00022D09712BULL), "fbsdufs", "FreeBSD Unix File System"},
+{UU(0x516E7CB8,0x6ECF,0x11D6,0x8FF8,0x00022D09712BULL), "fbsdvvm", "FreeBSD Vinum volume manager"},
+{UU(0x516E7CBA,0x6ECF,0x11D6,0x8FF8,0x00022D09712BULL), "fbsdzfs", "FreeBSD ZFS"},
+{UU(0x48465300,0x0000,0x11AA,0xAA11,0x00306543ECACULL), "applehfs", "Apple HFS+"},
+{UU(0x55465300,0x0000,0x11AA,0xAA11,0x00306543ECACULL), "appleufs", "Apple UFS"},
+{UU(0x6A898CC3,0x1DD2,0x11B2,0x99A6,0x080020736631ULL), "applezfs", "Apple ZFS"},
+{UU(0x52414944,0x0000,0x11AA,0xAA11,0x00306543ECACULL), "appleraid", "Apple RAID"},
+{UU(0x52414944,0x5F4F,0x11AA,0xAA11,0x00306543ECACULL), "appleraidoff", "Apple RAID, offline"},
+{UU(0x426F6F74,0x0000,0x11AA,0xAA11,0x00306543ECACULL), "appleboot", "Apple Boot"},
+{UU(0x4C616265,0x6C00,0x11AA,0xAA11,0x00306543ECACULL), "applelabel", "Apple Label"},
+{UU(0x5265636F,0x7665,0x11AA,0xAA11,0x00306543ECACULL), "appletv", "Apple TV Recovery"},
+{UU(0x53746F72,0x6167,0x11AA,0xAA11,0x00306543ECACULL), "applecs", "Apple Core Storage"},
+{UU(0x6A82CB45,0x1DD2,0x11B2,0x99A6,0x080020736631ULL), "solarisboot", "Solaris Boot"},
+{UU(0x6A85CF4D,0x1DD2,0x11B2,0x99A6,0x080020736631ULL), "solarisroot", "Solaris Root"},
+{UU(0x6A87C46F,0x1DD2,0x11B2,0x99A6,0x080020736631ULL), "solarisswap", "Solaris Swap"},
+{UU(0x6A8B642B,0x1DD2,0x11B2,0x99A6,0x080020736631ULL), "solarisbakup", "Solaris Backup"},
+{UU(0x6A898CC3,0x1DD2,0x11B2,0x99A6,0x080020736631ULL), "solarisusr", "Solaris /usr"},
+{UU(0x6A8EF2E9,0x1DD2,0x11B2,0x99A6,0x080020736631ULL), "solarisvar", "Solaris /var"},
+{UU(0x6A90BA39,0x1DD2,0x11B2,0x99A6,0x080020736631ULL), "solarishome", "Solaris /home"},
+{UU(0x6A9283A5,0x1DD2,0x11B2,0x99A6,0x080020736631ULL), "solarisalt", "Solaris Alternate sector"},
+{UU(0x6A945A3B,0x1DD2,0x11B2,0x99A6,0x080020736631ULL), "solaris", "Solaris Reserved"},
+{UU(0x6A9630D1,0x1DD2,0x11B2,0x99A6,0x080020736631ULL), "solaris", "Solaris Reserved"},
+{UU(0x6A980767,0x1DD2,0x11B2,0x99A6,0x080020736631ULL), "solaris", "Solaris Reserved"},
+{UU(0x6A96237F,0x1DD2,0x11B2,0x99A6,0x080020736631ULL), "solaris", "Solaris Reserved"},
+{UU(0x6A8D2AC7,0x1DD2,0x11B2,0x99A6,0x080020736631ULL), "solaris", "Solaris Reserved"},
+{UU(0x49F48D32,0xB10E,0x11DC,0xB99B,0x0019D1879648ULL), "nbsdswap", "NetBSD Swap"},
+{UU(0x49F48D5A,0xB10E,0x11DC,0xB99B,0x0019D1879648ULL), "nbsdffs", "NetBSD FFS"},
+{UU(0x49F48D82,0xB10E,0x11DC,0xB99B,0x0019D1879648ULL), "nbsdlfs", "NetBSD LFS"},
+{UU(0x49F48DAA,0xB10E,0x11DC,0xB99B,0x0019D1879648ULL), "nbsdraid", "NetBSD RAID"},
+{UU(0x2DB519C4,0xB10F,0x11DC,0xB99B,0x0019D1879648ULL), "nbsdcat", "NetBSD Concatenated"},
+{UU(0x2DB519EC,0xB10F,0x11DC,0xB99B,0x0019D1879648ULL), "nbsdcrypt", "NetBSD Encrypted"},
+{UU(0xFE3A2A5D,0x4F32,0x41A7,0xB725,0xACCC3285A309ULL), "chromeoskern", "ChromeOS kernel"},
+{UU(0x3CB8E202,0x3B7E,0x47DD,0x8A3C,0x7FF2A13CFCECULL), "chromeosroot", "ChromeOS rootfs"},
+{UU(0x2E0A753D,0x9E48,0x43B0,0x8337,0xB15192CB1B5EULL), "chromeos", "ChromeOS future use"},
+{UU(0x42465331,0x3BA3,0x10F1,0x802A,0x4861696B7521ULL), "haikubfs", "Haiku BFS"},
+{UU(0x85D5E45E,0x237C,0x11E1,0xB4B3,0xE89A8F7FC3A7ULL), "midbsdboot", "MidnightBSD Boot"},
+{UU(0x85D5E45A,0x237C,0x11E1,0xB4B3,0xE89A8F7FC3A7ULL), "midbsddata", "MidnightBSD Data"},
+{UU(0x85D5E45B,0x237C,0x11E1,0xB4B3,0xE89A8F7FC3A7ULL), "midbsdswap", "MidnightBSD Swap"},
+{UU(0x0394EF8B,0x237E,0x11E1,0xB4B3,0xE89A8F7FC3A7ULL), "midbsdufs", "MidnightBSD Unix File System"},
+{UU(0x85D5E45C,0x237C,0x11E1,0xB4B3,0xE89A8F7FC3A7ULL), "midbsdvvm", "MidnightBSD Vinum volume manager"},
+{UU(0x85D5E45D,0x237C,0x11E1,0xB4B3,0xE89A8F7FC3A7ULL), "midbsdzfs", "MidnightBSD ZFS"},
+{UU(0x45B0969E,0x9B03,0x4F30,0xB4C6,0xB4B80CEFF106ULL), "cephjournal", "Ceph Journal"},
+{UU(0x45B0969E,0x9B03,0x4F30,0xB4C6,0x5EC00CEFF106ULL), "cephcrypt", "Ceph dm-crypt Encrypted Journal"},
+{UU(0x4FBD7E29,0x9D25,0x41B8,0xAFD0,0x062C0CEFF05DULL), "cephosd", "Ceph OSD"},
+{UU(0x4FBD7E29,0x9D25,0x41B8,0xAFD0,0x5EC00CEFF05DULL), "cephcryptosd", "Ceph dm-crypt OSD"},
+{UU(0x824CC7A0,0x36A8,0x11E3,0x890A,0x952519AD3F61ULL), "openbsd", "OpenBSD Data"},
+{UU(0xCEF5A9AD,0x73BC,0x4601,0x89F3,0xCDEEEEE321A1ULL), "qnx6", "QNX6 Power-safe file system"},
+{UU(0xC91818F9,0x8025,0x47AF,0x89D2,0xF030D7000C2CULL), "plan9", "Plan 9"},
};
static Flag flags[] = {
- { 0, 'S', "system" },
- { 1, 'E', "efi-hidden" },
- { 2, 'A', "active" },
- { 60, 'R', "read-only" },
- { 62, 'H', "hidden" },
- { 63, 'M', "nomount" },
- { -1, 0, nil }
+ { 0x0000000000000001ULL, 'S', "system" },
+ { 0x0000000000000002ULL, 'E', "efi-hidden" },
+ { 0x0000000000000004ULL, 'A', "active" },
+ { 0x2000000000000000ULL, 'R', "read-only" },
+ { 0x4000000000000000ULL, 'H', "hidden" },
+ { 0x8000000000000000ULL, 'M', "nomount" },
+ { 0, 0, nil }
};
static void initcrc32(void);
@@ -488,7 +488,7 @@
p = s;
for(f=flags; f->c != '\0'; f++){
- if(a & (1ULL<<f->s))
+ if(a & f->f)
*p = f->c;
else
*p = '-';
@@ -1024,9 +1024,9 @@
d = 1;
}
- print("%-6s %*llud %*llud (%lld.%.2d %s) %A %8s \"%S\"\n",
- name, edit->disk->width, a, edit->disk->width, b,
- s/d, (int)(((s%d)*100)/d), unit, attr, type, label);
+ print("%A %-6s %*llud %*llud (%lld.%.2d %s) %8s \"%S\"\n",
+ attr, name, edit->disk->width, a, edit->disk->width, b,
+ s/d, (int)(((s%d)*100)/d), unit, type, label);
}
static char*
@@ -1079,7 +1079,7 @@
if(s[0] != '?')
break;
for(f = flags; f->c != '\0'; f++)
- fprint(2, "%.16llux %c - %s\n", 1ULL<<f->s, f->c, f->desc);
+ fprint(2, "%#.16llux %c - %s\n", f->f, f->c, f->desc);
}
} else {
s = a[2];
@@ -1101,10 +1101,10 @@
return "unknown flag";
switch(op){
case '+':
- p->attr |= 1ULL<<f->s;
+ p->attr |= f->f;
break;
case '-':
- p->attr &= ~(1ULL<<f->s);
+ p->attr &= ~f->f;
break;
}
p->changed = 1;