aboutsummaryrefslogtreecommitdiff
path: root/sbin/geom
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2015-05-27 01:19:58 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2015-05-27 01:19:58 +0000
commit98e0ffaefb0f241cda3a72395d3be04192ae0d47 (patch)
tree55c065b6730aaac2afb6c29933ee6ec5fa4c4249 /sbin/geom
parentb17ff922d4072ae132ece458f5b5d74a236880ac (diff)
parente81032ad243db32b8fd615b2d55ee94b9f6a5b6a (diff)
downloadsrc-98e0ffaefb0f241cda3a72395d3be04192ae0d47.tar.gz
src-98e0ffaefb0f241cda3a72395d3be04192ae0d47.zip
Merge sync of head
Notes
Notes: svn path=/projects/bmake/; revision=283595
Diffstat (limited to 'sbin/geom')
-rw-r--r--sbin/geom/Makefile3
-rw-r--r--sbin/geom/class/eli/Makefile3
-rw-r--r--sbin/geom/class/journal/Makefile3
-rw-r--r--sbin/geom/class/label/glabel.84
-rw-r--r--sbin/geom/class/mirror/Makefile3
-rw-r--r--sbin/geom/class/mountver/geom_mountver.c4
-rw-r--r--sbin/geom/class/mountver/gmountver.815
-rw-r--r--sbin/geom/class/part/Makefile3
-rw-r--r--sbin/geom/class/part/geom_part.c15
-rw-r--r--sbin/geom/class/part/gpart.812
-rw-r--r--sbin/geom/class/raid/Makefile3
-rw-r--r--sbin/geom/class/raid3/Makefile3
-rw-r--r--sbin/geom/core/Makefile3
13 files changed, 43 insertions, 31 deletions
diff --git a/sbin/geom/Makefile b/sbin/geom/Makefile
index ced58425c657..19a56360ccce 100644
--- a/sbin/geom/Makefile
+++ b/sbin/geom/Makefile
@@ -14,8 +14,7 @@ MAN=
WARNS?= 2
CFLAGS+=-I${.CURDIR} -I${.CURDIR}/core -DSTATIC_GEOM_CLASSES
-DPADD= ${LIBGEOM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL}
-LDADD= -lgeom -lsbuf -lbsdxml -lutil
+LIBADD= geom util
.include <bsd.prog.mk>
diff --git a/sbin/geom/class/eli/Makefile b/sbin/geom/class/eli/Makefile
index 119566876d71..f8e453dc616c 100644
--- a/sbin/geom/class/eli/Makefile
+++ b/sbin/geom/class/eli/Makefile
@@ -8,8 +8,7 @@ SRCS+= g_eli_key.c
SRCS+= pkcs5v2.c
SRCS+= sha2.c
-DPADD= ${LIBMD} ${LIBCRYPTO}
-LDADD= -lmd -lcrypto
+LIBADD= md crypto
WARNS?= 3
diff --git a/sbin/geom/class/journal/Makefile b/sbin/geom/class/journal/Makefile
index 2db8d3002734..0e1a38ea6dc4 100644
--- a/sbin/geom/class/journal/Makefile
+++ b/sbin/geom/class/journal/Makefile
@@ -5,8 +5,7 @@
GEOM_CLASS= journal
SRCS+= geom_journal_ufs.c
-DPADD= ${LIBMD} ${LIBUFS}
-LDADD= -lmd -lufs
+LIBADD= ufs md
CFLAGS+=-I${.CURDIR}/../../../../sys
diff --git a/sbin/geom/class/label/glabel.8 b/sbin/geom/class/label/glabel.8
index c950e26b35a7..a2f665e18ff7 100644
--- a/sbin/geom/class/label/glabel.8
+++ b/sbin/geom/class/label/glabel.8
@@ -227,11 +227,11 @@ maximum amount of debug information is printed.
.It Va kern.geom.label.*.enable : No 1
Most
.Nm LABEL
-providers implement a
+providers implement a
.Xr sysctl 8
flag and a tunable variable named in the above format. This flag
controls if the label provider will be active, tasting devices
-and creating label nodes in the
+and creating label nodes in the
.Xr devfs 5
tree. It is sometimes desirable to disable certain label types if
they conflict with other classes in complex GEOM topologies.
diff --git a/sbin/geom/class/mirror/Makefile b/sbin/geom/class/mirror/Makefile
index e38d617b6da5..ce7ee6466326 100644
--- a/sbin/geom/class/mirror/Makefile
+++ b/sbin/geom/class/mirror/Makefile
@@ -4,7 +4,6 @@
GEOM_CLASS= mirror
-DPADD= ${LIBMD}
-LDADD= -lmd
+LIBADD= md
.include <bsd.lib.mk>
diff --git a/sbin/geom/class/mountver/geom_mountver.c b/sbin/geom/class/mountver/geom_mountver.c
index a1ed95d6c879..bff69c545cda 100644
--- a/sbin/geom/class/mountver/geom_mountver.c
+++ b/sbin/geom/class/mountver/geom_mountver.c
@@ -43,14 +43,14 @@ struct g_command class_commands[] = {
{
G_OPT_SENTINEL
},
- "[-v] dev ..."
+ "[-v] prov ..."
},
{ "destroy", G_FLAG_VERBOSE, NULL,
{
{ 'f', "force", NULL, G_TYPE_BOOL },
G_OPT_SENTINEL
},
- "[-fv] prov ..."
+ "[-fv] name"
},
G_CMD_SENTINEL
};
diff --git a/sbin/geom/class/mountver/gmountver.8 b/sbin/geom/class/mountver/gmountver.8
index c9a9c0ac8313..4c27a652b0b0 100644
--- a/sbin/geom/class/mountver/gmountver.8
+++ b/sbin/geom/class/mountver/gmountver.8
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 14, 2010
+.Dd May 18, 2015
.Dt GMOUNTVER 8
.Os
.Sh NAME
@@ -35,11 +35,11 @@
.Nm
.Cm create
.Op Fl v
-.Ar dev ...
+.Ar prov ...
.Nm
.Cm destroy
.Op Fl fv
-.Ar prov ...
+.Ar name
.Nm
.Cm list
.Nm
@@ -66,8 +66,11 @@ The first argument to
indicates an action to be performed:
.Bl -tag -width ".Cm destroy"
.It Cm create
-Cache the given devices with specified
-.Ar name .
+Enable mount verification for the given provider.
+If the operation succeeds, a new GEOM provider will be created using the
+given provider's name with a
+.Ql .mountver
+suffix.
The kernel module
.Pa geom_mountver.ko
will be loaded if it is not loaded already.
@@ -110,7 +113,7 @@ GEOM class.
This can be set to a number between 0 and 3 inclusive.
If set to 0 minimal debug information is printed, and if set to 3 the
maximum amount of debug information is printed.
-.It Va kern.geom.mountver.check.check_ident : No 1
+.It Va kern.geom.mountver.check_ident : No 1
This can be set to 0 or 1.
If set to 0,
.Nm
diff --git a/sbin/geom/class/part/Makefile b/sbin/geom/class/part/Makefile
index 341cd42b8c97..4b67de4ef415 100644
--- a/sbin/geom/class/part/Makefile
+++ b/sbin/geom/class/part/Makefile
@@ -4,7 +4,6 @@
GEOM_CLASS= part
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.include <bsd.lib.mk>
diff --git a/sbin/geom/class/part/geom_part.c b/sbin/geom/class/part/geom_part.c
index ee4b2a939f82..133e8f8281e9 100644
--- a/sbin/geom/class/part/geom_part.c
+++ b/sbin/geom/class/part/geom_part.c
@@ -207,15 +207,20 @@ find_class(struct gmesh *mesh, const char *name)
static struct ggeom *
find_geom(struct gclass *classp, const char *name)
{
- struct ggeom *gp;
+ struct ggeom *gp, *wgp;
if (strncmp(name, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
name += sizeof(_PATH_DEV) - 1;
+ wgp = NULL;
LIST_FOREACH(gp, &classp->lg_geom, lg_geom) {
- if (strcmp(gp->lg_name, name) == 0)
+ if (strcmp(gp->lg_name, name) != 0)
+ continue;
+ if (find_geomcfg(gp, "wither") == NULL)
return (gp);
+ else
+ wgp = gp;
}
- return (NULL);
+ return (wgp);
}
static const char *
@@ -561,7 +566,7 @@ gpart_autofill(struct gctl_req *req)
s = find_provcfg(pp, "end");
first = (off_t)strtoimax(s, NULL, 0) + 1;
- if (first > a_first)
+ if (first + offset > a_first)
a_first = ALIGNUP(first + offset, alignment);
}
if (a_first <= last) {
@@ -609,6 +614,8 @@ gpart_show_geom(struct ggeom *gp, const char *element, int show_providers)
off_t length, secsz;
int idx, wblocks, wname, wmax;
+ if (find_geomcfg(gp, "wither"))
+ return;
scheme = find_geomcfg(gp, "scheme");
if (scheme == NULL)
errx(EXIT_FAILURE, "Scheme not found for geom %s", gp->lg_name);
diff --git a/sbin/geom/class/part/gpart.8 b/sbin/geom/class/part/gpart.8
index e8c4dab2f43b..8e8f858432b8 100644
--- a/sbin/geom/class/part/gpart.8
+++ b/sbin/geom/class/part/gpart.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 12, 2014
+.Dd May 5, 2015
.Dt GPART 8
.Os
.Sh NAME
@@ -659,9 +659,17 @@ Another symbolic names that can be used with
.Cm gpart
utility are:
.Bl -tag -width ".Cm dragonfly-disklabel64"
+.It Cm apple-core-storage
+An Apple Mac OS X partition used by logical volume manager known as
+Core Storage.
+The scheme-specific type is
+.Qq Li "!53746f72-6167-11aa-aa11-00306543ecac"
+for GPT.
.It Cm apple-hfs
An Apple Mac OS X partition that contains a HFS or HFS+ filesystem.
The scheme-specific types are
+.Qq Li "!175"
+for MBR,
.Qq Li "!Apple_HFS"
for APM and
.Qq Li "!48465300-0000-11aa-aa11-00306543ecac"
@@ -690,6 +698,8 @@ for GPT.
.It Cm apple-ufs
An Apple Mac OS X partition that contains a UFS filesystem.
The scheme-specific types are
+.Qq Li "!168"
+for MBR,
.Qq Li "!Apple_UNIX_SVR2"
for APM and
.Qq Li "!55465300-0000-11aa-aa11-00306543ecac"
diff --git a/sbin/geom/class/raid/Makefile b/sbin/geom/class/raid/Makefile
index 743f690f0fd9..07d71403d48f 100644
--- a/sbin/geom/class/raid/Makefile
+++ b/sbin/geom/class/raid/Makefile
@@ -4,7 +4,6 @@
GEOM_CLASS= raid
-DPADD= ${LIBMD}
-LDADD= -lmd
+LIBADD= md
.include <bsd.lib.mk>
diff --git a/sbin/geom/class/raid3/Makefile b/sbin/geom/class/raid3/Makefile
index d2405d4b4f5d..74e12455a432 100644
--- a/sbin/geom/class/raid3/Makefile
+++ b/sbin/geom/class/raid3/Makefile
@@ -4,7 +4,6 @@
GEOM_CLASS= raid3
-DPADD= ${LIBMD}
-LDADD= -lmd
+LIBADD= md
.include <bsd.lib.mk>
diff --git a/sbin/geom/core/Makefile b/sbin/geom/core/Makefile
index 64edc793a95e..0636d037a358 100644
--- a/sbin/geom/core/Makefile
+++ b/sbin/geom/core/Makefile
@@ -11,7 +11,6 @@ NO_SHARED=NO
CFLAGS+= -DGEOM_CLASS_DIR=\"${GEOM_CLASS_DIR}\"
CFLAGS+= -I${.CURDIR}/../../../sys -I${.CURDIR} -I${.CURDIR}/..
-DPADD= ${LIBGEOM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL}
-LDADD= -lgeom -lsbuf -lbsdxml -lutil
+LIBADD= geom util
.include <bsd.prog.mk>