summaryrefslogtreecommitdiff
path: root/sbin/fdisk
AgeCommit message (Collapse)Author
2009-07-24properly sanitize the default value in ask_num(...)Alexander Hall
2009-04-29code that stank and made me upsetTheo de Raadt
2009-04-07Fix the default value to be between low/high range. Thanks forTobias Weingartner
frantisek holop pointing out the issue. ok deraadt@
2009-04-01Remove duplicate entry for partition id 0x07 so NTFS partitionsJonathan Gray
will show as NTFS in fdisk output. ok todd@ otto@ deraadt@
2009-03-30some improvements inspired by a mail on misc@ from frantisek holop:Jason McIntyre
- clarify the terms geometry sectors field and start field - change the fdisk prompt from 0 to 1, and explain its meaning - temper CAVEATS: the note is "common practice", not mandatory from nick and myself
2009-03-24two more MBR partition namesTodd T. Fries
ok otto@ beck@
2009-02-08Eliminate excessive verbiage for 'fdisk -i' and 'fdisk -u'. EspeciallyKenneth R Westerback
the multi-line banner announcing that the MBR is being changed. Also the listing of the partition table in 'fdisk -u'. Display a consistant message when the MBR is written. While here cleanup and shrink code without changing any semantics. Started with a diff posted on tech@ by Tobias Ulmer. "I like it" marco@ ok jsing@
2008-12-01Back out previous; it broke specifying paritions sizes with decimals,Ray Lai
e.g. "0.5g".
2008-12-01Check for invalid integers passed getuint(); instead of getuint()Ray Lai
returning an error, just reprompt. If there is an error reading from stdin, use the old (default) value. Shrinks fdisk a few bytes! OK deraadt.
2008-05-31add hfs+ type. deraadt@ okFederico G. Schwindt
2008-05-13fix an error in the example partition table; from Adam PattersonJason McIntyre
ok nick
2008-02-18adjust width of S column to improve printing of the MBR partition tableIgor Sobrado
on modern disk geometries; while here, better alignment of column labels ok jmc@, jsing@, krw@, and otto@
2007-12-30sort flags in both synopsis and usage, file not commited in last diffIgor Sobrado
ok jmc@
2007-12-30sort flags in both synopsis and usageIgor Sobrado
ok jmc@
2007-11-26fix SEE ALSO; from deraadtJason McIntyre
2007-11-25tweak previous;Jason McIntyre
2007-11-25Build fdisk(8) on all architectures, since it is minimally useful to viewTheo de Raadt
the MBR... and install the man page in the MI location.
2007-11-25document MBR spoofing, very minimallyTheo de Raadt
2007-08-01cats went awayTheo de Raadt
2007-07-04another mbr partition type; fgschTheo de Raadt
2007-06-10adjust the width of columns to match the geometry of current drivesIgor Sobrado
ok deraadt@
2007-05-31convert to new .Dd format;Jason McIntyre
2007-04-27Remove unneeded #include's, as already done for disklabel. CPU_BIOSKenneth R Westerback
fallout.
2007-04-26lint says: fdisk.c:160: warning: operator '==' found where '=' was expectedTheo de Raadt
yet gcc happily ate it... see, lint is useful
2007-04-26Eliminate CPU_BIOS from userland and wd(4) by always using the BIOSKenneth R Westerback
geometry in the disklabel when there is a BIOS geometry to provide. This removes the option to set a disklabel to 'BIOS' geometry via the 'g b' command in the editor. Makes reported geometry more consistant and moves MD code to MD land where it should be. Doc help from jmc@, Feedback from millert@, marco@, weingart@, kettenis@. ok deraadt@
2007-04-04Thinkpad -> ThinkPad; from Igor SobradoJason McIntyre
ok millert jasper mbalmer
2007-01-12make the description match synopsis for -chs;Jason McIntyre
discussed with nick
2007-01-11avoid an ugly grammar construction;Jason McIntyre
2007-01-11make the description of -e point to the COMMAND MODE section;Jason McIntyre
2007-01-11Move options into DESCRIPTION section. This conforms with mostRay Lai
other man pages, where the options are near the top of the page for easy access. OK jmc@.
2006-12-10Read/write device sectors rather than assuming sector size ==Kenneth R Westerback
DEV_BSIZE. Simply extract/insert the desired MBR from/into the first DEV_BSIZE bytes of the sector. Makes fdisk work with devices having a sector size different from DEV_BSIZE (512 bytes). e.g. 2048 byte sector MP3 devices. Original diff from weingart@. ok pedro@ deraadt@ weingart@
2006-11-19Try DIOCGPDINFO before DIOCGDINFO when trying to determine the 'label'Kenneth R Westerback
geometry for a unit. DIOCGPDINFO avoids using the on-disk label or the cached copy of it and returns a 'spoofed' label that retains the geometry info placed in the label by the driver. Unfortunately DIOCGPDINFO is not universally implemented, though sd and wd do. This is what disklabel(8) does when it wants geometry so this makes fdisk a bit more consistant with disklabel. This fixes 'fdisk -i' and 'reinit' when trying to install from a miniroot on, e.g., landisk. i.e. no need to zero out the disklabel before doing 'fdisk -i'. 'get it in snaps' deraadt@
2006-11-09desireable -> desirable;Jason McIntyre
2006-11-09oopsTheo de Raadt
2006-11-08sh machines also have a /usr/mdec/mbrTheo de Raadt
2006-11-08add a -y flag, for non-interactive useTheo de Raadt
2006-10-24Check strlen(buf) to be > 0 before accessing buf[strlen(buf)-1].Moritz Jodeit
OK ray@ cloder@
2006-10-20OpenBSD no longer supports using an older FreeBSD MBR partition.David Hill
ok krw@
2006-10-15build fdisk on landiskDale Rahn
2006-08-05Mention that `b', `k', `m', and `g' can be specified after the printRay Lai
command to print partition sizes in units of bytes, kilobytes, megabytes, and gigabytes. Inspired by patch from Hiren Patel <hiren at obsidian dot co dot za>. OK jmc@ and otto@
2006-07-27Change some obvious atoi() to strtonum().Ray Lai
OK tedu@
2006-07-27Add checks to each write(2) attempt and try to keep fdisk in aRay Lai
consistent state upon write failure. OK krw@ and deraadt@.
2006-07-18Fix a typo, paritition -> partition.Marc Balmer
From Alexey Dobriyan <adobriyan@gmail.com>, thanks.
2006-07-09Do not try and read /usr/mdec/mbr in ``fdisk -e'' unless the architectureMiod Vallat
really provides it.
2006-07-09Add armish to MANSUBDIRMiod Vallat
2006-06-09EFI partition types; didickman@yahoo.comTheo de Raadt
2006-06-06System build pieces for armish arch.Dale Rahn
2006-05-29Change MBR_read() and MBR_write() to return -1 on error and setRay Lai
errno = EIO for short reads. This makes it easier to check for read and write errors. Much patient tutoring by weingart@, deraadt@, and cloder@. Correctly use ssize_t to store read(2) and write(2) return values. No functional change, since MBR_read() and MBR_write() return values aren't currently checked. OK deraadt@
2006-04-26man page is gzip'd, should store as unsigned char array.Theo de Raadt
2005-12-18Fix condition so "BIOS fixup botch" can, unlikely as it is, beKenneth R Westerback
detected. Found by lint. ok millert@