summaryrefslogtreecommitdiffstats
path: root/sbin/disklabel/editor.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Avoid ffs fragsize < sector-size when 'a'dding a partition via thekrw2012-01-171-2/+3
| | | | | | editor. Use logic from calculating fragsize for an auto-allocated partition. Noted when trying to add a small ffs partition to a 4K sector device.
* Change last "#if (NUMBOOT == 1)" to "#if NUMBOOT > 0".krw2012-01-021-2/+2
|
* miod@ reported problems reproducing a 'pre-4K fix' disklabel. So in thekrw2011-12-251-3/+24
| | | | | | | | interest of rope sales allow the 'X'pert to suppress the rounding of partition locations to bsize boundaries. Also mention that such rounding is being done, so as to not surprise the user. ok otto@ a while ago
* Fix negating of unsigned d_secsize. FIRST, cast to signed type,krw2011-12-011-4/+5
| | | | | | | THEN negate. Fixes issues with 'b' and 'k' size suffixes. Make error message more clear while here. Found, and fix provided, by David Imhoff via bugs@. Thanks!
* mark ccd(4) deprecated in a few more placesderaadt2011-10-061-3/+3
|
* Add DIOCGPDINFO to rxioctl(), as a synonym for DIOCGDINFO, the lastkrw2011-07-051-4/+3
| | | | | | | | | place it was missing. Delete now redundant calls to DIOCGDINFO when getting physical disk info in disklabel(8) and fdisk(8). Reminded by a fdisk discussion with Andres Perera on tech@. ok deraadt@
* More non-512-byte sector groundwork. Don't let disklabel hint thatkrw2011-07-051-2/+3
| | | | | | | | | | | | | | | | a ffs frag size can be less than the d_secsize of the disk. Make sure amd64 writedisklabel() puts the disklabel where readdoslabel() will read it. Tweak i386/amd64 installboot/biosboot so sectors are indeed used where sectors are claimed. Lets me fdisk, newfs, mount and installboot onto 2048 and 4096 byte sector devices. Other filesystem utilites will still hold surprises. Note that actually booting from such devices will await BIOSen that acknowledge such devices as bootable. ok guenther@
* Allow for more room for /usr/obj on static linking only archs; ok krw@ deraadt@otto2011-05-241-1/+5
|
* Make /usr/obj a bit bigger, on small disks it ends up just a littleotto2011-05-231-3/+3
| | | | bit too small. ok krw@
* Apply proper rounding for the R command (changing of auto-allocatedotto2011-05-221-3/+5
| | | | partitions); ok krw@
* In addition to relative resizing, allow absolute resizing of partitionsotto2011-05-221-26/+28
| | | | in auto-allocated labels. ok krw@ sthen@
* Add swap partition entries to -F and -f output. man pagekrw2011-04-161-7/+13
| | | | | | | updates to follow. This will simplify install script fstab creation. ok deraadt@
* Add '-F'. Same as '-f' but uses DUIDs when writing the mount pointkrw2011-04-161-53/+60
| | | | | | | | | information to the specified file. After every label write, read the label to get current UID info. Some internal code cleanup with no intended functional change. ok deraadt@
* If an auto-allocation scheme fails because there are not enoughkrw2011-03-051-3/+9
| | | | | | | available partitions (e.g. many spoofed logical partitions) try the next scheme rather than giving up. "sane" deraadt@ ok matthew@
* Every time the user updates the bounds of the OpenBSD area of the disk, either explicitlykrw2011-03-021-2/+6
| | | | | | | | or implicitly, update the start and end sector of the OpenBSD area in the disklabel with DL_SEBEND/DL_SETBSTART. Otherwise the new bounds would not be saved to disk. ok miod@ deraadt@
* If the user screws up adding a partition, don't keep partial bitskrw2011-02-191-2/+2
| | | | | | | | of the partition info around to confuse disklabel, newfs, fsck, etc. From Pedro Martelletto. ok miod@
* stray tabs and spacesmarco2010-12-131-11/+11
|
* When dealing with disklabel UIDs (DUIDs) be specific and consistent withjsing2010-11-241-6/+6
| | | | | | naming. ok krw@
* Print disklabel UIDs using printf/fprintf instead of using the hand rolledjsing2010-09-231-4/+5
| | | | | | uid_print() function. ok krw@
* fix a few warnings. ok jsingtedu2010-08-121-3/+2
|
* Add support for t/T == terabyte units to -E. Prodded by deraadt@.krw2010-08-101-6/+12
| | | | | | Semantically equivalent version ok beck@ millert@ and tested ckeuthe@. "just commit" deraadt@
* Improve the editor prompt for the 'R' (resize) commandderaadt2010-08-091-2/+3
| | | | from otto
* Align FFS filesystem start and end sectors so the start is on akrw2010-07-271-5/+27
| | | | | | | | | | | | | 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.
* make the disklabel editor not crash when pressing ^D in the uid prompthalex2010-06-301-2/+2
| | | | ok krw@
* dont let sys/ioctl.h imply that you get the ioctls in dkio.h. thisdlg2010-05-181-1/+2
| | | | | | | | | | | 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@
* grow /usr/local more at the cost of /home; ok krw@otto2010-05-151-3/+3
|
* set max size of auto allocated /usr/local to 10G; ok espie@ krw@otto2010-05-111-2/+2
|
* Add a new 'i' command to the disklabel interactive editor, allowing thejsing2010-04-281-4/+37
| | | | | | disklabel UID to be changed. ok krw@ marco@
* Recycle unused disklabel fields in order to create a disklabel uniquejsing2010-04-231-37/+1
| | | | | | | identifier, allowing the disk to be identified without relying on the device name. ok deraadt@ krw@ beck@ marco@ todd@
* Remove interactive help for individual disklabel editor commands.lum2010-04-211-157/+7
| | | | | | | 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@
* Some more help text cleanup, from suggestions by krw@lum2010-04-131-25/+28
| | | | ok krw@ jmc@ otto@
* Clean up and make consistent the first sentence of each help entry inlum2010-04-131-85/+77
| | | | | interactive disklabel. Plus realign all lines because of textual changes. ok krw@ jmc@ otto@
* In editor_add(), determine block & frag size base on the the actual fsotto2010-04-041-20/+25
| | | | | size chosen by the user, and not the suggested size; move to bigger blocksize in two steps; ok krw@
* Improve the way we handle spoofed paritions for Resize. Now any autootto2010-03-291-24/+38
| | | | | allocated can be treated. We still check if no non-native partition overlaps the openbsd area, to avoid surprised. ok krw@ lum@
* s/parititon/partition/ in error messagesthen2010-03-251-2/+2
|
* avoid use of uninited var in max_partition_size(); ok krw@otto2010-03-231-2/+2
|
* introducing 'R': interactive command to customize auto allocated labels,otto2010-03-231-9/+134
| | | | | by growing or shrinking them as desired. can use some tweaks, but committing now to be able to work in-tree; ok krw@ lum@
* for big (>500G) partitions, move to bigger bocks and fragments in theotto2010-03-201-7/+13
| | | | | | 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@
* spelling fixes, from Brad Tilley; we will not fix src/sbin/dump/dump.hsobrado2009-12-241-2/+2
| | | | | | | | | 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@
* 4 memory leaks found by parfait; ok millertderaadt2009-11-121-8/+16
|
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-5/+1
| | | | | | | 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
* There is no -F flag, it is -f; spotted by tasm.devil@googlemailderaadt2009-10-011-3/+3
|
* Crank the /usr sizes in the large configurationderaadt2009-08-121-4/+4
| | | | ok krw otto
* move editor_allocspace & mpsave out to extern.h so that disklabel.cmartynas2009-08-071-4/+2
| | | | gets the declarations it uses. ok krw@
* since nitems() is not yet fit for userland consumption, provide itderaadt2009-06-261-2/+6
| | | | | ourselves ok krw
* 'd *' == 'z' == zero_partitions(). Mount point info needs to bekrw2009-06-111-7/+7
| | | | | | | 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@.
* Recycle four ancient fields in the disklabel structure, replacing them withderaadt2009-06-041-60/+5
| | | | | | | | | | | | 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
* remove unused variablechl2009-06-021-3/+2
| | | | ok krw@
* Add '-h' flag, and '*' as a unit specifier for 'p' Editor command.krw2009-06-021-13/+4
| | | | | | | | | 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@
* Always show the start and end of the OpenBSD area in units ofkrw2009-05-311-4/+4
| | | | sectors, not any 'human' unit in force.