summaryrefslogtreecommitdiff
path: root/sbin/fdisk/cmd.c
AgeCommit message (Expand)Author
2015-11-19Reduce overburden of unnecessary #include's. Note that param.h isKenneth R Westerback
2015-11-18Change #include <memory.h> to #include <string.h>Kenneth R Westerback
2015-11-13Move from opening/closing disk for every i/o to opening the disk onceKenneth 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-04-02Don't printf("offset: ...) before every call to MBR_print(). Do itKenneth R Westerback
2015-03-26Adapt ask_string() from disklabel's getstring(). It will be usedKenneth R Westerback
2015-03-26Expand internal representation of partition starting LBA and sizeKenneth R Westerback
2015-03-19When zapping the GPT at the end of the disk, don't use disk.sizeKenneth R Westerback
2015-03-18Stop passing around little used 'struct mbr tt' parameter. JustKenneth R Westerback
2015-03-17Stop passing around little used and superfluous 'offset' parameter.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
2015-02-10If 'write' is issued after a 'reinit' command, and the MBR to beKenneth R Westerback
2015-02-09Rename 'm_flag' to 'e_flag' since it's '-e' that sets it. RenameKenneth R Westerback
2014-03-31Use return value constants to make effects clearer than the useKenneth 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-13Remove some lint -- ARGSUSED.Kenneth R Westerback
2014-03-13Merge 'struct DISK_metrics' and 'struct disk' into one, since we don'tKenneth R Westerback
2014-03-10No need to pass the name of the command to the function that isKenneth 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
2013-03-21I don't feel great about adding an include for <sys/param.h>, but I feelTheo de Raadt
2012-07-11Simplify guts and calling of getuint(). Eliminate a useless 'help'Kenneth R Westerback
2012-07-09We always want to do unit conversions. So flags parameter of getuint()Kenneth R Westerback
2012-07-09I want some of what kjell was smoking 10 years ago when he addedKenneth R Westerback
2012-07-09Make 'swap' command work like fdisk(8) says -- you must supply two validKenneth R Westerback
2012-07-09Use strtonum() instead of strtol() inside ask_num(). Many overflowsKenneth R Westerback
2012-07-08set_pid() does not need prompt string, low or high parameters. TheseKenneth R Westerback
2012-07-08Split out an ask_pid() function rather than over-parameterizing theKenneth R Westerback
2012-07-08Call Xsetpid() to edit the partition type from Xedit() rather thanKenneth R Westerback
2012-07-08Nuke useless EDIT() #define in Xsetpid.Kenneth R Westerback
2012-07-08Replace tricker atoi() and hand rolled parsing with strsep() andKenneth R Westerback
2012-07-07Replace atoi() with strtonum() where it's easy. Make related errorKenneth R Westerback
2012-04-25Before writing it to disk, warn the user if their new MBR containsMatthew Dempsky
2011-11-11A zero-length partition is a non-partition, so reject a partitionKenneth R Westerback
2010-07-02on error, getuint() will return UINT_MAX. Instead of actually usingAlexander Hall
2009-12-24spelling fixes, from Brad Tilley; we will not fix src/sbin/dump/dump.hIgor Sobrado
2009-02-08Eliminate excessive verbiage for 'fdisk -i' and 'fdisk -u'. EspeciallyKenneth R Westerback
2006-07-27Add checks to each write(2) attempt and try to keep fdisk in aRay Lai
2006-07-18Fix a typo, paritition -> partition.Marc Balmer
2006-04-26man page is gzip'd, should store as unsigned char array.Theo de Raadt
2005-03-29Allow setting of partition flag with an optional explicit value. PR 4143.Otto Moerbeek
2005-01-19add a swap primitive; ok various, will be polished after by tomTheo de Raadt