*
* 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'
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);
#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,
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");
/* 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;
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);