summaryrefslogtreecommitdiffstats
path: root/sbin/bsdlabel
Commit message (Collapse)AuthorAgeFilesLines
* Widen fields that display partition offset/length.uqs2011-03-102-6/+5
| | | | | | | | | | This makes partitions between 50GiB and 2TiB (16TiB for 4k drives) print correctly aligned. While here, fix type of secsize. g_sectorsize() returns ssize_t, don't store this in an unsigned var. Bump WARNS to 6. MFC after: 4 weeks
* Remove dead code in bsdlabel depending on __alpha__uqs2011-03-102-38/+4
|
* Remove bsdlabel test-script that was full of broken assumptions.uqs2011-03-102-181/+0
| | | | | | | - the default label now includes an a: partition by default - the c: partition is no longer exported via devfs - writing of the labels usually works in all cases, though the script assumes half of them have to fail
* Remove bsdlabel.5, which hasn't been installed in over 7 yearsuqs2011-03-103-523/+0
| | | | and contains little more than an out-dated copy of <sys/disklabel.h>
* Closing file descriptors when it's donekevlo2010-12-011-0/+2
|
* Fix some more warnings found by clang.brucec2010-11-221-1/+1
|
* Don't attempt to write label with GEOM_BSD based method if the class isjh2010-08-271-1/+32
| | | | | | | | | | | not available. This improves error reporting when bsdlabel(8) is unable to open a device for writing. If GEOM_BSD was unavailable, only a rather obscure error message "Class not found" was printed. PR: bin/58390 Reviewed by: ae Discussed with: marcel MFC after: 1 month
* MFtbemd:imp2010-08-231-1/+1
| | | | | Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want to test of all the CPUs of a given family conform.
* - Check that strtoul(3) succeeds to convert the entire string in a fewjh2010-08-151-7/+14
| | | | | | | | places. - In getasciilabel(), set the disk type only when a valid type is given. PR: bin/86765 MFC after: 2 weeks
* - Don't assign the return value from read(2) to a variable of typejh2010-06-301-6/+8
| | | | | | | | | | int. - Use errx(3) instead of err(3) to print the error message on short reads in readlabel(). errno won't be set on short reads which can easily occur here due to the fixed size read request. PR: 144307 Reviewed by: bde
* Use setresuid/setresgid to drop privilegeskevlo2010-05-161-2/+8
|
* Switch the default WARNS level for sbin/ to 6.ru2009-10-191-0/+1
| | | | Submitted by: Ulrich Spörlein
* Remove the dependency on the kernel -- in particular the gctl request tomarcel2009-08-191-18/+23
| | | | | | | | | the GEOM_BSD class -- to translate the absolute offsets in the label to relative ones. This makes bslabel(8) work correctly with GEOM_PART and also when the BSD label is nested under arbitrary partitioning schemes. Inspired by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> Approved by: re (kib)
* o One more s/gpt/gpart/.maxim2008-11-051-1/+1
|
* o Replace Xr to gpt(8) which is gone by gpart(8).maxim2008-11-051-1/+1
|
* - A call to close(2) might overwrite errno and thus give a wrong error messagelulf2008-09-301-1/+2
| | | | | | | on g_providername failure. Suggested by: pjd Approved by: pjd (mentor)
* - Improve error message given on g_providername call failure.lulf2008-09-301-1/+1
| | | | | | - While there, make error messages consistent with the rest. Approved by: kib (mentor)
* Add missing library dependencies.ru2008-09-231-2/+2
| | | | | PR: bin/127573 Submitted by: Eygene Ryabinkin
* - Make bsdlabel use libgeom to determine provider name, device path, the medialulf2008-09-181-22/+40
| | | | | | | | | size and the sector size. - Fix a bug where bsdlabel would try to read a regular file using the geom_bsd class. Quick review by: phk Approved by: pjd (mentor)
* Remove comment about "-r" flag from readlabel. "-r" is a no-op.rodrigc2008-03-231-1/+0
| | | | | | The is comment is left over from the old disklabel command. Reviewed by: phk
* Allow bsdlabel to operate on labels that have at most 26 partitionsmarcel2007-12-091-3/+5
| | | | | by virtue of there not being any (lower-case) letters avaliable for more partitions.
* Remove redundant whitespace.remko2007-12-081-1/+1
| | | | Noticed by: brueffer
* Attempt to describe the ''auto'' type a bit better in the defaultremko2007-12-081-2/+3
| | | | | | | | | section (if nothing had been specified, or if the auto type had been specified, a default layout is used). PR: docs/116047 Submitted by: Ian Smith <smithi at nimnet dot asn dot au> Minor modifications by me.
* - Fix markup.ru2006-12-291-42/+44
| | | | | | | | | - Somewhat improve wording. - Change the layout of the EXAMPLES section so that descriptions come before example, as in most other manpages. - Fix a bad example that edits a label using a `c' partition.
* o '-s' flag was killed in rev. 1.75. Clean getopt(3).maxim2006-10-201-1/+1
| | | | | | PR: bin/104616 Submitted by: Oliver Fromme MFC after: 1 week
* - Don't mention (wrong) defaults for FFS file system parameters,ru2006-10-131-20/+11
| | | | | | | | | | | replace them with references to newfs(8) which documents them. - Remove mentions of LFS support for which was retired in 1998. - Regenerate an example output. PR: docs/84913 MFC after: 3 days
* Fix utility's short description.ru2006-10-121-1/+1
| | | | | | PR: docs/84467 Submitted by: Gary W. Swearingen MFC after: 3 days
* Markup fixes.ru2006-09-181-1/+1
|
* Remove alpha left-overs.ru2006-08-221-2/+1
|
* Explain why the first partition should start at offset 16.pjd2006-03-081-0/+2
| | | | Requested by: hrs
* Fix evil examples - first partition should start at offset 16.pjd2006-03-041-5/+5
| | | | MFC after: 3 days
* -mdoc sweep.ru2005-11-181-6/+3
|
* Clarify wording for -m flag.rodrigc2005-09-171-2/+12
| | | | PR: docs/84704
* Attempt to improve the logic for automatically sizing partitionsiedowse2005-08-141-5/+62
| | | | | | | | | | | | to take into account the new default of starting the first partition after the boot blocks instead of at sector 0. If you used automatic sizing when the first partition did not start at 0, you would get an error that the automatically sized partition extended beyond the end of the disk. Note that there are probably still many more complex cases where automatic sizing and placement will not work (e.g. non-contiguous or out of order partitions).
* Scheduled mdoc(7) sweep.ru2005-01-101-2/+7
|
* Fix the derivation of the GEOM name from the specified device name byrse2005-01-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | complementing the existing special case of a not existing /dev prefix with the recognition of an already existing /dev prefix. This implicitly solves the following two issues related to working on GEOM devices /dev/foo/bar (which have the GEOM provider name "foo/bar") with the expected commands like "bsdlabel /dev/foo/bar": 1. the error "Geom not found" when trying to write or edit the BSD label (because previously the incorrect GEOM name "bar" instead of "foo/bar" was derived from "/dev/foo/bar"). 2. the multiple times reported "magically introduced" partition offset of 63 blocks and the resulting errors like "partition extends past end of unit" and "partition c doesn't start at 0!". This implicitly resulted because bsdlabel(8) determines the "MBR offset" via GEOM and (intentionally) silently falls back to an offset of 0 if it could not be queried (which is the case if the name was incorrectly derived). Usually (at least on PCs) the offset for the first slice is 63 blocks and bsdlabel(8) automatically subtracts them from the absolute offsets in the read on-disk BSD label, resulting in the display of an effective offset of 0. If the GEOM query fails, the assumed offset of 0 is subtracted and an incorrect effective offset of 63 is displayed and tried to be worked upon. Reviewed by: pjd MFC after: 1 week
* The disk labels generated by bsdlabel can no address more thanbrooks2004-09-092-7/+22
| | | | | | | | | | | 0xffffffff sectors. Document this limit and avoid installing bogus labels on disks with more sectors. Allowing the installation of labels addressing as much of the disk as possiable may be a useful addition in some situations, but this was easy to implement and should reduce confusion. PR: bin/71408
* The multiplier prefix is actually a multiplier suffix.des2004-08-091-1/+1
|
* Use fallthrough to simplify the multiplier logic; optimistically adddes2004-08-081-9/+14
| | | | | support for the T multiplier; improve the error message for unrecognized multipliers.
* Fix some whitespace issues, and move a curly brace out of an #ifdef todes2004-08-081-13/+14
| | | | avoid confusing auto-indenting editors.
* Assorted markup, grammar, and spelling fixes.ru2004-05-171-9/+7
|
* Remove advertising clause from University of California Regent's license,markm2004-04-093-12/+0
| | | | | | per letter dated July 22, 1999. Approved by: core, imp
* Implement a '-f' flag to teach bsdlabel to work on files instead ofluigi2004-03-302-13/+52
| | | | disk partitions.
* When installing boot blocks into an Alpha BSD label, setup the location,jhb2004-03-151-0/+10
| | | | | | | | length, and flags fields at the end of the SRM boot sector so that SRM can find the bootstrap code. This fixes bsdlabel -m alpha to generate bootable disklabels. Reviewed by: phk
* '-DPC98' is not needed.nyan2004-01-111-4/+0
|
* Only automatically create an 'a' partition when there is nothingphk2003-10-181-4/+22
| | | | but a 'c' partition.
* Remove the hardcoded default block/frag/cpg values from bsdlabeliedowse2003-10-051-44/+5
| | | | | | | | | and the logic for setting them according to the partition size. Instead, unspecified filesystem values are left at 0 so that newfs will use its own defaults. It just caused confusion to have the defaults duplicated in two different places. Reviewed by: phk
* mdoc(7): Properly mark C headers.ru2003-09-101-1/+1
|
* mdoc(7): Use the new feature of the .In macro.ru2003-09-081-1/+1
|
* When we initialize a disk with a virgin label, create also an 'a'phk2003-08-271-0/+4
| | | | | partition which starts after the bootstrap area and fills the entire disk.
OpenPOWER on IntegriCloud