summaryrefslogtreecommitdiff
path: root/sbin/disklabel
AgeCommit message (Collapse)Author
2017-03-04Allow R (resize auto-partition) after A as well as when started with -A.Otto Moerbeek
This ability was lost in editor.c 1.264; noted by ajacoutot@; ok krw@
2016-12-08move the text describing the % and & units to a better place;Jason McIntyre
diff from jerome frgacic, tweaked by myself ok krw millert
2016-12-03provide missing unit suffixes; from ross l richardsonJason McIntyre
2016-10-06init auto-partition table to zeroes; ok tb@Otto Moerbeek
2016-09-21Remove reference to zaurusFrederic Cambus
OK sthen@
2016-09-04After aligning the cpg field, non ffs partitions were not displayedAlexander Bluhm
aligned anymore. Put one more space in front of the "# none" mount point output. OK otto@
2016-09-02Allow editing cpg in expert mode and align the cpg field properlyOtto Moerbeek
ok krw@
2016-09-01remove sparc reference;Jason McIntyre
2016-09-01remove references to sparcTed Unangst
2016-08-19Start with a default fragsize of 2048, double it for large disks and then capOtto Moerbeek
based on sector size. This avoid too large fragments on 4k disks. Problem noted by David Vasek; ok krw@
2016-08-10armish handled some early-gen arm machines, which required tons ofTheo de Raadt
workarounds. Some of them will soon stand in the way of armv7. Off to the attic you go.
2016-06-19Split readlabel() into two functions, readlabel() and parselabel(), andTheo Buehler
pledge in-between the two funtion calls. The new readlabel() only does a DIOC*DINFO ioctl, making sure the fd points to a disk, while parselabel() does the scary string manipulations. In the makelabel() code path do an early DIOCGDINFO before pledge. This fixes yet another pledge problem (disklabel -w /dev/tty floppy576). Some of this was discussed with beck. ok semarie, earlier version ok deraadt
2016-06-13correct pledge for disklabel -R -[fF]Jonathan Gray
ok tb@
2016-06-01Fix automatic disk allocation based on a template which I broke in theTheo Buehler
previous commit. readlabel() calls editor_allocspace() which will use the default label unless a template was provided beforehand. Thus, call parse_autolabel() before redlabel(). Problem found and fix provided by Mark Patruck, thanks! Fix asap, deraadt@
2016-05-29Refactor and clean up the logic before pledge a bit and fix pledgeTheo Buehler
fallout related to pledge disklabel (e.g. 'disklabel /dev/tty'). - Allow 'disklabel sdN' again for non-root users. - Make sure at least one DIO* ioctl comes before pledge "disklabel" - Fix the op == WRITE logic that broke 'make release' in -r2.217 Based on -r2.17 from beck. ok beck
2016-05-28back out previous; -wAT template vnd0 failsTheo de Raadt
2016-05-28host readlabel() above the pledge so we can avoid pledge violationsBob Beck
when the provided device is not a disk ok tb@
2016-05-28fix crash if filename not providedBob Beck
2016-05-28Hoist the opendev() call before the pledge because it can ioctl() whenBob Beck
the provided path is bogus or not a device. ok deraadt
2016-03-09We are done providing support for the vax.Theo de Raadt
lots of agreement.
2015-12-24tweak auto-allocation description, with and ok jmc@Otto Moerbeek
2015-12-10Remove NULL-checks before free(). ok tb@mmcc
2015-12-01Send solbourne to where the ...........Theo de Raadt
2015-11-25-A needs cflag too. Noted by sthen@ during install.Kenneth R Westerback
2015-11-24Need 'cpath' for op == EDITOR, as '-F' to write out the ascii label inKenneth R Westerback
an arbitrary location is a possibility. Suggested by & ok deraadt@
2015-11-23Use pledge "disklabel" as needed. The theory here is these tools become moreTheo de Raadt
resistant against memory correctup, if a corrupt filesystem is given to them. ok krw
2015-10-17NUMBOOT is dead! Nuke the variables and abstractions that were usedKenneth R Westerback
to build boot blocks. ok miod@
2015-10-16Remove -B from EXAMPLES; reminded by jmc@Miod Vallat
2015-10-15Remove disklabel -B (NUMBOOT) support. All the platforms which used to needMiod Vallat
it are now using MI installboot for that purpose. ok krw@ deraadt@
2015-10-11If only displaying the disklabel (the normal thing to do against potentiallyTheo de Raadt
unknown disks...), after opening & reading the disklabel, pledge "stdio" ok doug
2015-10-05Remove 'landisk' from the comment about NUMBOOT archs. Only oneKenneth R Westerback
NUMBOOT arch is left: Vax.
2015-10-05Remove disklabel -B support on landisk - superseded by MI installboot.Miod Vallat
2015-09-24Remove hppa/hppa64 from comment about NUMBOOT > 0 architectures.Kenneth R Westerback
2015-09-24Expunge VAX SMD special handling that tried to fill up the lastKenneth R Westerback
cylinder of the disk with extra copies of the boot blocks and disklabel. There are no plans to ever support the native SMD controllers that would find this useful. ok miod@
2015-09-24hppa/hppa64 use installboot(8) now, not -B/-b.Kenneth R Westerback
Only vax and landisk left using -B/-b. ok jsing@ miod@
2015-09-10use .In rather than .Fd #includeIngo Schwarze
2015-09-09No need to check !xxboot inside a 'if (!xxboot) ...' block.Kenneth R Westerback
ok otto@ deraadt@
2015-09-08Avoid a SIGSEGV with FGJ malloc.conf flags when a template is used.Todd C. Miller
Found by jsg@. OK jsg@ deraadt@
2015-08-20<stdlib.h> is included, so do not need to cast result fromTheo de Raadt
malloc, calloc, realloc* ok krw millert
2015-08-15Less damned spurious whitespace.Kenneth R Westerback
2015-06-03Do not assume that asprintf() clears the pointer on failure, whichTodd C. Miller
is non-portable. Also add missing asprintf() return value checks. OK deraadt@ guenther@ doug@
2015-05-19improve spacing in disklabel template.Igor Sobrado
2015-05-08Separately track the number of items in alloc_table in a variable. WithStuart Henderson
the changes for handling template files in r1.293, alloc_table became a pointer to an array of structs (rather than the array itself), so nitems(alloc_table) no longer returns the number of elements. As found by sebastia@, autosize would only try the first allocation scheme, so installation would fail on small disks. ok henning@
2015-04-29some fine-tuning in SYNOPSIS, usage, and order of options, with jmcHenning Brauer
2015-04-29g/c unneeded second char * var, ok bennoHenning Brauer
2015-04-29support passing a template file for the auto-allocation to disklabel.Henning Brauer
template gives mountpoints, min-max size ranges and percentage of disk foremost intended for autoinstalls, installer bits to follow soon. with input from many, ok theo
2015-03-17for small mem machines, make sure max does not get smaller thanOtto Moerbeek
min, otherwise the constraint cannot be satisfied; ok deraadt@ okan@
2015-02-28Reduce usage of predefined strings in manpages.Anthony J. Bentley
Predefined strings are not very portable across troff implementations, and they make the source much harder to read. Usually the intended character can be written directly. No output changes, except for two instances where the incorrect escape was used in the first place. tweaks + ok schwarze@
2015-02-07When getopt processing flags, many should be flag=1 instead of flag++Theo de Raadt
ok tedu miod
2015-01-20Adjust <sys/param.h> comments regarding use of use of MAXFRAG, orTheo de Raadt
delete <sys/param.h> if now possible ok guenther