summaryrefslogtreecommitdiff
path: root/sbin/fdisk/fdisk.c
AgeCommit message (Expand)Author
2022-05-12Prevent '-u' when operating on GPT formatted disks, as theKenneth R Westerback
2022-04-24Use warnx() if errno is not relevant. close() after errno ofKenneth R Westerback
2022-03-11Simple hack to preserve the EFI System partition whenKenneth R Westerback
2022-02-04Wrap some annoyingly long lines.Kenneth R Westerback
2021-12-11Start the default OpenBSD partition either immediately followingKenneth R Westerback
2021-10-19Move get_default_mbr() invocation before DISK_open() invocation and removeKenneth R Westerback
2021-10-13Nuke builtin_mbr.Kenneth R Westerback
2021-09-29Don't constrain -b specified block count or block size to be greater than 63.Kenneth R Westerback
2021-09-26Revert '-b' change. Forgot required bsd.rd tweak.Kenneth R Westerback
2021-09-26MBR partitions created with '-b' should be marked DOSACTIVE.Kenneth R Westerback
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