aboutsummaryrefslogtreecommitdiff
path: root/sbin/bsdlabel
Commit message (Collapse)AuthorAgeFilesLines
* Remove deprecated GEOM classesConrad Meyer2019-08-131-35/+2
| | | | | | | | | | | | | | Follow-up on r322318 and r322319 and remove the deprecated modules. Shift some now-unused kernel files into userspace utilities that incorporate them. Remove references to removed GEOM classes in userspace utilities. Reviewed by: imp (earlier version) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D21249 Notes: svn path=/head/; revision=351001
* Move disktab to sbin/bsdlabel/Brad Davis2018-09-182-0/+205
| | | | | | | | | | This leverages CONFS to handle the install. Approved by: re (blanket, pkgbase), will (mentor) Differential Revision: https://reviews.freebsd.org/D17217 Notes: svn path=/head/; revision=338759
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-1/+3
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* spdx: initial adoption of licensing ID tags.Pedro F. Giffuni2017-11-181-1/+3
| | | | | | | | | | | | | | | | | | | | The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Initially, only tag files that use BSD 4-Clause "Original" license. RelNotes: yes Differential Revision: https://reviews.freebsd.org/D13133 Notes: svn path=/head/; revision=325966
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* sbin: normalize paths using SRCTOP-relative paths or :H when possibleEnji Cooper2017-03-041-1/+1
| | | | | | | | | | This simplifies make logic/output MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314656
* Renumber copyright clause 4Warner Losh2017-02-282-2/+2
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Remove pc98 support completely.Yoshihiro Takahashi2017-01-282-4/+3
| | | | | | | | | I thank all developers and contributors for pc98. Relnotes: yes Notes: svn path=/head/; revision=312910
* Add history section for bsdlabel(8)Sevan Janiyan2016-10-051-2/+7
| | | | | | | | | | | | | http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.3BSD-Tahoe/usr/man/cat8/disklabel.0 Remove tab after space, highlighted by igor PR: 212436 Approved by: bcr (mentor) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8104 Notes: svn path=/head/; revision=306724
* Use NULL instead of 0 for pointers.Marcelo Araujo2016-04-181-1/+1
| | | | | | | | | | strchr(3) will return NULL if the character does not appear in the string. MFC after: 2 weeks. Notes: svn path=/head/; revision=298193
* Explicitly add more files to the 'runtime' package.Glen Barber2016-02-091-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295450
* It's 2015, and some people are still trying to use fdisk and thenEdward Tomasz Napierala2015-09-021-2/+4
| | | | | | | | | | | | | | | | go asking what debug flags to set for GEOM to make it work. Advice them to use gpart(8) instead. Something similar should probably done with disklabel, but I need to rewrite the disklabel examples first. Reviewed by: wblock@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3315 Notes: svn path=/head/; revision=287396
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-272-3/+2
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge head from 7/28Simon J. Gerraty2014-08-192-2/+1
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | Merge head@256284Simon J. Gerraty2013-10-131-3/+3
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=256424
| * | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | mdoc: remove EOL whitespace.Joel Dahl2014-12-291-1/+1
| | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=276360
* | | | Convert sbin/ to LIBADDBaptiste Daroussin2014-11-251-2/+1
| |_|/ |/| | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275030
* | | Remove ia64.Marcel Moolenaar2014-07-072-2/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes: o All directories named *ia64* o All files named *ia64* o All ia64-specific code guarded by __ia64__ o All ia64-specific makefile logic o Mention of ia64 in comments and documentation This excludes: o Everything under contrib/ o Everything under crypto/ o sys/xen/interface o sys/sys/elf_common.h Discussed at: BSDcan Notes: svn path=/head/; revision=268351
* | Sweep man pages replacing ad -> ada.Sergey Kandaurov2013-10-011-3/+3
|/ | | | | | | | | Approved by: re (blackend) MFC after: 1 week X-MFC note: stable/9 only Notes: svn path=/head/; revision=255977
* It seems that libdisk(3) incorrectly sets d_secperunit value.Andrey V. Elsukov2012-04-111-1/+2
| | | | | | | | | Automatically fix it like GEOM_PART_BSD does. MFC after: 1 week Notes: svn path=/head/; revision=234122
* Globally replace u_int*_t from (non-contributed) man pages.Ed Schouten2012-02-121-1/+1
| | | | | | | | | | | | | | The reasoning behind this, is that if we are consistent in our documentation about the uint*_t stuff, people will be less tempted to write new code that uses the non-standard types. I am not going to bump the man page dates, as these changes can be considered style nits. The meaning of the man pages is unaffected. MFC after: 1 month Notes: svn path=/head/; revision=231564
* Spelling fixes for sbin/Ulrich Spörlein2012-01-071-5/+5
| | | | Notes: svn path=/head/; revision=229778
* Replace index() and rindex() calls with strchr() and strrchr().Ed Schouten2012-01-031-2/+2
| | | | | | | | | | | | | The index() and rindex() functions were marked LEGACY in the 2001 revision of POSIX and were subsequently removed from the 2008 revision. The strchr() and strrchr() functions are part of the C standard. This makes the source code a lot more consistent, as most of these C files also call into other str*() routines. In fact, about a dozen already perform strchr() calls. Notes: svn path=/head/; revision=229403
* Use in-label sectorsize to determine position of the label whenMaxim Sobolev2011-12-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | writing label into a file image. The most common use - putting disklabel into ISO file. Before this change the label would always go to the offset 512, while geom_part code expects it to be in the 1st sector (i.e. 2048 incase of ISO). BSD disklabels provide good and lightweight way to logically split livecds. It is non-intrusive as far as ISO9660 goes (both boot-wise and metadata-wise) and completely transparent to anything but BSD, so you can have BSD-specific area appended after regular ISO. And with a little bit of GEOM trickery you can do even more interesting stuff with it. For example we make "hybrid" bootable CDs using this method. We create bootable ISO with kernel and such and append UFS image compressed with UZIP and it works like a charm. We put label based on the offsef of the BSD part into the ISO. The kernel boots off normal ISO9660 part, tastes label attaches it, tastes UZIP, attaches it and finally mounts UFS using GEOM_LABEL. This provides much better way of eliminating waste than doing "crunched" build. MFC after: 1 month Notes: svn path=/head/; revision=229049
* Add missing static keyword.Ed Schouten2011-12-111-1/+1
| | | | | | | | All global variables and functions are marked static. Simply because this is an enum, doesn't mean we can't do so as well. Notes: svn path=/head/; revision=228417
* Fix multi-line comment formatting.Andrey V. Elsukov2011-11-071-1/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=227296
* Add recommendation to use gpart(8) when user tries write disklabelAndrey V. Elsukov2011-11-061-4/+15
| | | | | | | | | or bootcode to already opened provider. MFC after: 1 week Notes: svn path=/head/; revision=227270
* Remove unneeded checks.Andrey V. Elsukov2011-11-061-3/+2
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=227262
* bsdlabel(8) could automatically fill many of disklabel's deprecatedAndrey V. Elsukov2011-11-061-11/+35
| | | | | | | | | | | | | | | | fields, but user could specify some of those fields when edits disklabel with `bsdlabel -e`. But without -A flag these fields might be overwritten with default values from the virgin disklabel. So, don't overwrite such fields if they are not zero. Also add checks to prevent creating disklabel with less than DEFPARTITIONS and more than MAXPARTITIONS partitions. PR: bin/162332 Tested by: Eugene Grosbein MFC after: 1 week Notes: svn path=/head/; revision=227248
* To be in sync with GEOM_PART_BSD limit the maximum number of supportedAndrey V. Elsukov2011-11-061-1/+1
| | | | | | | | | partitions to 20. MFC after: 1 week Notes: svn path=/head/; revision=227231
* Widen fields that display partition offset/length.Ulrich Spörlein2011-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 Notes: svn path=/head/; revision=219449
* Remove dead code in bsdlabel depending on __alpha__Ulrich Spörlein2011-03-102-38/+4
| | | | Notes: svn path=/head/; revision=219448
* Remove bsdlabel test-script that was full of broken assumptions.Ulrich Spörlein2011-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 Notes: svn path=/head/; revision=219447
* Remove bsdlabel.5, which hasn't been installed in over 7 yearsUlrich Spörlein2011-03-103-523/+0
| | | | | | | and contains little more than an out-dated copy of <sys/disklabel.h> Notes: svn path=/head/; revision=219446
* Closing file descriptors when it's doneKevin Lo2010-12-011-0/+2
| | | | Notes: svn path=/head/; revision=216095
* Fix some more warnings found by clang.Rebecca Cran2010-11-221-1/+1
| | | | Notes: svn path=/head/; revision=215704
* Don't attempt to write label with GEOM_BSD based method if the class isJaakko Heinonen2010-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 Notes: svn path=/head/; revision=211873
* MFtbemd:Warner Losh2010-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. Notes: svn path=/head/; revision=211725
* - Check that strtoul(3) succeeds to convert the entire string in a fewJaakko Heinonen2010-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 Notes: svn path=/head/; revision=211342
* - Don't assign the return value from read(2) to a variable of typeJaakko Heinonen2010-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 Notes: svn path=/head/; revision=209614
* Use setresuid/setresgid to drop privilegesKevin Lo2010-05-161-2/+8
| | | | Notes: svn path=/head/; revision=208132
* Switch the default WARNS level for sbin/ to 6.Ruslan Ermilov2009-10-191-0/+1
| | | | | | | Submitted by: Ulrich Spörlein Notes: svn path=/head/; revision=198236
* Remove the dependency on the kernel -- in particular the gctl request toMarcel Moolenaar2009-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) Notes: svn path=/head/; revision=196383