1 /* ----------------------------------------------------------------------- *
3 * Copyright 2009 Pierre-Alexandre Meyer
5 * This file is part of Syslinux, and is made available under
6 * the terms of the GNU General Public License version 2.
8 * ----------------------------------------------------------------------- */
13 void get_label(int label
, char **buffer_label
)
15 int buffer_size
= (80 * sizeof(char));
16 char *buffer
= malloc(buffer_size
);
17 *buffer_label
= buffer
;
21 strlcpy(buffer
, "DOS 12-bit fat", buffer_size
);
24 strlcpy(buffer
, "XENIX root", buffer_size
);
27 strlcpy(buffer
, "XENIX /usr", buffer_size
);
30 strlcpy(buffer
, "DOS 3.0+ 16-bit FAT (up to 32M)", buffer_size
);
33 strlcpy(buffer
, "DOS 3.3+ Extended Partition", buffer_size
);
36 strlcpy(buffer
, "DOS 3.31+ 16-bit FAT (over 32M)", buffer_size
);
39 strlcpy(buffer
, "OS/2 IFS (e.g., HPFS)", buffer_size
);
41 //case 0x07: strlcpy(buffer, "Advanced Unix", buffer_size); break;
42 //case 0x07: strlcpy(buffer, "Windows NT NTFS", buffer_size); break;
43 //case 0x07: strlcpy(buffer, "QNX2.x (pre-1988)", buffer_size); break;
45 strlcpy(buffer
, "OS/2 (v1.0-1.3 only)", buffer_size
);
47 //case 0x08: strlcpy(buffer, "AIX boot partition", buffer_size); break;
48 //case 0x08: strlcpy(buffer, "SplitDrive", buffer_size); break;
49 //case 0x08: strlcpy(buffer, "DELL partition spanning multiple drives", buffer_size); break;
50 //case 0x08: strlcpy(buffer, "Commodore DOS", buffer_size); break;
51 //case 0x08: strlcpy(buffer, "QNX 1.x and 2.x ("qny")", buffer_size); break;
53 strlcpy(buffer
, "AIX data partition", buffer_size
);
55 //case 0x09: strlcpy(buffer, "Coherent filesystem", buffer_size); break;
56 //case 0x09: strlcpy(buffer, "QNX 1.x and 2.x ("qnz")", buffer_size); break;
58 strlcpy(buffer
, "OS/2 Boot Manager", buffer_size
);
60 //case 0x0a: strlcpy(buffer, "Coherent swap partition", buffer_size); break;
61 //case 0x0a: strlcpy(buffer, "OPUS", buffer_size); break;
63 strlcpy(buffer
, "WIN95 OSR2 32-bit FAT", buffer_size
);
66 strlcpy(buffer
, "WIN95 OSR2 32-bit FAT, LBA-mapped", buffer_size
);
69 strlcpy(buffer
, "WIN95: DOS 16-bit FAT, LBA-mapped", buffer_size
);
72 strlcpy(buffer
, "WIN95: Extended partition, LBA-mapped", buffer_size
);
75 strlcpy(buffer
, "OPUS (?)", buffer_size
);
78 strlcpy(buffer
, "Hidden DOS 12-bit FAT", buffer_size
);
81 strlcpy(buffer
, "Compaq config partition", buffer_size
);
84 strlcpy(buffer
, "Hidden DOS 16-bit FAT <32M", buffer_size
);
87 strlcpy(buffer
, "Hidden DOS 16-bit FAT >=32M", buffer_size
);
90 strlcpy(buffer
, "Hidden IFS (e.g., HPFS)", buffer_size
);
93 strlcpy(buffer
, "AST SmartSleep Partition", buffer_size
);
96 strlcpy(buffer
, "Unused (Claimed for Willowtech Photon COS)",
100 strlcpy(buffer
, "Hidden WIN95 OSR2 32-bit FAT", buffer_size
);
103 strlcpy(buffer
, "Hidden WIN95 OSR2 32-bit FAT, LBA-mapped",
107 strlcpy(buffer
, "Hidden WIN95 16-bit FAT, LBA-mapped", buffer_size
);
110 strlcpy(buffer
, "Unused", buffer_size
);
113 strlcpy(buffer
, "Reserved", buffer_size
);
115 //case 0x21: strlcpy(buffer, "Unused", buffer_size); break;
117 strlcpy(buffer
, "Unused", buffer_size
);
120 strlcpy(buffer
, "Reserved", buffer_size
);
123 strlcpy(buffer
, "NEC DOS 3.x", buffer_size
);
126 strlcpy(buffer
, "Reserved", buffer_size
);
129 strlcpy(buffer
, "Reserved", buffer_size
);
132 strlcpy(buffer
, "NOS", buffer_size
);
135 strlcpy(buffer
, "Reserved", buffer_size
);
138 strlcpy(buffer
, "Reserved", buffer_size
);
141 strlcpy(buffer
, "JFS on OS/2 or eCS", buffer_size
);
144 strlcpy(buffer
, "Reserved", buffer_size
);
147 strlcpy(buffer
, "THEOS ver 3.2 2gb partition", buffer_size
);
150 strlcpy(buffer
, "Plan 9 partition", buffer_size
);
152 //case 0x39: strlcpy(buffer, "THEOS ver 4 spanned partition", buffer_size); break;
154 strlcpy(buffer
, "THEOS ver 4 4gb partition", buffer_size
);
157 strlcpy(buffer
, "THEOS ver 4 extended partition", buffer_size
);
160 strlcpy(buffer
, "PartitionMagic recovery partition", buffer_size
);
163 strlcpy(buffer
, "Hidden NetWare", buffer_size
);
166 strlcpy(buffer
, "Venix 80286", buffer_size
);
169 strlcpy(buffer
, "Linux/MINIX (sharing disk with DRDOS)", buffer_size
);
171 //case 0x41: strlcpy(buffer, "Personal RISC Boot", buffer_size); break;
172 //case 0x41: strlcpy(buffer, "PPC PReP (Power PC Reference Platform) Boot", buffer_size); break;
174 strlcpy(buffer
, "Linux swap (sharing disk with DRDOS)", buffer_size
);
176 //case 0x42: strlcpy(buffer, "SFS (Secure Filesystem)", buffer_size); break;
177 //case 0x42: strlcpy(buffer, "Windows 2000 marker", buffer_size); break;
179 strlcpy(buffer
, "Linux native (sharing disk with DRDOS)", buffer_size
);
182 strlcpy(buffer
, "GoBack partition", buffer_size
);
185 strlcpy(buffer
, "Boot-US boot manager", buffer_size
);
187 //case 0x45: strlcpy(buffer, "Priam", buffer_size); break;
188 //case 0x45: strlcpy(buffer, "EUMEL/Elan", buffer_size); break;
190 strlcpy(buffer
, "EUMEL/Elan", buffer_size
);
193 strlcpy(buffer
, "EUMEL/Elan", buffer_size
);
196 strlcpy(buffer
, "EUMEL/Elan", buffer_size
);
199 strlcpy(buffer
, "AdaOS Aquila (Default)", buffer_size
);
201 //case 0x4a: strlcpy(buffer, "ALFS/THIN lightweight filesystem for DOS", buffer_size); break;
203 strlcpy(buffer
, "Oberon partition", buffer_size
);
206 strlcpy(buffer
, "QNX4.x", buffer_size
);
209 strlcpy(buffer
, "QNX4.x 2nd part", buffer_size
);
212 strlcpy(buffer
, "QNX4.x 3rd part", buffer_size
);
214 //case 0x4f: strlcpy(buffer, "Oberon partition", buffer_size); break;
216 strlcpy(buffer
, "OnTrack Disk Manager (older versions) RO",
219 //case 0x50: strlcpy(buffer, "Lynx RTOS", buffer_size); break;
220 //case 0x50: strlcpy(buffer, "Native Oberon (alt)", buffer_size); break;
222 strlcpy(buffer
, "OnTrack Disk Manager RW (DM6 Aux1)", buffer_size
);
224 //case 0x51: strlcpy(buffer, "Novell", buffer_size); break;
226 strlcpy(buffer
, "CP/M", buffer_size
);
228 //case 0x52: strlcpy(buffer, "Microport SysV/AT", buffer_size); break;
230 strlcpy(buffer
, "Disk Manager 6.0 Aux3", buffer_size
);
233 strlcpy(buffer
, "Disk Manager 6.0 Dynamic Drive Overlay", buffer_size
);
236 strlcpy(buffer
, "EZ-Drive", buffer_size
);
239 strlcpy(buffer
, "Golden Bow VFeature Partitioned Volume.", buffer_size
);
241 //case 0x56: strlcpy(buffer, "DM converted to EZ-BIOS", buffer_size); break;
243 strlcpy(buffer
, "DrivePro", buffer_size
);
245 //case 0x57: strlcpy(buffer, "VNDI Partition", buffer_size); break;
247 strlcpy(buffer
, "Priam EDisk", buffer_size
);
250 strlcpy(buffer
, "SpeedStor", buffer_size
);
254 "Unix System V (SCO, ISC Unix, UnixWare, ...), Mach, GNU Hurd",
258 strlcpy(buffer
, "PC-ARMOUR protected partition", buffer_size
);
260 //case 0x64: strlcpy(buffer, "Novell Netware 286, 2.xx", buffer_size); break;
262 strlcpy(buffer
, "Novell Netware 386, 3.xx or 4.xx", buffer_size
);
265 strlcpy(buffer
, "Novell Netware SMS Partition", buffer_size
);
268 strlcpy(buffer
, "Novell", buffer_size
);
271 strlcpy(buffer
, "Novell", buffer_size
);
274 strlcpy(buffer
, "Novell Netware 5+, Novell Netware NSS Partition",
278 strlcpy(buffer
, "DiskSecure Multi-Boot", buffer_size
);
281 strlcpy(buffer
, "Reserved", buffer_size
);
284 strlcpy(buffer
, "Reserved", buffer_size
);
287 strlcpy(buffer
, "Reserved", buffer_size
);
289 //case 0x74: strlcpy(buffer, "Scramdisk partition", buffer_size); break;
291 strlcpy(buffer
, "IBM PC/IX", buffer_size
);
294 strlcpy(buffer
, "Reserved", buffer_size
);
297 strlcpy(buffer
, "M2FS/M2CS partition", buffer_size
);
299 //case 0x77: strlcpy(buffer, "VNDI Partition", buffer_size); break;
301 strlcpy(buffer
, "XOSL FS", buffer_size
);
304 strlcpy(buffer
, " ", buffer_size
);
307 strlcpy(buffer
, "MINIX until 1.4a", buffer_size
);
310 strlcpy(buffer
, "MINIX since 1.4b, early Linux", buffer_size
);
312 //case 0x81: strlcpy(buffer, "Mitac disk manager", buffer_size); break;
313 //case 0x82: strlcpy(buffer, "Prime", buffer_size); break;
314 //case 0x82: strlcpy(buffer, "Solaris x86", buffer_size); break;
316 strlcpy(buffer
, "Linux swap", buffer_size
);
319 strlcpy(buffer
, "Linux native (usually ext2fs)", buffer_size
);
322 strlcpy(buffer
, "OS/2 hidden C: drive", buffer_size
);
324 //case 0x84: strlcpy(buffer, "Hibernation partition", buffer_size); break;
326 strlcpy(buffer
, "Linux extended partition", buffer_size
);
328 //case 0x86: strlcpy(buffer, "Old Linux RAID partition superblock", buffer_size); break;
330 strlcpy(buffer
, "NTFS volume set", buffer_size
);
333 strlcpy(buffer
, "NTFS volume set", buffer_size
);
336 strlcpy(buffer
, "Linux Kernel Partition (used by AiR-BOOT)",
340 strlcpy(buffer
, "Legacy Fault Tolerant FAT32 volume", buffer_size
);
344 "Legacy Fault Tolerant FAT32 volume using BIOS extd INT 13h",
348 strlcpy(buffer
, "Free FDISK hidden Primary DOS FAT12 partitition",
352 strlcpy(buffer
, "Linux Logical Volume Manager partition", buffer_size
);
355 strlcpy(buffer
, "Free FDISK hidden Primary DOS FAT16 partitition",
359 strlcpy(buffer
, "Free FDISK hidden DOS extended partitition",
363 strlcpy(buffer
, "Free FDISK hidden Primary DOS large FAT16 partitition",
367 strlcpy(buffer
, "Hidden Linux native partition", buffer_size
);
369 //case 0x93: strlcpy(buffer, "Amoeba", buffer_size); break;
371 strlcpy(buffer
, "Amoeba bad block table", buffer_size
);
374 strlcpy(buffer
, "MIT EXOPC native partitions", buffer_size
);
377 strlcpy(buffer
, "Free FDISK hidden Primary DOS FAT32 partitition",
381 strlcpy(buffer
, "Free FDISK hidden Primary DOS FAT32 partitition (LBA)",
385 strlcpy(buffer
, "DCE376 logical drive", buffer_size
);
388 strlcpy(buffer
, "Free FDISK hidden Primary DOS FAT16 partitition (LBA)",
392 strlcpy(buffer
, "Free FDISK hidden DOS extended partitition (LBA)",
396 strlcpy(buffer
, "BSD/OS", buffer_size
);
399 strlcpy(buffer
, "Laptop hibernation partition", buffer_size
);
402 strlcpy(buffer
, "Laptop hibernation partition", buffer_size
);
404 //case 0xa1: strlcpy(buffer, "HP Volume Expansion (SpeedStor variant)", buffer_size); break;
406 strlcpy(buffer
, "Reserved", buffer_size
);
409 strlcpy(buffer
, "Reserved", buffer_size
);
412 strlcpy(buffer
, "BSD/386, 386BSD, NetBSD, FreeBSD", buffer_size
);
415 strlcpy(buffer
, "OpenBSD", buffer_size
);
418 strlcpy(buffer
, "NEXTSTEP", buffer_size
);
421 strlcpy(buffer
, "Mac OS-X", buffer_size
);
424 strlcpy(buffer
, "NetBSD", buffer_size
);
427 strlcpy(buffer
, "Olivetti Fat 12 1.44Mb Service Partition",
431 strlcpy(buffer
, "Mac OS-X Boot partition", buffer_size
);
433 //case 0xab: strlcpy(buffer, "GO! partition", buffer_size); break;
435 strlcpy(buffer
, "ShagOS filesystem", buffer_size
);
438 strlcpy(buffer
, "ShagOS swap partition", buffer_size
);
441 strlcpy(buffer
, "BootStar Dummy", buffer_size
);
444 strlcpy(buffer
, "Reserved", buffer_size
);
447 strlcpy(buffer
, "Reserved", buffer_size
);
450 strlcpy(buffer
, "Reserved", buffer_size
);
453 strlcpy(buffer
, "Reserved", buffer_size
);
456 strlcpy(buffer
, "BSDI BSD/386 filesystem", buffer_size
);
459 strlcpy(buffer
, "BSDI BSD/386 swap partition", buffer_size
);
462 strlcpy(buffer
, "Boot Wizard hidden", buffer_size
);
465 strlcpy(buffer
, "Solaris 8 boot partition", buffer_size
);
468 strlcpy(buffer
, "CTOS", buffer_size
);
470 //case 0xc0: strlcpy(buffer, "REAL/32 secure small partition", buffer_size); break;
471 //case 0xc0: strlcpy(buffer, "NTFT Partition", buffer_size); break;
473 strlcpy(buffer
, "DRDOS/secured (FAT-12)", buffer_size
);
476 strlcpy(buffer
, "Reserved for DR-DOS 7+", buffer_size
);
478 //case 0xc2: strlcpy(buffer, "Hidden Linux", buffer_size); break;
480 strlcpy(buffer
, "Hidden Linux swap", buffer_size
);
483 strlcpy(buffer
, "DRDOS/secured (FAT-16, < 32M)", buffer_size
);
486 strlcpy(buffer
, "DRDOS/secured (extended)", buffer_size
);
489 strlcpy(buffer
, "DRDOS/secured (FAT-16, >= 32M)", buffer_size
);
491 //case 0xc6: strlcpy(buffer, "Windows NT corrupted FAT16 volume/stripe set", buffer_size); break;
493 strlcpy(buffer
, "Windows NT corrupted NTFS volume/stripe set",
496 //case 0xc7: strlcpy(buffer, "Syrinx boot", buffer_size); break;
498 strlcpy(buffer
, "(See also ID c2.)", buffer_size
);
501 strlcpy(buffer
, "(See also ID c2.)", buffer_size
);
504 strlcpy(buffer
, "(See also ID c2.)", buffer_size
);
507 strlcpy(buffer
, "reserved for DRDOS/secured (FAT32)", buffer_size
);
510 strlcpy(buffer
, "reserved for DRDOS/secured (FAT32, LBA)", buffer_size
);
513 strlcpy(buffer
, "CTOS Memdump?", buffer_size
);
516 strlcpy(buffer
, "reserved for DRDOS/secured (FAT16, LBA)", buffer_size
);
519 strlcpy(buffer
, "REAL/32 secure big partition", buffer_size
);
522 strlcpy(buffer
, "Old Multiuser DOS secured FAT12", buffer_size
);
525 strlcpy(buffer
, "Old Multiuser DOS secured FAT16 <32M", buffer_size
);
528 strlcpy(buffer
, "Old Multiuser DOS secured extended partition",
532 strlcpy(buffer
, "Old Multiuser DOS secured FAT16 >=32M", buffer_size
);
535 strlcpy(buffer
, "CP/M-86", buffer_size
);
538 strlcpy(buffer
, "Non-FS Data", buffer_size
);
542 "Digital Research CP/M, Concurrent CP/M, Concurrent DOS",
545 //case 0xdb: strlcpy(buffer, "CTOS (Convergent Technologies OS -Unisys)", buffer_size); break;
546 //case 0xdb: strlcpy(buffer, "KDG Telemetry SCPU boot", buffer_size); break;
548 strlcpy(buffer
, "Hidden CTOS Memdump?", buffer_size
);
551 strlcpy(buffer
, "Dell PowerEdge Server utilities (FAT fs)",
555 strlcpy(buffer
, "DG/UX virtual disk manager partition", buffer_size
);
557 //case 0xdf: strlcpy(buffer, "BootIt EMBRM", buffer_size); break;
560 "Reserved by STMicroelectronics for a filesystem called ST AVFS.",
564 strlcpy(buffer
, "DOS access or SpeedStor 12-bit FAT extended partition",
568 strlcpy(buffer
, "DOS R/O or SpeedStor", buffer_size
);
571 strlcpy(buffer
, "SpeedStor 16-bit FAT extended partition < 1024 cyl.",
576 "Tandy DOS with logical sectored FAT (According to Powerquest.)",
579 //case 0xe5: strlcpy(buffer, "Reserved", buffer_size); break;
581 strlcpy(buffer
, "Reserved", buffer_size
);
584 strlcpy(buffer
, "BFS (aka BeFS)", buffer_size
);
587 strlcpy(buffer
, "Reserved for Matthias Paul's Sprytix", buffer_size
);
591 "Indication that this legacy MBR is followed by an EFI header",
595 strlcpy(buffer
, "Partition that contains an EFI file system",
599 strlcpy(buffer
, "Linux/PA-RISC boot loader", buffer_size
);
602 strlcpy(buffer
, "SpeedStor", buffer_size
);
606 "DOS 3.3+ secondary partition (Powerquest writes: Unisys DOS with logical sectored FAT.)",
611 "Reserved (Powerquest writes: Storage Dimensions SpeedStor.)",
615 strlcpy(buffer
, "SpeedStor large partition", buffer_size
);
617 //case 0xf4: strlcpy(buffer, "Prologue single-volume partition", buffer_size); break;
619 strlcpy(buffer
, "Prologue multi-volume partition", buffer_size
);
623 "Reserved (Powerquest writes: Storage Dimensions SpeedStor. )",
627 strlcpy(buffer
, "Bochs", buffer_size
);
630 strlcpy(buffer
, "VMware File System partition", buffer_size
);
633 strlcpy(buffer
, "VMware Swap partition", buffer_size
);
637 "Linux raid partition with autodetect using persistent superblock (Powerquest writes: Reserved for FreeDOS. )",
641 strlcpy(buffer
, "SpeedStor > 1024 cyl.", buffer_size
);
643 //case 0xfe: strlcpy(buffer, "LANstep", buffer_size); break;
644 //case 0xfe: strlcpy(buffer, "IBM PS/2 IML (Initial Microcode Load) partition, located at the end of the disk.", buffer_size); break;
645 //case 0xfe: strlcpy(buffer, "Windows NT Disk Administrator hidden partition", buffer_size); break;
646 //case 0xfe: strlcpy(buffer, "Linux Logical Volume Manager partition (old)", buffer_size); break;
648 strlcpy(buffer
, "Xenix Bad Block Table ", buffer_size
);
651 strlcpy(buffer
, "Unknown", buffer_size
);