summaryrefslogtreecommitdiffstats
path: root/sbin/fdisk
Commit message (Collapse)AuthorAgeFilesLines
* Add some more partition types.joe2002-02-181-26/+56
| | | | | PR: i386/14793 MFC after: 3 days
* Oops, the arguments to a bcopy() were reversed, which broke zeroingiedowse2001-12-301-3/+2
| | | | | | | | | of unused partition entries and later detection of unused entries. Use memcpy to be consistent with the rest of the code, and fix a minor style nit. Submitted by: bde
* Default to WARNS=2.obrien2001-12-041-0/+1
| | | | | | Binary builds that cannot handle this must explicitly set WARNS=0. Reviewed by: mike
* Fixed spelling error in previous commit.bde2001-10-161-1/+1
|
* Add 0xEE (EFI GPT) and 0xEF (EFI System Partition)peter2001-10-151-0/+2
|
* mdoc(7) police: protect trailing full stops of abbreviationsru2001-08-101-1/+1
| | | | with a trailing zero-width space: `e.g.\&'.
* Fix a number of bugs and annoyances in fdisk, many of which wereiedowse2001-08-051-74/+96
| | | | | | | | | | | | | | | | | | | | pointed out by bde: - Ask for user confirmation before adjusting to a head/cylinder boundary (only when running interactively), and separate this adjustment from the automatic calculation of c/h/s parameters. - In sanitize_partition, don't change any values in the slice until we know that the automatic adjustment will succeed. - When auto-adjusting, ignore unused slices and give an appropriate error for other zero-size slices depending on the cause. - Change dos() to do all of the c/h/s calculations for a whole slice; this fixes a bug where the ending c/h/s of an unused slice was set incorrectly. - When changing the active slice, detect the currently active slice number instead of always defaulting to slice 4. - Call fflush(stdout) before calling fgets(). - Test for fgets() returning NULL so we don't loop on EOF. Reviewed by: bde
* fdisk(8): document the default for -b, add xref to boot0cfg(8).ru2001-07-181-0/+3
| | | | | | boot0cfg(8): add FILES section. Reviewed by: rnordier
* Remove whitespace at EOL.dd2001-07-151-1/+1
|
* After some (long-standing ;-) critics from Bruce, throw away the oldjoerg2001-07-132-39/+65
| | | | | | | | | | | | | | device search code i introduce nearly six years ago in rev 1.8. Bruce suggested to rather use the device name of the root filesystem instead which is certainly the most sensible default. Since there are many possible cases for a root filesystem name (device with and without slices, consider /dev/vinum/root even though it currently could not work as such), there's some heuristic using a RE in order to find out the canonical device name from the mounted name. This probably won't quite fit for a NFS root (can't test that right now), but then, there's hard to find a good default for those machines anyway. ;-) This unbreaks the functionality of rev 1.2 i once broke in 1.8. :)
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-101-1/+1
|
* Make open_disk() fail nicely upon encountering an ENOENT so to notjoerg2001-07-051-2/+4
| | | | | | | | | | prematurely terminate the search for a usable disk. ENOENT is quite normal in particulare now with the advent of devfs. While being here, also remove /dev/wd0 and /dev/od0 from the list of disks to search since we don't have them anymore. MFC after: 1 week
* wd0 -> ad0dd2001-04-081-2/+2
| | | | | PR: 26343 Submitted by: Sergey A. Osokin <osa@FreeBSD.org.ru>
* - Backout botched attempt to introduce MANSECT feature.ru2001-03-261-0/+1
| | | | - MAN[1-9] -> MAN.
* Set the default manual section for sbin/ to 8.ru2001-03-201-1/+0
|
* Eliminate mdocNG warnings caused by misplaced or extraneous macro calls.ru2001-02-281-12/+12
|
* mdoc(7) police: split punctuation characters + misc fixes.ru2001-02-011-5/+5
|
* Prepare for mdoc(7)NG.ru2000-12-181-1/+0
|
* mdoc(7) police: added missing .Os call.ru2000-12-141-1/+1
|
* I didn't maintain the "chs" ordering. Rather the bug was in print_part().obrien2000-11-291-6/+6
| | | | Requested by: bde.
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-2/+2
|
* Make the order of values prompted for with the "-i" option match print_part()obrien2000-11-181-2/+2
|
* Use Fx macro wherever possible.ru2000-11-141-8/+8
|
* Avoid use of direct troff requests in mdoc(7) manual pages.ru2000-11-101-25/+20
|
* - When adjusting the end of a partition to lie on a cylinder boundary, don'tjhb2000-08-241-46/+94
| | | | | | | | | | | adjust the size, but the actual end. - Break out some of the sanity checks on partitions into a sanitize_partition function. - When adjusting partitions, always adjust the start "up", and the end "down" so that we stay within the boundaries of the original request. - Various small nits found by bde. Reported by: bde, imp, rgrimes
* 0xA0 = Suspend to disk.joe2000-08-071-0/+1
|
* Fix a really stupid bug where I assumed sizeof(int) == 2. This resulted injhb2000-07-211-1/+1
| | | | | | | MBR's with a 4th slice failing the signature check and fdisk saying that they are invalid. Submitted by: bde
* - Don't try to free mboot.bootinst before it has been allocated. If, forjhb2000-07-171-2/+2
| | | | | | | | | | some reason, mboot.bootinst is not initialized to NULL at the beginning of the program, then the last commit to this would try to free whatever bogus address is in it. - Restore the behavior of free()'ing the mboot.bootinst buffer after we abuse it to determine the sector size of the disk (as clearly noted in the comments). Properly fix the double free() bug by setting the pointer to NULL after we free it.
* Fix memory leak/double free found by phkmallocache2000-07-151-8/+10
| | | | Uniform mboot.bootinst allocation code to be independent of functions order
* - Always respect cylinder boundaries when creating slices unless the userjhb2000-07-121-17/+70
| | | | | | explicitly sets the geometry. - Allow for MBR boot loaders that are longer than one sector. Only accept boot loaders if their size is a multiple of the sector size, however.
* Catch the usage() function up to the command line changes. Add -I andjhb2000-06-271-1/+1
| | | | remove -e.
* 0x39 == plan9brian2000-06-121-0/+1
| | | | Obtained from: OpenBSD
* Add QNX 4 partitions to fdisk's list.ghelmer2000-06-091-1/+4
| | | | | | PR: bin/8809 Submitted by: "John C. Place" <jcplace@ibm.net> Prompted by: <nrahlstr@winternet.com>
* Don't try to open the /dev/rXXX device.msmith2000-05-311-1/+1
|
* Fix nits in previous commit: restore option ordering of the optionsheldonh2000-03-131-2/+5
| | | | | description list; break an overly long line; use the Fx macro instead of "FreeBSD".
* -e -> -I change.imp2000-03-102-9/+36
| | | | | | -s for sumary Approved by: jkh
* Don't use the old raw name for disk devices.obrien2000-03-091-1/+1
|
* Add ata(4) support.ru2000-02-111-1/+1
| | | | Approved by: jkh
* Stuff a variable declaration inside a #if block that is only used for thatbillf1999-09-251-0/+2
| | | | #if.
* $Id$ -> $FreeBSD$peter1999-08-283-3/+3
|
* Add -e option to usage().dwhite1999-08-251-2/+2
|
* Add new option to fdisk: -ephk1999-08-232-13/+40
| | | | | | | 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.
* Drop the embedded boot code in favour of a -B option which readsrnordier1999-06-273-142/+100
| | | | | | 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.
* Note that a standard MBR supports booting only from hard drive 0rnordier1999-03-131-1/+4
|
* Add a -b option as a simple way to rewrite the mbr codernordier1999-01-222-4/+27
| | | | (eg. replacing a boot manager with a standard mbr)
* sd0 -> da0joerg1998-11-262-4/+4
|
* Add an entry for the new NetBSD partition id.alex1998-11-061-1/+2
|
* Add an entry for BSD/OS [23].x partition types.jkoshy1998-11-061-1/+2
| | | | | | | | | 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>
* Linux swap and Solaris x86 use the same BIOS partition id.obrien1998-09-161-2/+2
|
* Correct use of .Nm, use .Bx Free for FreeBSD. Add rcsid, remove unusedcharnier1998-07-062-119/+109
| | | | #includes. Spelling. Use err(3) and add usage().
OpenPOWER on IntegriCloud