summaryrefslogtreecommitdiff
path: root/sbin/fdisk/misc.c
AgeCommit message (Expand)Author
2022-07-10Add some anti-feline input protection by refusing to processKenneth R Westerback
2022-04-20Simpify code manipulating GPT partition names by coalescingKenneth R Westerback
2021-09-13disk.dk_size can't be 0 as we errx() if that happens duringKenneth 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-09Scan unit_types[] array using nitems() and eliminate the NULLKenneth R Westerback
2021-08-28Add hex_octet() so the strtol(..,16) dance is done in just oneKenneth 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-07Nuke unneeded #include's, one param.h -> types.h.Kenneth R Westerback
2021-07-17Nuke a bunch of Capt. Obvious or misleading comments.Kenneth R Westerback
2021-07-16Be consistent and always return -1 to indicate failure.Kenneth R Westerback
2021-07-15No need for separate b_sectors, b_offset and b_type variables. We have structKenneth R Westerback
2021-07-12Toss 'const' in anywhere the compiler doesn't complain about, thus identifyingKenneth R Westerback
2021-07-12Final batch of struct field name tweaks. 'cmd_' for cmd, ut_' forKenneth R Westerback
2021-07-12Add 'dk_' prefix to struct disk 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-25Replace instances of the magic number '64' with a nice #defineKenneth R Westerback
2021-06-20Make -b available to architectures other than amd64 and i386.Kenneth R Westerback
2021-06-13UUID_STR_LEN+1 is less mysterious than '37'.Kenneth R Westerback
2021-06-10Toss in 'const' for the parameters to string_to_utf16le() andKenneth R Westerback
2021-05-07Replace random mix of u_int* and uint* types with consistent uint* types.Kenneth R Westerback
2021-01-31replace fgetln(3) with getline(3) in fdiskChristian Weisgerber
2019-07-03snprintf/vsnprintf return < 0 on error, rather than -1.Theo de Raadt
2017-11-16Range check default values so that a range likeKenneth R Westerback
2015-11-26When prompting for a GPT partition type, use the partition's current type asTim van der Molen
2015-11-26When prompting for an LBA, show the min and max values in the prompt; OK krw@Tim van der Molen
2015-11-21Bring GPT partition editing into line with MBR partition editingKenneth R Westerback
2015-11-19Reduce overburden of unnecessary #include's. Note that param.h isKenneth R Westerback
2015-11-12Simplify string_from_line(). No functional change.Tim van der Molen
2015-11-12Avoid problems with pathological input during edit operations. i.e. neverKenneth R Westerback
2015-11-03Don't allow the user to enter GPT partition names too large to fitKenneth R Westerback
2015-10-26Add GPT editing. Based on GSOC 2014 work by Markus Muller.Kenneth R Westerback
2015-10-07Note permissions for the crc32() code adapted from Hacker's Delight.Kenneth R Westerback
2015-08-27Nuke some trailing whitespace that keeps coming back.Kenneth R Westerback
2015-03-30Even better -- readsector() and writesector() become DISK_readsector() andKenneth R Westerback
2015-03-29Rename MBR_readsector() and MBR_writesector() to just readsector()Kenneth R Westerback
2015-03-28Add a simple crc32() implmentation to avoid pulling in libz, whichKenneth R Westerback
2015-03-26Adapt ask_string() from disklabel's getstring(). It will be usedKenneth R Westerback
2015-03-26Allow input/printing/conversion of terabyte sizes. Which GPT partitonsKenneth R Westerback
2015-03-26Expand internal representation of partition starting LBA and sizeKenneth R Westerback
2015-03-16Stop passing around a pointer to the stack variable 'disk' in main().Kenneth 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
2014-03-31Nuke [get|put][short|long] and just use letoh[16|32] andKenneth R Westerback
2014-03-20Add back various #includes of err.h, unistd.h, ctype.h, ioctl.h toKenneth R Westerback
2014-03-20Add back #include <stdlib.h> so strtod() works better. Fixes fdisk onKenneth R Westerback
2014-03-17Nuke pointless blank lines, defines, comments and casts. EliminateKenneth R Westerback