xref: /freebsd/lib/geom/mountver/geom_mountver.c (revision 1d386b48a555f61cb7325543adbbb5c3f3407a66)
1e4b0a90eSBrooks Davis /*-
2*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
3e4b0a90eSBrooks Davis  *
4e4b0a90eSBrooks Davis  * Copyright (c) 2010 Edward Tomasz Napierala <trasz@FreeBSD.org>
5e4b0a90eSBrooks Davis  *
6e4b0a90eSBrooks Davis  * Redistribution and use in source and binary forms, with or without
7e4b0a90eSBrooks Davis  * modification, are permitted provided that the following conditions
8e4b0a90eSBrooks Davis  * are met:
9e4b0a90eSBrooks Davis  * 1. Redistributions of source code must retain the above copyright
10e4b0a90eSBrooks Davis  *    notice, this list of conditions and the following disclaimer.
11e4b0a90eSBrooks Davis  * 2. Redistributions in binary form must reproduce the above copyright
12e4b0a90eSBrooks Davis  *    notice, this list of conditions and the following disclaimer in the
13e4b0a90eSBrooks Davis  *    documentation and/or other materials provided with the distribution.
14e4b0a90eSBrooks Davis  *
15e4b0a90eSBrooks Davis  * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
16e4b0a90eSBrooks Davis  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17e4b0a90eSBrooks Davis  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18e4b0a90eSBrooks Davis  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
19e4b0a90eSBrooks Davis  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20e4b0a90eSBrooks Davis  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21e4b0a90eSBrooks Davis  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22e4b0a90eSBrooks Davis  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23e4b0a90eSBrooks Davis  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24e4b0a90eSBrooks Davis  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25e4b0a90eSBrooks Davis  * SUCH DAMAGE.
26e4b0a90eSBrooks Davis  */
27e4b0a90eSBrooks Davis 
28e4b0a90eSBrooks Davis #include <sys/cdefs.h>
29e4b0a90eSBrooks Davis #include <stdio.h>
30e4b0a90eSBrooks Davis #include <stdint.h>
31e4b0a90eSBrooks Davis #include <libgeom.h>
32e4b0a90eSBrooks Davis #include <geom/mountver/g_mountver.h>
33e4b0a90eSBrooks Davis 
34e4b0a90eSBrooks Davis #include "core/geom.h"
35e4b0a90eSBrooks Davis 
36e4b0a90eSBrooks Davis 
37e4b0a90eSBrooks Davis uint32_t lib_version = G_LIB_VERSION;
38e4b0a90eSBrooks Davis uint32_t version = G_MOUNTVER_VERSION;
39e4b0a90eSBrooks Davis 
40e4b0a90eSBrooks Davis struct g_command class_commands[] = {
41e4b0a90eSBrooks Davis 	{ "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL,
42e4b0a90eSBrooks Davis 	    {
43e4b0a90eSBrooks Davis 		G_OPT_SENTINEL
44e4b0a90eSBrooks Davis 	    },
45e4b0a90eSBrooks Davis 	    "[-v] prov ..."
46e4b0a90eSBrooks Davis 	},
47e4b0a90eSBrooks Davis 	{ "destroy", G_FLAG_VERBOSE, NULL,
48e4b0a90eSBrooks Davis 	    {
49e4b0a90eSBrooks Davis 		{ 'f', "force", NULL, G_TYPE_BOOL },
50e4b0a90eSBrooks Davis 		G_OPT_SENTINEL
51e4b0a90eSBrooks Davis 	    },
52e4b0a90eSBrooks Davis 	    "[-fv] name"
53e4b0a90eSBrooks Davis 	},
54e4b0a90eSBrooks Davis 	G_CMD_SENTINEL
55e4b0a90eSBrooks Davis };
56