summaryrefslogtreecommitdiff
path: root/sbin/fdisk
AgeCommit message (Expand)Author
2021-09-13disk.dk_size can't be 0 as we errx() if that happens duringKenneth R Westerback
2021-09-13Document that the editing command 'disk' takes an optional units argument.Kenneth R Westerback
2021-09-12Stop taking detour through unit_types[SECTORS] to findKenneth R Westerback
2021-09-10Stop using NULL as a synonym for "s" (SECTORS). Just use "s".Kenneth R Westerback
2021-09-09Simplify logic in USER_edit() loop to eliminate unnecessaryKenneth R Westerback
2021-09-09Scan unit_types[] array using nitems() and eliminate the NULLKenneth R Westerback
2021-09-02Split part_type into separate types 'mbr_type' and 'gpt_type',Kenneth R Westerback
2021-09-01Improve editing GPT partition type GUID's by rejecting partitionKenneth R Westerback
2021-08-29Nuke unused variable and unnecessary initialization.Kenneth R Westerback
2021-08-28Add hex_octet() so the strtol(..,16) dance is done in just oneKenneth R Westerback
2021-08-27Replace stray hand-rolled nitems() with nitems().Kenneth R Westerback
2021-08-25Two more Capt. Obvious comments go away.Kenneth R Westerback
2021-08-25Consolidate '-e' edit command parsing into ask_cmd(), simplifyingKenneth R Westerback
2021-08-24Add an #ifdef DEBUG/#endif chunk that dumps the entire GPT header whenKenneth R Westerback
2021-08-24A couple more Capt. Obvious comments can go.Kenneth R Westerback
2021-08-24Trim leading/trailing whitespace from -e input to make commandKenneth R Westerback
2021-08-15Don't check & errx() after each and every invocation ofKenneth R Westerback
2021-08-12Oops. Lost a 'nitems()' chunk during last commit. Don'tKenneth R Westerback
2021-08-12Further reduce cross-file confusion by adding USER_help() andKenneth R Westerback
2021-08-10Go back to using Xwrite() during initialization phase to makeKenneth R Westerback
2021-08-10Eliminate single use 'error' vars by directlyKenneth R Westerback
2021-08-07style(9) says sort getopt() options and the following switch {}Kenneth R Westerback
2021-08-07Nuke a few Capt. Obvious comments.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-07Comment typo 'mmbr' -> 'mbr'.Kenneth R Westerback
2021-08-06Cleanup, clarify and generally polish the MBR/GPT initializationKenneth R Westerback
2021-07-26Report write() and ioctl() errors encountered when writing GPT or MBR to disk.Kenneth R Westerback
2021-07-22mbrfile can be const.Kenneth R Westerback
2021-07-22Have PRT_protected_guid() return 0/-1 like everything elseKenneth R Westerback
2021-07-22Tweak some err() verbiage.Kenneth R Westerback
2021-07-21A couple of missed 'const'.Kenneth R Westerback
2021-07-21Use a dedicated struct mbr to hold the GPT protective MBR,Kenneth R Westerback
2021-07-19Tweak one comment and nuke a bunch of pointless ones.Kenneth R Westerback
2021-07-19Abstract reading the built-in MBR or MBR file intoKenneth R Westerback
2021-07-19MBR_protective_mbr() can take a const struct mbr *.Kenneth R Westerback
2021-07-19An MBR knows (mbr_lba_self) where it is supposed to go, noKenneth R Westerback
2021-07-19Revert incorrect tweaks to disk geometry calculations andKenneth R Westerback
2021-07-18Don't save the prt_scyl/prt_ecyl values, change them, use themKenneth 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-17Change edit/gedit/setpid/gsetpid to return 0/-1 to indicate success or failureKenneth R Westerback
2021-07-16Change PRT_protected_guid() to take native order uuid's instead of little endianKenneth R Westerback
2021-07-16Compare pointer to NULL, not 0.Kenneth R Westerback
2021-07-16Be consistent and always return -1 to indicate failure.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