lspart

diff ptype.h @ 0:29d89c00e611

simple partition table reading test
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 14 Oct 2011 07:45:44 +0300
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/ptype.h	Fri Oct 14 07:45:44 2011 +0300
     1.3 @@ -0,0 +1,83 @@
     1.4 +#ifndef PTYPE_H_
     1.5 +#define PTYPE_H_
     1.6 +
     1.7 +
     1.8 +#define PTYPE_EXT		0x5
     1.9 +#define PTYPE_EXT_LBA	0xf
    1.10 +
    1.11 +
    1.12 +#define PTYPES_SIZE		(sizeof partypes / sizeof *partypes)
    1.13 +
    1.14 +struct {
    1.15 +	int type;
    1.16 +	const char *name;
    1.17 +} partypes[] = {
    1.18 +	{0, "empty"},
    1.19 +	{0x01, "fat12"},
    1.20 +	{0x02, "xenix root"},
    1.21 +	{0x03, "xenix usr"},
    1.22 +	{0x04, "fat16 (small)"},
    1.23 +	{0x05, "extended"},
    1.24 +	{0x06, "fat16"},
    1.25 +	{0x07, "hpfs/ntfs"},
    1.26 +	{0x08, "aix"},
    1.27 +	{0x09, "aix bootable"},
    1.28 +	{0x0a, "os/2 boot manager"},
    1.29 +	{0x0b, "fat32 (chs)"},
    1.30 +	{0x0c, "fat32 (lba)"},
    1.31 +	{0x0e, "fat16 (lba)"},
    1.32 +	{0x0f, "extended (lba)"},
    1.33 +	{0x11, "hidden fat12"},
    1.34 +	{0x12, "compaq diagnostics"},
    1.35 +	{0x14, "hidden fat16 (small)"},
    1.36 +	{0x16, "hidden fat16"},
    1.37 +	{0x17, "hidden hpfs/ntfs"},
    1.38 +	{0x1b, "hidden fat32"},
    1.39 +	{0x1c, "hidden fat32 (lba)"},
    1.40 +	{0x1d, "hidden fat16 (lba)"},
    1.41 +	{0x24, "nec dos"},
    1.42 +	{0x27, "windows recovery"},
    1.43 +	{0x39, "plan 9"},
    1.44 +	{0x3c, "partition magic"},
    1.45 +	{0x4d, "qnx"},
    1.46 +	{0x4e, "qnx 2nd"},
    1.47 +	{0x4f, "qnx 3rd"},
    1.48 +	{0x52, "cp/m"},
    1.49 +	{0x63, "hurd/sysv"},
    1.50 +	{0x64, "netware 286"},
    1.51 +	{0x65, "netware 386"},
    1.52 +	{0x80, "minix (old)"},
    1.53 +	{0x81, "minix"},
    1.54 +	{0x82, "linux swap/solaris"},
    1.55 +	{0x83, "linux"},
    1.56 +	{0x84, "windows suspend"},
    1.57 +	{0x85, "linux extended"},
    1.58 +	{0x86, "ntfs volume?"},
    1.59 +	{0x87, "ntfs volume?"},
    1.60 +	{0x88, "linux plaintext"},
    1.61 +	{0x8e, "linux lvm"},
    1.62 +	{0x9f, "bsd/os"},
    1.63 +	{0xa0, "laptop diagnostic"},
    1.64 +	{0xa5, "freebsd slice"},
    1.65 +	{0xa6, "openbsd slice"},
    1.66 +	{0xa7, "nextstep"},
    1.67 +	{0xa8, "darwin ufs"},
    1.68 +	{0xa9, "netbsd slice"},
    1.69 +	{0xab, "darwin boot"},
    1.70 +	{0xaf, "hfs/hfs+"},
    1.71 +	{0xb7, "bsdi"},
    1.72 +	{0xb8, "bsdi swap"},
    1.73 +	{0xbe, "solaris boot"},
    1.74 +	{0xbf, "solaris"},
    1.75 +	{0xde, "dell diagnostic"},
    1.76 +	{0xeb, "beos"},
    1.77 +	{0xee, "gpt"},
    1.78 +	{0xef, "efi (fat)"},
    1.79 +	{0xf0, "linux/pa-risc boot"},
    1.80 +	{0xf2, "dos secondary"},
    1.81 +	{0xfb, "vmware vmfs"},
    1.82 +	{0xfc, "vmware vmkcore"},
    1.83 +	{0xfd, "linux raid auto"}
    1.84 +};
    1.85 +
    1.86 +#endif	/* PTYPE_H_ */