Commit Graph

41 Commits

Author SHA1 Message Date
ru
dbe20466fd Add ata(4) support.
Approved by:	jkh
2000-02-11 11:25:23 +00:00
billf
a75e6c6086 Stuff a variable declaration inside a #if block that is only used for that
#if.
1999-09-25 02:11:30 +00:00
peter
e226894fa0 $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
dwhite
e54c2d32e3 Add -e option to usage(). 1999-08-25 21:31:08 +00:00
phk
11e85b40e9 Add new option to fdisk: -e
This wipes the MBR and creates slice 1 as a FreeBSD slice covering the
disk starting from the second track to the cylinder aligned end of the disk.

This is the most compatibly layout we have as far as I know.
1999-08-23 11:06:19 +00:00
rnordier
bdc98c3998 Drop the embedded boot code in favour of a -B option which reads
the boot code from /boot/mbr, or elsewhere as defined by the revised
"-b bootcode" option; use getopt(3); clarify usage(); partially
revise man page; etc.
1999-06-27 19:29:15 +00:00
rnordier
20e427787e Note that a standard MBR supports booting only from hard drive 0 1999-03-13 01:40:57 +00:00
rnordier
d9e299cef5 Add a -b option as a simple way to rewrite the mbr code
(eg. replacing a boot manager with a standard mbr)
1999-01-22 11:54:17 +00:00
joerg
9a40a59d01 sd0 -> da0 1998-11-26 12:24:35 +00:00
alex
3434b3a517 Add an entry for the new NetBSD partition id. 1998-11-06 03:43:21 +00:00
jkoshy
39c9b4b99e Add an entry for BSD/OS [23].x partition types.
I don't have access to a BSD/OS machine to check the veracity of the
magic number.  However, no harm will be done by the commit and since
someone was motivated enough to file a PR, I'm committing the change.

PR:		7629
Submitted by:	Jos Backus <jbackus@plex.nl>
1998-11-06 03:25:56 +00:00
obrien
cb5a1c6181 Linux swap and Solaris x86 use the same BIOS partition id. 1998-09-16 19:25:47 +00:00
charnier
9678b00955 Correct use of .Nm, use .Bx Free for FreeBSD. Add rcsid, remove unused
#includes. Spelling. Use err(3) and add usage().
1998-07-06 06:44:36 +00:00
bde
86649af7cb Fixed printf format errors. 1998-06-28 20:48:03 +00:00
steve
31e5cafbe9 Fix a spelling error.
PR:		6857
Submitted by:	Josh Gilliam <josh@quick.net>
1998-06-04 21:09:08 +00:00
jraynard
1ea9dc054e Fix typo in prompt. 1998-05-20 22:23:16 +00:00
obrien
e887bc6bac 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.
1998-03-29 23:41:51 +00:00
ache
7297d20f4e Add more DOS/Win95 partition types 1998-03-14 21:22:09 +00:00
ache
a8832a2adc Oops, merge back 32bit fat description from -stable.
It was added to -stable but not to -current, strange.
1998-03-07 22:00:31 +00:00
ache
946b6b0c98 Add primary fat-32 1998-03-07 08:45:46 +00:00
brian
d48b3c3974 Number partitions 1-4, not 0-3.
Any existing config files (using the -f option) will need
to be changed although using the old files will usually result
in an error (partition 0 is invalid).
1997-06-03 21:24:39 +00:00
gibbs
7e178af93d Don't overflow when calculating the size in MB of a partition.
No more 241MB 4+ gig partitions for me!
1997-06-02 19:25:48 +00:00
imp
d97edc5e11 OpenBSD uses ID 0xa6 for its partitions on i386, arc and others that need
a BIOS-like partition table.  We now detect this correctly and print the
right thing.
Obtained from: Value obtained from OpenBSD sources.
1997-05-02 03:08:04 +00:00
sos
95e3c79022 This update adds the support for != 512 byte sector SCSI devices to
the sd & od drivers. There is also slight changes to fdisk & newfs
in order to comply with different sectorsizes.
Currently sectors of size 512, 1024 & 2048 are supported, the only
restriction beeing in fdisk, which hunts for the sectorsize of
the device.
This is based on patches to od.c and the other system files by
John Gumb & Barry Scott, minor changes and the sd.c patches by
me.
There also exist some patches for the msdos filesys code, but I
havn't been able to test those (yet).

	John Gumb (john@talisker.demon.co.uk)
	Barry Scott (barry@scottb.demon.co.uk)
