summaryrefslogtreecommitdiffstats
path: root/sbin/fdisk/misc.c
AgeCommit message (Expand)AuthorFilesLines
2019-07-03snprintf/vsnprintf return < 0 on error, rather than -1.deraadt1-2/+2
2017-11-16Range check default values so that a range likekrw1-3/+5
2015-11-26When prompting for a GPT partition type, use the partition's current type astim1-2/+2
2015-11-26When prompting for an LBA, show the min and max values in the prompt; OK krw@tim1-2/+3
2015-11-21Bring GPT partition editing into line with MBR partition editingkrw1-3/+5
2015-11-19Reduce overburden of unnecessary #include's. Note that param.h iskrw1-3/+4
2015-11-12Simplify string_from_line(). No functional change.tim1-9/+6
2015-11-12Avoid problems with pathological input during edit operations. i.e. neverkrw1-13/+12
2015-11-03Don't allow the user to enter GPT partition names too large to fitkrw1-7/+7
2015-10-26Add GPT editing. Based on GSOC 2014 work by Markus Muller.krw1-56/+85
2015-10-07Note permissions for the crc32() code adapted from Hacker's Delight.krw1-1/+9
2015-08-27Nuke some trailing whitespace that keeps coming back.krw1-3/+3
2015-03-30Even better -- readsector() and writesector() become DISK_readsector() andkrw1-63/+1
2015-03-29Rename MBR_readsector() and MBR_writesector() to just readsector()krw1-1/+63
2015-03-28Add a simple crc32() implmentation to avoid pulling in libz, whichkrw1-1/+24
2015-03-26Adapt ask_string() from disklabel's getstring(). It will be usedkrw1-3/+34
2015-03-26Allow input/printing/conversion of terabyte sizes. Which GPT partitonskrw1-8/+10
2015-03-26Expand internal representation of partition starting LBA and sizekrw1-10/+15
2015-03-16Stop passing around a pointer to the stack variable 'disk' in main().krw1-3/+3
2015-03-14Whitespace & KNF tweaks. Change functions whose return values arekrw1-1/+2
2015-03-14Switch all the license blocks to the standard OpenBSD/ISC license.krw1-20/+11
2014-03-31Nuke [get|put][short|long] and just use letoh[16|32] andkrw1-37/+1
2014-03-20Add back various #includes of err.h, unistd.h, ctype.h, ioctl.h tokrw1-1/+4
2014-03-20Add back #include <stdlib.h> so strtod() works better. Fixes fdisk onkrw1-1/+2
2014-03-17Nuke pointless blank lines, defines, comments and casts. Eliminatekrw1-6/+6
2014-03-17Un-revert, being careful to not break snap building. Add paranoia checkkrw1-2/+2
2014-03-14Revert last -- broke building snaps.krw1-2/+2
2014-03-13Merge 'struct DISK_metrics' and 'struct disk' into one, since we don'tkrw1-2/+2
2014-03-10No need to pass the name of the command to the function that iskrw1-6/+6
2014-03-09Instead of passing around 'char buf[DEV_BSIZE]' buffers, pass aroundkrw1-6/+3
2014-03-07Relieve the code of an overburden of unnecessary typedefkrw1-3/+3
2013-11-22Whole bunch of (unsigned char) casts carefully added for ctype calls.deraadt1-2/+2
2013-03-21more substantial include cleanupderaadt1-2/+3
2012-08-14remove unused variablechl1-2/+2
2012-07-11Simplify guts and calling of getuint(). Eliminate a useless 'help'krw1-70/+89
2012-07-09We always want to do unit conversions. So flags parameter of getuint()krw1-34/+29
2012-07-09I want some of what kjell was smoking 10 years ago when he addedkrw1-24/+1
2012-07-09Use strtonum() instead of strtol() inside ask_num(). Many overflowskrw1-13/+10
2012-07-08set_pid() does not need prompt string, low or high parameters. Thesekrw1-3/+5
2012-07-08Split out an ask_pid() function rather than over-parameterizing thekrw1-13/+47
2010-07-04make ^D handling consistant in fdisk by just bailing out instead ofhalex1-9/+3
2009-07-24properly sanitize the default value in ask_num(...)halex1-9/+8
2009-04-07Fix the default value to be between low/high range. Thanks forweingart1-2/+7
2008-12-01Back out previous; it broke specifying paritions sizes with decimals,ray1-13/+18
2008-12-01Check for invalid integers passed getuint(); instead of getuint()ray1-18/+13
2006-11-08add a -y flag, for non-interactive usederaadt1-1/+5
2006-10-24Check strlen(buf) to be > 0 before accessing buf[strlen(buf)-1].moritz1-3/+9
2005-11-21Replace default DEV_BSIZE sector conversion factor with disklabel'skrw1-7/+10
2004-09-18some delinting; ok ottoderaadt1-1/+10
2003-07-29spacesderaadt1-3/+3