X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=src%2Fpartition.c;h=dcd6dedd49bc78776f8da4336de0830f68ec6aad;hb=HEAD;hp=50d99e930f18f7a8d1cc62b2072f4c2edcb547cf;hpb=f574e1127a225e2de2e77a6b9e46a65986789f1f;p=rrq%2Fmaintain_lilo.git diff --git a/src/partition.c b/src/partition.c index 50d99e9..dcd6ded 100644 --- a/src/partition.c +++ b/src/partition.c @@ -2,7 +2,7 @@ * * Copyright 1992-1998 Werner Almesberger * Copyright 1999-2005 John Coffman - * Copyright 2009-2013 Joachim Wiedorn + * Copyright 2009-2015 Joachim Wiedorn * All rights reserved. * * Licensed under the terms contained in the file 'COPYING' @@ -226,11 +226,10 @@ void part_verify(int dev_nr,int type) 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); @@ -576,7 +575,7 @@ void do_activate(char *part, char *which) #if 1 int part_max, count, number, fd; struct partition pt [PART_MAX_MAX+1]; - long long daddr [PART_MAX_MAX+1]; + int64_t daddr [PART_MAX_MAX+1]; int modify=0; part_max = read_partitions(part, extended_pt ? PART_MAX_MAX : 0, @@ -684,7 +683,7 @@ void do_install_mbr(char *part, char *what) if (fstat(fd,&st) < 0) die("stat: %s : %s", part,strerror(errno)); if (!S_ISBLK(st.st_mode) && !force_fs) die("%s not a block device",part); if (st.st_rdev != (st.st_rdev & has_partitions(st.st_rdev))) - die("%s is not a master device with a primary parition table",part); + die("%s is not a master device with a primary partition table",part); if (read(fd,&buf,SECTOR_SIZE) != SECTOR_SIZE) die("read %s: %s",part, strerror(errno)); cp = cfg_get_strg(cf_options,"force-backup"); @@ -741,7 +740,7 @@ void do_install_mbr(char *part, char *what) /* partition table read */ int read_partitions(char *part, int max, int *volid, - struct partition *p, long long *where) + struct partition *p, int64_t *where) { int fd, i; unsigned int second, base; @@ -749,7 +748,7 @@ int read_partitions(char *part, int max, int *volid, struct partition pt[PART_MAX]; BOOT_PARAMS_1 hdr; struct stat st; - long long daddr; + int64_t daddr; if ((fd=open(part,O_RDONLY))<0) die("Cannot open '%s'", part); if (fstat(fd,&st)<0) die("Cannot fstat '%s'", part);