summaryrefslogtreecommitdiffstats
path: root/sbin/fdisk_pc98
diff options
context:
space:
mode:
authorsjg <sjg@FreeBSD.org>2013-09-05 20:18:59 +0000
committersjg <sjg@FreeBSD.org>2013-09-05 20:18:59 +0000
commit62bb1062226d3ce6a2350808256a25508978352d (patch)
tree22b131dceb13c3df96da594fbaadb693504797c7 /sbin/fdisk_pc98
parent72ab90509b3a51ab361bf710338f2ef44a4e360d (diff)
parent04932445481c2cb89ff69a83b961bdef3d64757e (diff)
downloadFreeBSD-src-62bb1062226d3ce6a2350808256a25508978352d.zip
FreeBSD-src-62bb1062226d3ce6a2350808256a25508978352d.tar.gz
Merge from head
Diffstat (limited to 'sbin/fdisk_pc98')
-rw-r--r--sbin/fdisk_pc98/fdisk.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sbin/fdisk_pc98/fdisk.c b/sbin/fdisk_pc98/fdisk.c
index b66bad4..479e1e4 100644
--- a/sbin/fdisk_pc98/fdisk.c
+++ b/sbin/fdisk_pc98/fdisk.c
@@ -254,7 +254,7 @@ main(int argc, char *argv[])
dos_sectors);
printf("Part %11s %11s %4s %4s %-16s\n", "Start", "Size", "MID",
"SID", "Name");
- for (i = 0; i < NDOSPART; i++) {
+ for (i = 0; i < PC98_NPARTS; i++) {
partp = ((struct pc98_partition *) &mboot.parts) + i;
if (partp->dp_sid == 0)
continue;
@@ -310,7 +310,7 @@ main(int argc, char *argv[])
printf("Warning: BIOS sector numbering starts with sector 1\n");
printf("Information from DOS bootblock is:\n");
if (partition == -1)
- for (i = 1; i <= NDOSPART; i++)
+ for (i = 1; i <= PC98_NPARTS; i++)
change_part(i, v_flag);
else
change_part(partition, 1);
@@ -367,7 +367,7 @@ print_s0(int which)
print_params();
printf("Information from DOS bootblock is:\n");
if (which == -1) {
- for (i = 1; i <= NDOSPART; i++)
+ for (i = 1; i <= PC98_NPARTS; i++)
if (v_flag || !part_unused(i)) {
printf("%d: ", i);
print_part(i);
@@ -414,7 +414,7 @@ static void
init_boot(void)
{
- mboot.signature = DOSMAGIC;
+ mboot.signature = PC98_MAGIC;
}
@@ -517,7 +517,7 @@ change_active(int which)
int active, i, new, tmp;
active = -1;
- for (i = 0; i < NDOSPART; i++) {
+ for (i = 0; i < PC98_NPARTS; i++) {
if ((partp[i].dp_sid & PC98_SID_ACTIVE) == 0)
continue;
printf("Partition %d is marked active\n", i + 1);
@@ -672,7 +672,7 @@ write_disk(off_t sector, void *buf)
if (error == sz)
return (0);
- for (i = 0; i < NDOSPART; i++) {
+ for (i = 0; i < PC98_NPARTS; i++) {
sprintf(fbuf, "%ss%d", disk, i + 1);
fdw = open(fbuf, O_RDWR, 0);
if (fdw < 0)
@@ -731,7 +731,7 @@ read_s0()
warnx("can't read fdisk partition table");
return -1;
}
- if (mboot.signature != DOSMAGIC) {
+ if (mboot.signature != PC98_MAGIC) {
warnx("invalid fdisk partition table found");
/* So should we initialize things */
return -1;
@@ -911,7 +911,7 @@ reset_boot(void)
struct pc98_partition *partp;
init_boot();
- for (i = 1; i <= NDOSPART; i++) {
+ for (i = 1; i <= PC98_NPARTS; i++) {
partp = ((struct pc98_partition *) &mboot.parts) + i - 1;
bzero((char *)partp, sizeof (struct pc98_partition));
}
OpenPOWER on IntegriCloud