X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=src%2Fpartition.c;h=329a90f8bb31ea7ecb11804fac1ac32c0cc818f3;hb=6b7c9204067e37f8f2b40c35f71da53b17ac57ce;hp=7dbbc5d99261a2772aa630fedcfa278cfa6c1181;hpb=5a2473f0b614812b537270318281f8654c80e265;p=rrq%2Fmaintain_lilo.git diff --git a/src/partition.c b/src/partition.c index 7dbbc5d..329a90f 100644 --- a/src/partition.c +++ b/src/partition.c @@ -1,13 +1,13 @@ -/* partition.c - Partition table handling */ -/* -Copyright 1992-1998 Werner Almesberger. -Copyright 1999-2005 John Coffman. -All rights reserved. - -Licensed under the terms contained in the file 'COPYING' in the -source directory. - -*/ +/* partition.c - Partition table handling + * + * Copyright 1992-1998 Werner Almesberger + * Copyright 1999-2005 John Coffman + * Copyright 2009-2014 Joachim Wiedorn + * All rights reserved. + * + * Licensed under the terms contained in the file 'COPYING' + * in the source directory. + */ #define _GNU_SOURCE #include @@ -101,9 +101,9 @@ if ( !(do_md_install && extra==X_MBR_ONLY) ) { else if ( !strncmp("NTFS", bs.par_d.system, 4) || anywhere(bs.sector,"NTLDR") ) ret=PTW_NTFS; -/* check for HPFS */ - else if ( !strncmp("OS2", bs.par_d.system, 3) - || anywhere(bs.sector,"OS2LDR") ) ret=PTW_OS2; +/* do not check for obsolete OS2_HPFS */ +/* else if ( !strncmp("OS2", bs.par_d.system, 3) + || anywhere(bs.sector,"OS2LDR") ) ret=PTW_OS2; */ /* check for DOS FAT */ else if ( @@ -115,10 +115,6 @@ if ( !(do_md_install && extra==X_MBR_ONLY) ) { && (bs.par_d.bpb.sectors_per_cluster & (bs.par_d.bpb.sectors_per_cluster-1))==0 ) { ret=PTW_DOS; -#if 0 -/* this, it turns out is from Windows 98, so no caution here on NT */ - if (anywhere(bs.sector,"WINBOOT SYS")) ret+=PTW_NTFS; -#endif } /* check for SWAP -- last check, as 'bs' is overwritten */ @@ -221,21 +217,19 @@ void part_verify(int dev_nr,int type) i == PART_FAT32 || i == PART_FAT32_LBA || i == PART_FAT16_LBA || - i == PART_NTFS || - i == PART_OS2_BOOTMGR ; + i == PART_NTFS ; if (type && !Linux) { warn("partition type 0x%02X"" on device 0x%04X is a dangerous place for\n" " a boot sector.%s", part_table[part].sys_ind, dev_nr, - dos ? " A DOS/Windows/OS2 system may be rendered unbootable." + dos ? " A DOS/Windows system may be rendered unbootable." "\n The backup copy of this boot sector should be retained." : "" ); + fprintf (errstd, "I will assume that you know what you're doing and I will proceed.\n"); #if 0 if (!dos && !cfg_get_flag(cf_options,"ignore-table")) die("You may proceed by using either '-P ignore' or 'ignore-table'"); -#else - if (!yesno("\nProceed? ", 0)) exit(0); #endif } cyl = part_table[part].cyl+((part_table[part].sector >> 6) << 8); @@ -557,12 +551,7 @@ void do_change(void) void preload_types(void) { -#if 0 /* don't know if it makes sense to add these too */ - add_type("Netware", 0x64, 0x74); - add_type("OS2_BM", 0x0a, 0x1a); -#endif - add_type("OS2_HPFS", 0x07, 0x17); - +/* add_type("OS2_HPFS", 0x07, 0x17); */ add_type("FAT16_lba", PART_FAT16_LBA, -1); add_type("FAT32_lba", PART_FAT32_LBA, -1); add_type("FAT32", PART_FAT32, -1);