1996-12-01 11:25:38 +00:00
jkh
64d7f01697 Allow fdisk to be driven from a configuration file, making a 3rd-party
utility for front-ending its operation more of a possibility.

2.2-RELEASE candiate.  Closes PR#1960
Submitted-By: Darryl Okahata <darrylo@hpnmhjw.sr.hp.com>
1996-11-06 14:08:39 +00:00
bde
f3e0907938 The dos() function needs a new second argument, containing the size
of the partition. Only if the size is 0 should the
special handling of 0 as first argument be triggered.

[This bug caused offset 0 to give C/H/S = 0/0/0 instead of 0/0/1.]

The init_sector0 function needs to decrease the first argument
to the second call to dos() by one to be consistent with the
calls to dos() in change_part().

[This bug caused fdisk -i to create bogus partition tables with
the ending C/H/S value 1 too high.  This usually gives S = 1
instead of S = maximum, so the geometry guessing in the slice
code and perhaps in SCSI BIOSes was defeated.]

Submitted by:	Tor Egge <tegge@itea.ntnu.no>
1996-10-13 18:18:50 +00:00
alex
91b13927bd Code clean up. Prototypes, parentheses around assignments used in
if statements, #if 0 some unused code, use off_t in calls to read/
write_disk, fix a printf format, remove unused variables, and
#include necessary files.
1996-06-21 02:39:19 +00:00
mpp
9cf4d30ac4 Fix even more spelling errors in some more man pages. 1996-01-30 16:34:52 +00:00
jmz
a97378bb9c Fix the spelling of 'partition'. 1996-01-04 02:00:16 +00:00
julian
b53b3455f6 remove the calls to DIOCWLABEL, as it isn't supported any more
and the error message confuses the user.
(just commented out foe now)
1995-10-03 11:12:50 +00:00
joerg
2eb61626f7 Update to the slices era. Make /dev/rfoo0 the defaults, not
/dev/rfoo0d.

Scan a list of devices instead of insisting on all the world
being wd0.

Allow for disk names to be specified (e.g. `sd0') instead of full
path names only.

Sync the man page with the reality.
1995-09-01 18:00:14 +00:00
rgrimes
0d84aee7e3 Remove trailing whitespace. 1995-05-30 06:12:45 +00:00
gpalmer
bbb6923234 Add NEXTSTEP as claiming partition code 0xA7. 1995-04-17 09:42:54 +00:00
jkh
2c823f2352 Recognise Linux filesystems.
Submitted by:	remy
1995-01-14 02:26:07 +00:00
bde
8b3dde5352 Don't write outside of partp[] if the user gives an invalid partition
number for the partition to be made active.  Do nothing instead.  This
allows clearing all the active flags by specifying an invalid partition.
1994-10-25 17:46:53 +00:00
bde
51bb0bcc12 Don't change the active partition when the user says not to change it.
Convert absolute sector 0 to C/H/S 0/0/0, not 0/0/1.

Open in O_RDWR mode for the undocumented -a option, so that -a can be
used without -u.
1994-10-19 21:25:28 +00:00
bde
9bf7a8942d Don't exit early if the device is not character special or if the
device driver cannot supply a label (real or faked).  This allows
you to practice using fdisk on disposable media (e.g., "dd count=1
<dev/zero >/tmp/junk; fdisk /tmp/junk", "dd count=1 </etc/passwd
>/tmp/fix-up-the-mess; fdisk /tmp/fix-up-the-mess") and allows me
to test DOSpartitioning and labelling on floppies.
1994-09-15 20:19:51 +00:00
jkh
3136eddb2e Fix gross spelling and typographical errors pointed out by Keith Bostic. 1994-04-24 01:22:07 +00:00
rgrimes
ee39253404 The fdisk man page doesn't show correctly the usage possibilities of
fdisk.  It was missing the disk argument.

From: Andreas Schulz <ats@g386bsd.first.gmd.de>
1993-08-10 10:31:35 +00:00
root
f9a8e35555 New manual page system 1993-07-02 06:10:31 +00:00
rgrimes
5fba0401c2 Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00