summaryrefslogtreecommitdiffstats
path: root/sbin/geom/core
Commit message (Collapse)AuthorAgeFilesLines
* MFC r267667:sevan2016-10-161-1/+1
| | | | | | | use .Mt to mark up email addresses consistently (part1) PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de>
* MFC r296653: Allow standard commands for "unknown" classes in RESCUE mode.mav2016-03-181-2/+1
| | | | For example, it allows quite useful `geom disk list` command.
* More -Wmissing-variable-declarations fixes.ed2012-10-191-1/+1
| | | | | | | | | | | | | | | | In addition to adding `static' where possible: - bin/date: Move `retval' into extern.h to make it visible to date.c. - bin/ed: Move globally used variables into ed.h. - sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings. - usr.bin/calendar: Remove unneeded variables. - usr.bin/chat: Make `line' local instead of global. - usr.bin/elfdump: Comment out unneeded function. - usr.bin/rlogin: Use _Noreturn instead of __dead2. - usr.bin/tset: Pull `Ospeed' into extern.h. - usr.sbin/mfiutil: Put global variables in mfiutil.h. - usr.sbin/pkg: Remove unused `os_corres'. - usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
* MFgraid/head r217014:mav2011-03-242-42/+161
| | | | | | | | Make `geom XXX list` and `geom XXX status` outputs more consistent: Add -a options to print all geoms, not only ones with providers. Add -g option for `status` to report geom's names, not provider's. Make `status` by default report provider's status (if present), not geom's. Make `status` report consumer's statuses, not only "synchronized" field.
* Rename the generic "CLASS" to the more specific "GEOM_CLASS".obrien2010-12-152-2/+2
| | | | | | While I'm here remove redundancy and inconsistencies. Obtained from: Juniper Networks
* Remove dead code.pjd2010-09-141-15/+6
|
* Remove now unused G_TYPE_ASCNUM.pjd2010-09-142-3/+1
|
* Remove dot which shouldn't be here, as err(3) will attach error messagepjd2010-09-141-1/+1
| | | | at the end of the string.
* Introduce special G_VAL_OPTIONAL define, which when given in value fieldpjd2010-09-142-3/+4
| | | | | tells geom(8) to ignore it when it is not given and don't try to obtain default value.
* Add G_TYPE_MULTI flag, which when set for the given option, willpjd2010-09-132-6/+40
| | | | | | | allow the option to be specified multiple times. This will help to implement things like passing multiple keyfiles to geli(8) instead of cat(1)ing them all into stdin and reading from there using one '-k -' option.
* - Remove gc_argname field. It was introduced for gpart(8), but if Ipjd2010-09-132-37/+19
| | | | | | | understand everything correctly, we don't really need it. - Provide default numeric value as strings. This allows to simplify a lot of code. - Bump version number.
* - Allow to specify value as const pointers.pjd2010-09-132-16/+18
| | | | - Make optional string values always an empty string.
* o List MOUNTVER and SCHED classes. X-ref gsched(8). Bump Dd.maxim2010-09-011-1/+6
| | | | | PR: docs/149925 Submitted by: arundel
* expand_number(3) takes a uint64_t * now; intmax_t was never correctdes2010-08-191-1/+1
| | | | | | except by accident. MFC after: 3 weeks
* Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki whilejoel2010-08-161-1/+1
| | | | | | translating these manual pages. Minor corrections by me. Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
* Fix typos and spelling mistakes.joel2010-08-061-1/+1
|
* Remove G_TYPE_ASCLBA type and replace it with G_TYPE_STRING in gpart.ae2010-06-212-91/+1
| | | | | | | | | | | | | | | Move code that converts params from humanized numbers to sectors count to subr.c and adjust comment. Add post-processing for "size" and "start offset" params in gpart, now they are properly converted to sectors count with known sector size that can be greater that 512 bytes. Also replace "unsigned long long" type to "off_t" for unify code since it used for medium size in libgeom(3) and DIOCGMEDIASIZE ioctl. PR: bin/146277 Reviewed by: marcel (previous version) Approved by: kib (mentor) MFC after: 1 month
* Also output stripeoffset for consumer even if stripesize is zero, whiledelphij2010-01-181-1/+1
| | | | | | stripeoffset is non-zero. Pointed out by: mav
* Stripe offset may be usable even without stripe size known,delphij2010-01-171-1/+1
| | | | | | so give the output when either is non-zero. Suggested by: mav
* Expose stripe offset and stripe size through libgeom and geom(8) userlanddelphij2010-01-171-0/+8
| | | | | | utilities. Reviewed by: pjd, mav (earlier version)
* Add gmountver, disk mount verification GEOM class.trasz2010-01-161-0/+1
| | | | | | | | Note that due to e.g. write throttling ('wdrain'), it can stall all the disk I/O instead of just the device it's configured for. Using it for removable media is therefore not a good idea. Reviewed by: pjd (earlier version)
* Add manual page for gcache(8).trasz2010-01-031-1/+1
|
* Update copyright years.pjd2009-09-061-1/+1
|
* For any given subcommand allow to specify multi-line usage (separated by \n).pjd2009-09-061-2/+12
| | | | Submitted by: Mel Flynn
* Allow humanized numbers for LBAs, as well as partition indices formarcel2009-06-072-12/+111
| | | | | | gpart(8). LBAs in particular are ugly. The ganularity is a sector, but users expect byte granularity when specifying the size or offset with a SI unit. Handle LBAs specially to deal with this.
* Add links to libgeom(3) where appropriate.trasz2009-05-191-0/+1
|
* - Use a separate pointer to the allocated memory for freeing, as strsep maylulf2009-02-021-3/+3
| | | | | | | | | | modify the pointer argument passed to it. This triggered an assert in malloc when a geom command being run under the livefs environment. PR: bin/130632 Submitted by: Dimitry Andric <dimitry -at- andric.com> Pointy hat to: me MFC after: 2 days
* Replace checks for RESCUE in sources with checks for STATIC_GEOM_CLASSESmarcel2008-06-041-5/+5
| | | | | | and define STATIC_GEOM_CLASSES when building the rescue binary. This way geom can more easily be part of other crunched binaries, as it requires only a Makefile change.
* Make it possible to build glabel into rescue geom(8) utility.delphij2008-03-051-0/+5
| | | | | Ok'ed by: marcel No objection: -current@
* Add info about few missing GEOM classes that use geom(8).pjd2008-03-051-1/+13
|
* - Update geom(8) to explain that GEOM_LIBRARY_PATH can take a comma-separatedlulf2008-02-051-0/+1
| | | | | | | list of paths. Approved by: pjd (mentor) MFC after: 2 days
* - Make geom commands handle multiple library paths in the GEOM_LIBRARY_PATHlulf2008-02-041-11/+31
| | | | | | | environment variable using ':' as a separator. Approved by: pjd (mentor) MFC after: 3 days
* Allow building of a special rescue version of geom thatmarcel2007-11-041-1/+17
| | | | has a subset of the classes compiled-in.
* Bring in the GEOM Virtualisation class, which allows to create huge GEOMpjd2007-09-231-1/+4
| | | | | | | | | providers with limited physical storage and add physical storage as needed. Submitted by: Ivan Voras Sponsored by: Google Summer of Code 2006 Approved by: re (kensmith)
* For arguments declared as numbers always use expand_number(3).pjd2007-09-211-3/+1
| | | | | | | | | | | | | | This allows to use numbers in human-readable form in many geom(8) utilities. Such a simple change and makes live so much nicer. Some examples: gstripe label -s 16k gmirror label -s 4k gnop create -o 1g -s 128m -S 2k gjournal label -s 2g geli label -i 128k -s 4k Approved by: re (kensmith)
* Use 'val' function argument instead of 'optarg' global variable.pjd2007-09-211-2/+2
| | | | | | | This doesn't fix any real bug, because in those tw ocases we always passed 'optarg' as 'val'. Approved by: re (kensmith)
* Fix the construction of the gctl_req that got broken by mymarcel2007-05-171-1/+3
| | | | | | | | | | | | previous commit and that introduced optional parameters. Existing classes (like geli(8)) use empty strings by default and expect the parameter to be passed to the kernel as such. Also, the default value of a string argument can be NULL. Fix both cases by making the optional parameter conditional upon gc_argname being set and making sure to test for NULL before dereferencing the pointer. Reported by: brueffer@
* Bump G_LIB_VERSION to reflect the ABI change.marcel2007-05-161-1/+1
| | | | Pointed out by: pjd@
* Add gpart(8).marcel2007-05-152-16/+28
| | | | | | | In order to support gpart(8), geom(8) needs to support a named argument. Also, optional string parameters are a requirement. Both have been added to the infrastructure. The former required all existing classes to be adjusted.
* Exit status should be 1 on error.pjd2007-03-231-8/+5
| | | | | | PR: bin/110705 Reported by: Tom Judge MFC after: 2 weeks
* MFp4:pjd2006-09-302-47/+47
| | | | | | | | | | | - Print proper error message when argument is specified twice. Before the change it was detected properly, because of how G_OPT_DONE() macro worked. - Use err(3) functions where appropriate. - Add some assertions. - Bump version number, because G_TYPE_BOOL addition breaks API and ABI. Changes: 98721,98722,98723,101360,106985
* Allocate memory for NUL-termination as well.pjd2006-04-071-1/+1
| | | | MFC after: 2 days
* Remove trailing spaces.pjd2006-02-012-2/+2
|
* Add a reference to geli(8).pjd2006-01-291-0/+3
| | | | MFC after: 3 days
* - The geom(8) utility only uses three types of arguments: string (char *),pjd2005-12-071-53/+20
| | | | | | | | | | | | | | | | | value (intmax_t) and boolean (int). Based on that provide three functions: - gctl_get_ascii() - gctl_get_int() - gctl_get_intmax() - Hide gctl_get_param() function, as it is only used internally in subr.c. - Allow to provide argument name as (fmt, ...). - Assert geom(8) bugs (missing argument is a geom(8) bug). - Clean-up and simplify the code by using new functions and assumtions (no more checking for missing argument). Tested by: regression tests
* Unfortunately dlerror(3) returns string, so there is no clean way topjd2005-08-141-11/+12
| | | | | | | | | | ignore "no such file" errors only, which I wanted to do. Because of this I ignored all other errors on dlopen(3) failure as well, which isn't good. Fix this situation by calling access(2) on library file first and ignore only ENOENT error. This allows to report all the rest of dlopen(3) errors. MFC after: 3 days
* Remove trailing spaces.pjd2005-04-291-1/+1
|
* Empty error buffer is not an error.pjd2005-04-071-1/+1
| | | | MFC after: 3 weeks
* Fix use of uninitialized buf[0].pjd2005-03-221-2/+2
| | | | | Reported by: stefanf MFC after: 3 days
* Be sure that class name storaed in 'class_name' is lower case.pjd2005-03-141-0/+3
| | | | MFC after: 1 week
OpenPOWER on IntegriCloud