summaryrefslogtreecommitdiff
path: root/sbin/fdisk/fdisk.c
AgeCommit message (Expand)Author
2021-07-17The first think MBR_init() does is memset(0) the gpt header and gptKenneth R Westerback
2021-07-17Nuke a bunch of Capt. Obvious or misleading comments.Kenneth R Westerback
2021-07-15Nuke unused variable.Kenneth R Westerback
2021-07-15No need for separate b_sectors, b_offset and b_type variables. We have structKenneth R Westerback
2021-07-15Consolidate disk geometry fiddling, turning -l/-c/-h/-s values into MBRKenneth R Westerback
2021-07-12Add 'dk_' prefix to struct disk field names.Kenneth R Westerback
2021-07-11Add 'mbr_' prefix to struct mbr field names.Kenneth R Westerback
2021-07-11Move ask_cmd(), ask_num(), ask_pid(), ask_string(), parse_b()Kenneth R Westerback
2021-07-11Add tabs to make variable declarations easierKenneth R Westerback
2021-07-11'return' is not a function call.Kenneth R Westerback
2021-06-28Add another epicycle to -A processing that ensures ONLY theKenneth R Westerback
2021-06-25Replace instances of the magic number '64' with a nice #defineKenneth R Westerback
2021-06-23The value of -l should be treated as a 512-byte block count.Kenneth R Westerback
2021-06-22The values for blocks and offset in -b should be treated as 512-byte blockKenneth R Westerback
2021-06-21Add -A option to "safely" initialize a GPT without removingKenneth R Westerback
2021-06-20Make -b available to architectures other than amd64 and i386.Kenneth R Westerback
2021-06-14Only use of 'reinited' died in cmd.c r1.100. It is now set in aKenneth R Westerback
2021-05-14Tweak the two copies of gpt_chk_mbr() to return the index of the MBRKenneth R Westerback
2021-05-10Replace some magic numbers with #define's. Rename GPT_get_gpt() toKenneth R Westerback
2021-05-07Replace random mix of u_int* and uint* types with consistent uint* types.Kenneth R Westerback
2021-05-02Try harder to ensure there are no GPT revenants afterKenneth R Westerback
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