summaryrefslogtreecommitdiff
path: root/sbin/disklabel
AgeCommit message (Collapse)Author
2010-08-08make disklabel -p slightly nicer by accepting capital letters and printingTed Unangst
a more useful error message for invalid ones. ok deraadt
2010-08-03Group string comparisons and supply more helpful comments. AddKenneth R Westerback
"total sectors" to "boundstart" and "boundend" in the list of fields that are left alone during a RESTORE operation. ok deraadt@
2010-08-03Start with the default label when RESTORE'ing a saved ascii label.Kenneth R Westerback
This ensures that all physical fields are filled in with current values. Lack of values (boundstart, boundend in particular) noted by ray@. ok deraadt@
2010-07-27Align FFS filesystem start and end sectors so the start is on aKenneth R Westerback
bsize boundary and the end fills up the last bsize chunk. Don't change the start sector if it is the first sector of the OpenBSD portion of the disk. Don't attempt to align on SUN_CYLCHECK architectures. They are attempting a different alignment. This is an attempt to ensure that FFS i/o's are aligned for optimal performance on newer disks that lie about their sector size.
2010-07-27Nuke 'sectoffset'. A stub variable no longer used except to supplyKenneth R Westerback
the value 0 to one function call. Use 0 there, eliminate the variable and the pointless verbose verbiage that always displayed the same value. ok deraadt@ matthew@
2010-06-30allow uppercase A-F in the uid inputAlexander Hall
ok krw@ jsing@
2010-06-30make the disklabel editor not crash when pressing ^D in the uid promptAlexander Hall
ok krw@
2010-05-18dont let sys/ioctl.h imply that you get the ioctls in dkio.h. thisDavid Gwynne
gets rid of #include <sys/dkio.h> in sys/ioctl.h and adds #include <sys/dkio.h> to the places that actually want and use the disk ioctls. this became an issue when krw@'s X build failed when he was testing a change to dkio.h. tested by krw@ help from and ok miod@
2010-05-15grow /usr/local more at the cost of /home; ok krw@Otto Moerbeek
2010-05-11set max size of auto allocated /usr/local to 10G; ok espie@ krw@Otto Moerbeek
2010-04-28Add a new 'i' command to the disklabel interactive editor, allowing theJoel Sing
disklabel UID to be changed. ok krw@ marco@
2010-04-28Move the UID printing/parsing code into separate functions and avoid usingJoel Sing
sscanf(). ok marco@
2010-04-28When restoring a disklabel do not restore the uid. Let the kernel allocateJoel Sing
a new uid instead. ok krw@ marco@
2010-04-28Teach disklabel how to print and parse UIDs.Joel Sing
ok deraadt@ krw@
2010-04-23Recycle unused disklabel fields in order to create a disklabel uniqueJoel Sing
identifier, allowing the disk to be identified without relying on the device name. ok deraadt@ krw@ beck@ marco@ todd@
2010-04-21zap trailing whitespace;Jason McIntyre
2010-04-21Remove interactive help for individual disklabel editor commands.lum
These were in effect a duplication of the man page contents. The man page has been updated to include any small ommissions that were in the interactive help. Man page tweaks/suggestions from jmc@ and deraadt@. ok jmc@ deraadt@ krw@ otto@
2010-04-14neccessary -> necessary;Jason McIntyre
2010-04-14Remove reference to a limitation of 8GB that does not exist anymore.lum
ok krw@ otto@
2010-04-13Some more help text cleanup, from suggestions by krw@lum
ok krw@ jmc@ otto@
2010-04-13Clean up and make consistent the first sentence of each help entry inlum
interactive disklabel. Plus realign all lines because of textual changes. ok krw@ jmc@ otto@
2010-04-04In editor_add(), determine block & frag size base on the the actual fsOtto Moerbeek
size chosen by the user, and not the suggested size; move to bigger blocksize in two steps; ok krw@
2010-03-29Improve the way we handle spoofed paritions for Resize. Now any autoOtto Moerbeek
allocated can be treated. We still check if no non-native partition overlaps the openbsd area, to avoid surprised. ok krw@ lum@
2010-03-25s/parititon/partition/ in error messageStuart Henderson
2010-03-23tweak previous; ok ottoJason McIntyre
2010-03-23avoid use of uninited var in max_partition_size(); ok krw@Otto Moerbeek
2010-03-23introducing 'R': interactive command to customize auto allocated labels,Otto Moerbeek
by growing or shrinking them as desired. can use some tweaks, but committing now to be able to work in-tree; ok krw@ lum@
2010-03-20for big (>500G) partitions, move to bigger bocks and fragments in theOtto Moerbeek
label. newfs wil pick that up, and create a filesystems for which you actually have a chanche to run fsck successfuly and before your hair falls out; ok krw@ beck@ deraadt@
2010-03-18loongson needs fdisk in -DSEEALSOOtto Moerbeek
2009-12-24spelling fixes, from Brad Tilley; we will not fix src/sbin/dump/dump.hIgor Sobrado
as neither arrayified not arrayfied exist -- sanctioned dictionaries like Merriam-Webster ones suggest a few alternatives (e.g., arrayed), however these made up words are easy to understand and we are not certain that current ones are not ok. ok jmc@
2009-11-124 memory leaks found by parfait; ok millertTheo de Raadt
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2009-10-01There is no -F flag, it is -f; spotted by tasm.devil@googlemailTheo de Raadt
2009-09-15also ignore boundaries when checking if the disklabel was modified when -eFederico G. Schwindt
is used. discussed and ok krw@
2009-08-12Crank the /usr sizes in the large configurationTheo de Raadt
ok krw otto
2009-08-07move editor_allocspace & mpsave out to extern.h so that disklabel.cMartynas Venckus
gets the declarations it uses. ok krw@
2009-07-27add a section on automatic disk allocation, to give an idea ofJason McIntyre
how -A and A will carve up your disk; help/ok krw deraadt
2009-06-26since nitems() is not yet fit for userland consumption, provide itTheo de Raadt
ourselves ok krw
2009-06-11'd *' == 'z' == zero_partitions(). Mount point info needs to beKenneth R Westerback
cleared in both cases. So just do it inside zero_partitions() since we are looping over all the partitions there anyway. Should fix an install corner case discovered by todd@.
2009-06-04Recycle four ancient fields in the disklabel structure, replacing them withTheo de Raadt
bounds information, ie. the zone of the disk that OpenBSD can use. Have each pre-disklabel parser (MBR, DPME, or per-arch MD disklabel parsers) figure out this area and pass it up to userland. Then, delete all the same disk parsing code from disklabel(8) since the kernel passes it up. Lots and lots of - signs in the disklabel(8) code. Tested on as many platforms as possible, the fallout will be repaired as time goes on. To test, use disklabel -d <drive> and validate that the bounds do not overlap any boot blocks. This same information is used by disklabel -A... OK for the concept from krw, miod, and drahn
2009-06-02remove unused variableCharles Longeau
ok krw@
2009-06-02Add '-h' flag, and '*' as a unit specifier for 'p' Editor command.Kenneth R Westerback
Both cause partition sizes to be displayed using a human readable format with the units automatically chosen by looking at the smallest partition in the disk label. Remove forceable humanization in 'A' code and use '-h' in install scripts. Prodded & ok deraadt@, verbiage tweaks from jmc@
2009-05-31Always show the start and end of the OpenBSD area in units ofKenneth R Westerback
sectors, not any 'human' unit in force.
2009-05-31'-d' works everywhere now. And it ignores the OpenBSD disk label,Kenneth R Westerback
not OpenBSD partitions.
2009-05-31Never 'humanize' the sector offsets of partitions or 'total sectors'.Kenneth R Westerback
If we are humanizing then add a comment to 'total sectors' line rather than replacing 'total sectors' with a new header. Suggestion and ok deraadt@
2009-05-29Clean up logic around exit values. Make getasciilabel() return 0Kenneth R Westerback
for success. Fix a couple of bugs where errors in checklabel() got lost. Make Editor 'q' and 'x' commands exit with 0 (ok) rather than 1. i.e. non-zero exit value now reserved for failure, not a decision to leave the disklabel unchanged. This allows the install script to use the exit value to catch failures to write a disklabel.
2009-05-17No need to write mount point info twice in 'w' command in Editor.Kenneth R Westerback
2009-05-17Write out mountpoint info in writelabel() after label successfullyKenneth R Westerback
written, rather than every time editor_alloc() is called. Respect '-n' for mountpoint info. Reduces surprise appearance of files when you 'x' out of Editor. "my sunglasses did not go dark" deraadt@
2009-05-17Initialize mountpoints[] when going past again:, since aKenneth R Westerback
smaller alloc table will have fewer mountpoints and the extras cause confusion. And any info from '/etc/fstab' that was loaded into mountpoints needs to be zapped too. Noticed by jim@
2009-05-13The auto-allocator does not remember to increase the d_npartitions fieldTheo de Raadt
as it adds partitions. What the heck. Set it to MAXPARTITIONS. That is the new way we are treating d_npartitions everywhere in any case. It is the max a label can support. partitions which are not there mark themselves off. ok krw