Commit Graph

101 Commits

Author SHA1 Message Date
Simon J. Gerraty
ccfb965433 Add META_MODE support.
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
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Baptiste Daroussin
13eb765f2d Convert sbin/ to LIBADD
Reduce overlinking
2014-11-25 11:23:12 +00:00
Simon J. Gerraty
9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Mark Felder
e2d52f146f Fix geom's "usage" generation to not fabricate usage/help output for any
imaginary class we give it.

Differential Revision:	https://reviews.freebsd.org/D1150
Submitted by:	homerj
Approved by:	pjd
2014-11-17 15:19:57 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Baptiste Daroussin
bd0891ceb3 use .Mt to mark up email addresses consistently (part1)
PR:		191174
Submitted by:	Franco Fichtner  <franco@lastsummer.de>
2014-06-20 09:40:43 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Ed Schouten
bf70becee6 More -Wmissing-variable-declarations fixes.
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'.
2012-10-19 14:49:42 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Alexander Motin
83d165c127 MFgraid/head r217014:
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.
2011-03-24 19:11:05 +00:00
David E. O'Brien
8494b7389a Rename the generic "CLASS" to the more specific "GEOM_CLASS".
While I'm here remove redundancy and inconsistencies.

Obtained from: Juniper Networks
2010-12-15 23:45:12 +00:00
Pawel Jakub Dawidek
628ec6d344 Remove dead code. 2010-09-14 20:54:22 +00:00
Pawel Jakub Dawidek
fa5383a260 Remove now unused G_TYPE_ASCNUM. 2010-09-14 16:22:22 +00:00
Pawel Jakub Dawidek
f104beb787 Remove dot which shouldn't be here, as err(3) will attach error message
at the end of the string.
2010-09-14 11:19:21 +00:00
Pawel Jakub Dawidek
7648b1e9c0 Introduce special G_VAL_OPTIONAL define, which when given in value field
tells geom(8) to ignore it when it is not given and don't try to obtain
default value.
2010-09-14 11:13:46 +00:00
Pawel Jakub Dawidek
315fcbf7db Add G_TYPE_MULTI flag, which when set for the given option, will
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.
2010-09-13 13:59:28 +00:00
Pawel Jakub Dawidek
946e2f3595 - Remove gc_argname field. It was introduced for gpart(8), but if I
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.
2010-09-13 13:48:18 +00:00
Pawel Jakub Dawidek
a478ea7490 - Allow to specify value as const pointers.
- Make optional string values always an empty string.
2010-09-13 08:56:07 +00:00
Maxim Konovalov
2888756701 o List MOUNTVER and SCHED classes. X-ref gsched(8). Bump Dd.
PR:		docs/149925
Submitted by:	arundel
2010-09-01 08:32:40 +00:00
Dag-Erling Smørgrav
35efcc8b69 expand_number(3) takes a uint64_t * now; intmax_t was never correct
except by accident.

MFC after:	3 weeks
2010-08-19 11:20:24 +00:00
Joel Dahl
c2025a7660 Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki while
translating these manual pages.  Minor corrections by me.

Submitted by:	Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
2010-08-16 15:18:30 +00:00
Joel Dahl
f6ac23919b Fix typos and spelling mistakes. 2010-08-06 14:33:42 +00:00
Andrey V. Elsukov
79d89bb0ab Remove G_TYPE_ASCLBA type and replace it with G_TYPE_STRING in gpart.
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
2010-06-21 08:24:50 +00:00
Xin LI
00b236aac2 Also output stripeoffset for consumer even if stripesize is zero, while
stripeoffset is non-zero.

Pointed out by:	mav
2010-01-18 19:39:55 +00:00
Xin LI
e192c6e8e8 Stripe offset may be usable even without stripe size known,
so give the output when either is non-zero.

Suggested by:	mav
2010-01-17 08:10:37 +00:00
Xin LI
35daa28f30 Expose stripe offset and stripe size through libgeom and geom(8) userland
utilities.

Reviewed by:	pjd, mav (earlier version)
2010-01-17 06:20:30 +00:00
Edward Tomasz Napierala
b3f9d8c804 Add gmountver, disk mount verification GEOM class.
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)
2010-01-16 09:52:49 +00:00
Edward Tomasz Napierala
cf7710e1da Add manual page for gcache(8). 2010-01-03 15:20:52 +00:00
Pawel Jakub Dawidek
87070efb4d Update copyright years. 2009-09-06 06:49:59 +00:00
Pawel Jakub Dawidek
963feac4e9 For any given subcommand allow to specify multi-line usage (separated by \n).
Submitted by:	Mel Flynn
2009-09-06 06:48:50 +00:00
Marcel Moolenaar
dc344ca5a4 Allow humanized numbers for LBAs, as well as partition indices for
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.
2009-06-07 20:12:14 +00:00
Edward Tomasz Napierala
a7c13ccc01 Add links to libgeom(3) where appropriate. 2009-05-19 12:10:48 +00:00
Ulf Lilleengen
5d82438617 - Use a separate pointer to the allocated memory for freeing, as strsep may
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
2009-02-02 19:22:53 +00:00
Marcel Moolenaar
14bf405be4 Replace checks for RESCUE in sources with checks for STATIC_GEOM_CLASSES
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.
2008-06-04 20:07:59 +00:00
Xin LI
bc69d66f2f Make it possible to build glabel into rescue geom(8) utility.
Ok'ed by:	marcel
No objection:	-current@
2008-03-05 23:31:49 +00:00
Pawel Jakub Dawidek
081632cffb Add info about few missing GEOM classes that use geom(8). 2008-03-05 11:51:13 +00:00
Ulf Lilleengen
9d19384836 - Update geom(8) to explain that GEOM_LIBRARY_PATH can take a comma-separated
list of paths.

Approved by:	pjd (mentor)
MFC after:	2 days
2008-02-05 14:02:55 +00:00
Ulf Lilleengen
2591e96ce2 - Make geom commands handle multiple library paths in the GEOM_LIBRARY_PATH
environment variable using ':' as a separator.

Approved by:	pjd (mentor)
MFC after:	3 days
2008-02-04 12:17:02 +00:00
Marcel Moolenaar
a16f9b367d Allow building of a special rescue version of geom that
has a subset of the classes compiled-in.
2007-11-04 00:32:54 +00:00
Pawel Jakub Dawidek
f854db0bf5 Bring in the GEOM Virtualisation class, which allows to create huge GEOM
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)
2007-09-23 07:34:23 +00:00
Pawel Jakub Dawidek
e84091cb52 For arguments declared as numbers always use expand_number(3).
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)
2007-09-21 10:00:05 +00:00
Pawel Jakub Dawidek
764907187e Use 'val' function argument instead of 'optarg' global variable.
This doesn't fix any real bug, because in those tw ocases we always
passed 'optarg' as 'val'.

Approved by:	re (kensmith)
2007-09-21 09:52:43 +00:00
Marcel Moolenaar
cf805fab87 Fix the construction of the gctl_req that got broken by my
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@
2007-05-17 15:34:51 +00:00
Marcel Moolenaar
18e10ae841 Bump G_LIB_VERSION to reflect the ABI change.
Pointed out by: pjd@
2007-05-16 23:32:40 +00:00