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