aboutsummaryrefslogtreecommitdiff
path: root/sbin/i386
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>1998-03-29 23:41:51 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>1998-03-29 23:41:51 +0000
commit680426be8ff8be7f4675cfd50ff1213688a2ea8f (patch)
tree915d034248399295a3a0dd984a5047aeeda81036 /sbin/i386
parent006b9b7df93f640c08ccca5d4b70eead645b31e9 (diff)
downloadsrc-680426be8ff8be7f4675cfd50ff1213688a2ea8f.tar.gz
src-680426be8ff8be7f4675cfd50ff1213688a2ea8f.zip
Add NTFS partition type.
Add "." at the end of some sentances. Also print "flag 80" in English. Give hint that "sysid" for FreeBSD is 165 decimal. Ensure active partition specified by user is 1-4.
Notes
Notes: svn path=/head/; revision=34952
Diffstat (limited to 'sbin/i386')
-rw-r--r--sbin/i386/fdisk/fdisk.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/sbin/i386/fdisk/fdisk.c b/sbin/i386/fdisk/fdisk.c
index eaaa3850238a..e992f0974fb3 100644
--- a/sbin/i386/fdisk/fdisk.c
+++ b/sbin/i386/fdisk/fdisk.c
@@ -167,7 +167,7 @@ struct part_type
,{0x04, "Primary DOS with 16 bit FAT (<= 32MB)"}
,{0x05, "Extended DOS"}
,{0x06, "Primary 'big' DOS (> 32MB)"}
- ,{0x07, "OS/2 HPFS, QNX or Advanced UNIX"}
+ ,{0x07, "OS/2 HPFS, NTFS, QNX or Advanced UNIX"}
,{0x08, "AIX filesystem"}
,{0x09, "AIX boot partition or Coherent"}
,{0x0A, "OS/2 Boot Manager or OPUS"}
@@ -449,11 +449,12 @@ print_part(int i)
part_mb *= secsize;
part_mb /= (1024 * 1024);
printf("sysid %d,(%s)\n", partp->dp_typ, get_type(partp->dp_typ));
- printf(" start %ld, size %ld (%qd Meg), flag %x\n",
+ printf(" start %ld, size %ld (%qd Meg), flag %x%s\n",
partp->dp_start,
partp->dp_size,
part_mb,
- partp->dp_flag);
+ partp->dp_flag,
+ partp->dp_flag == ACTIVE ? " (active)" : "");
printf("\tbeg: cyl %d/ sector %d/ head %d;\n\tend: cyl %d/ sector %d/ head %d\n"
,DPCYL(partp->dp_scyl, partp->dp_ssect)
,DPSECT(partp->dp_ssect)
@@ -512,7 +513,7 @@ struct dos_partition *partp = ((struct dos_partition *) &mboot.parts) + i - 1;
}
do {
- Decimal("sysid", partp->dp_typ, tmp);
+ Decimal("sysid (165=FreeBSD)", partp->dp_typ, tmp);
Decimal("start", partp->dp_start, tmp);
Decimal("size", partp->dp_size, tmp);
@@ -574,9 +575,16 @@ struct dos_partition *partp = ((struct dos_partition *) &mboot.parts);
active = which;
if (!ok("Do you want to change the active partition?"))
return;
- do
+setactive:
+ active = 4;
+ do {
Decimal("active partition", active, tmp);
- while (!ok("Are you happy with this choice"));
+ if (active < 1 || 4 < active) {
+ printf("Active partition number must be in range 1-4."
+ " Try again.\n");
+ goto setactive;
+ }
+ } while (!ok("Are you happy with this choice"));
for (i = 0; i < NDOSPART; i++)
partp[i].dp_flag = 0;
if (active > 0 && active <= NDOSPART)
@@ -809,7 +817,7 @@ char *cp;
*num = acc;
return 1;
} else
- printf("%s is an invalid decimal number. Try again\n",
+ printf("%s is an invalid decimal number. Try again.\n",
lbuf);
}
@@ -850,7 +858,7 @@ char *cp;
*num = acc;
return 1;
} else
- printf("%s is an invalid hex number. Try again\n",
+ printf("%s is an invalid hex number. Try again.\n",
lbuf);
}