summaryrefslogtreecommitdiff
path: root/sbin/fdisk/disk.c
AgeCommit message (Expand)Author
2022-04-25Push DISK_[read|write]sectors() down to disk.c local functionsKenneth R Westerback
2021-10-10No need to assign dl.d_nsectors to disk.dk_sectors twice.Kenneth 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-08-07Nuke unneeded #include's, one param.h -> types.h.Kenneth R Westerback
2021-07-26Report write() and ioctl() errors encountered when writing GPT or MBR to disk.Kenneth R Westerback
2021-07-22Tweak some err() verbiage.Kenneth R Westerback
2021-07-19Revert incorrect tweaks to disk geometry calculations andKenneth 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-15Consolidate disk geometry fiddling, turning -l/-c/-h/-s values into MBRKenneth R Westerback
2021-07-13Disk sector addresses are normally stored/provided in uint64_tKenneth 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-11Add tabs to make variable declarations easierKenneth R Westerback
2021-07-11'return' is not a function call.Kenneth R Westerback
2021-05-07Replace random mix of u_int* and uint* types with consistent uint* types.Kenneth R Westerback
2018-04-26Prefer <fcntl.h> over <sys/fcntl.h> in userlandPhilip Guenther
2016-03-09Accept only character special devices rather than generating a coreKenneth R Westerback
2015-12-12Open disk READONLY if none of i, e or u are specified.Kenneth R Westerback
2015-12-01Fix inexplicable use of 'disk' instead of 'disk.name' when trying toKenneth R Westerback
2015-11-19Reduce overburden of unnecessary #include's. Note that param.h isKenneth R Westerback
2015-11-14Since -l is ignored if -c/-h/-s are specified, make that combinationKenneth 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-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-27Wrap some annoying long lines.Kenneth 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-31Whitespace rectification.Kenneth R Westerback
2014-03-20Add back various #includes of err.h, unistd.h, ctype.h, ioctl.h toKenneth R Westerback
2014-03-17Nuke pointless blank lines, defines, comments and casts. EliminateKenneth R Westerback
2014-03-17Un-revert, being careful to not break snap building. Add paranoia checkKenneth R Westerback
2014-03-14Revert last -- broke building snaps.Kenneth R Westerback
2014-03-13Merge 'struct DISK_metrics' and 'struct disk' into one, since we don'tKenneth R Westerback
2014-03-09Instead of passing around 'char buf[DEV_BSIZE]' buffers, pass aroundKenneth R Westerback
2014-03-07Relieve the code of an overburden of unnecessary typedefKenneth R Westerback
2013-03-21more substantial include cleanupTheo de Raadt
2012-07-11MBR can't handle the truth.Kenneth R Westerback
2011-07-05Add DIOCGPDINFO to rxioctl(), as a synonym for DIOCGDINFO, the lastKenneth R Westerback
2010-06-30Make 'fdisk -i' start the OpenBSD partition on a power of 2 512-byteKenneth R Westerback
2010-05-18dont let sys/ioctl.h imply that you get the ioctls in dkio.h. thisDavid Gwynne
2009-02-08Eliminate excessive verbiage for 'fdisk -i' and 'fdisk -u'. EspeciallyKenneth R Westerback
2007-04-27Remove unneeded #include's, as already done for disklabel. CPU_BIOSKenneth R Westerback
2007-04-26Eliminate CPU_BIOS from userland and wd(4) by always using the BIOSKenneth R Westerback
2006-12-10Read/write device sectors rather than assuming sector size ==Kenneth R Westerback