summaryrefslogtreecommitdiff
path: root/sbin/fdisk/fdisk.c
AgeCommit message (Expand)Author
2021-08-28Add hex_octet() so the strtol(..,16) dance is done in just oneKenneth R Westerback
2021-08-10Go back to using Xwrite() during initialization phase to makeKenneth R Westerback
2021-08-07style(9) says sort getopt() options and the following switch {}Kenneth R Westerback
2021-08-07Nuke unneeded #include's, one param.h -> types.h.Kenneth R Westerback
2021-08-07Nuke 'p' that r1.97 snuck into getopt() invocation back in 2015.Kenneth R Westerback
2021-08-06Cleanup, clarify and generally polish the MBR/GPT initializationKenneth R Westerback
2021-07-22mbrfile can be const.Kenneth R Westerback
2021-07-21Use a dedicated struct mbr to hold the GPT protective MBR,Kenneth R Westerback
2021-07-19Abstract reading the built-in MBR or MBR file intoKenneth R Westerback
2021-07-18Make GPT_read() obtain and validate the on-disk MBR itself, viaKenneth R Westerback
2021-07-18Put MBR_parse() invocation inside MBR_read() instead of alwaysKenneth R Westerback
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