summaryrefslogtreecommitdiff
path: root/sbin/fdisk/fdisk.c
AgeCommit message (Expand)Author
2018-04-26Prefer <fcntl.h> over <sys/fcntl.h> in userlandPhilip Guenther
2016-12-27The "disk too large" and "only LBA values saved" messages are moreKenneth R Westerback
2016-06-25Move pledge after opendev and DIOCGPDINFO. Fixes e.g. fdisk /dev/tty.Theo Buehler
2016-03-28Remove unused variablesRicardo Mestre
2015-12-12In olden times (i + u + e) was considered a clever way to 'or'Kenneth R Westerback
2015-12-12Open disk READONLY if none of i, e or u are specified.Kenneth R Westerback
2015-12-11Add '-v' flag that forces the display of both GPT's and the MBR.Kenneth R Westerback
2015-12-01Make '-i' set 'reinited' flag so that the initial Xwrite() will zapKenneth R Westerback
2015-11-24pledge "stdio rpath wpath disklabel proc exec" throughout, afterTheo de Raadt
2015-11-19Oops. Missed a file.Kenneth R Westerback
2015-11-18Parse the original on-disk MBR into a local variable. Use theKenneth R Westerback
2015-11-18g_flag does not need to be a global. Move it inside main().Kenneth R Westerback
2015-11-18Rejig the MBR file reading logic soKenneth R Westerback
2015-11-18Read MBR immediately, and only read the GPT if the MBR is aKenneth R Westerback
2015-11-15Move zapping of invalid GPT data into GPT_get_gpt() rather thanKenneth R Westerback
2015-11-14Since -l is ignored if -c/-h/-s are specified, make that combinationKenneth R Westerback
2015-11-14Consolidate usage() checking for -c/-h/-s with other checks. TweakKenneth R Westerback
2015-11-14pledge("stdio", NULL) for code path that just prints the MBR or GPT. i.e.Kenneth R Westerback
2015-11-14If none of -i, -u or -e are specified exit immediately after theKenneth R Westerback
2015-11-13No need to supplement usage() with extra messages about -b needing -i, orKenneth R Westerback
2015-11-13No need to zero a global variable before use.Kenneth R Westerback
2015-11-13Make usage() output fit on a 'normal' 80-character line. Tweak someKenneth R Westerback
2015-11-13Move from opening/closing disk for every i/o to opening the disk onceKenneth R Westerback
2015-11-11Display full disk size when editing GPT, not the truncated MBR size. DisplayKenneth R Westerback
2015-10-26Add GPT editing. Based on GSOC 2014 work by Markus Muller.Kenneth R Westerback
2015-10-05Enhance '-g' to create a default GPT label in addition to the protectiveKenneth R Westerback
2015-09-06correct a mistake in my previous commit;Jason McIntyre
2015-09-04shuffle -b into place; while there, do some general tidy upJason McIntyre
2015-09-04Add a -b option, to be used together with -i, that tells fdisk to add aMark Kettenis
2015-07-09Nuke unused variable.Kenneth R Westerback
2015-07-08Do not attempt to read a disk sector worth of data from the fileKenneth R Westerback
2015-03-19Nuke now unused variable.Kenneth R Westerback
2015-03-18Stop passing around little used 'struct mbr tt' parameter. JustKenneth R Westerback
2015-03-17Stop passing around little used and superfluous 'offset' parameter.Kenneth R Westerback
2015-03-16Stop passing around a pointer to the stack variable 'disk' in main().Kenneth R Westerback
2015-03-16Document that -i/-u are mutually exclusive and clean up the relatedKenneth R Westerback
2015-03-14Whitespace & KNF tweaks. Change functions whose return values areKenneth R Westerback
2015-03-14Switch all the license blocks to the standard OpenBSD/ISC license.Kenneth R Westerback
2015-02-09Rename 'm_flag' to 'e_flag' since it's '-e' that sets it. RenameKenneth R Westerback
2015-01-03Add support for creating a protective MBR for GPT.Joel Sing
2014-03-20Add back various #includes of err.h, unistd.h, ctype.h, ioctl.h toKenneth R Westerback
2014-03-17Nuke pointless blank lines, defines, comments and casts. EliminateKenneth R Westerback
2014-03-17Un-revert, being careful to not break snap building. Add paranoia checkKenneth R Westerback
2014-03-14Revert last -- broke building snaps.Kenneth R Westerback
2014-03-13Merge 'struct DISK_metrics' and 'struct disk' into one, since we don'tKenneth R Westerback
2014-03-09Instead of passing around 'char buf[DEV_BSIZE]' buffers, pass aroundKenneth R Westerback
2014-03-07Relieve the code of an overburden of unnecessary typedefKenneth R Westerback
2014-03-06tweak previous;Jason McIntyre
2014-03-02-l disksize code, to force LBA mode. code by chris, after I suggestedTheo de Raadt
2013-03-21more substantial include cleanupTheo de Raadt