geom_concat.c (169586) | geom_concat.c (212554) |
---|---|
1/*- 2 * Copyright (c) 2004-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sbin/geom/class/concat/geom_concat.c 169586 2007-05-15 20:25:18Z marcel $"); | 28__FBSDID("$FreeBSD: head/sbin/geom/class/concat/geom_concat.c 212554 2010-09-13 13:48:18Z pjd $"); |
29 30#include <sys/param.h> 31#include <errno.h> 32#include <paths.h> 33#include <stdio.h> 34#include <stdlib.h> 35#include <string.h> 36#include <strings.h> --- 9 unchanged lines hidden (view full) --- 46uint32_t version = G_CONCAT_VERSION; 47 48static void concat_main(struct gctl_req *req, unsigned flags); 49static void concat_clear(struct gctl_req *req); 50static void concat_dump(struct gctl_req *req); 51static void concat_label(struct gctl_req *req); 52 53struct g_command class_commands[] = { | 29 30#include <sys/param.h> 31#include <errno.h> 32#include <paths.h> 33#include <stdio.h> 34#include <stdlib.h> 35#include <string.h> 36#include <strings.h> --- 9 unchanged lines hidden (view full) --- 46uint32_t version = G_CONCAT_VERSION; 47 48static void concat_main(struct gctl_req *req, unsigned flags); 49static void concat_clear(struct gctl_req *req); 50static void concat_dump(struct gctl_req *req); 51static void concat_label(struct gctl_req *req); 52 53struct g_command class_commands[] = { |
54 { "clear", G_FLAG_VERBOSE, concat_main, G_NULL_OPTS, NULL, | 54 { "clear", G_FLAG_VERBOSE, concat_main, G_NULL_OPTS, |
55 "[-v] prov ..." 56 }, 57 { "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, G_NULL_OPTS, | 55 "[-v] prov ..." 56 }, 57 { "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, G_NULL_OPTS, |
58 NULL, "[-v] name prov ..." | 58 "[-v] name prov ..." |
59 }, 60 { "destroy", G_FLAG_VERBOSE, NULL, 61 { 62 { 'f', "force", NULL, G_TYPE_BOOL }, 63 G_OPT_SENTINEL 64 }, | 59 }, 60 { "destroy", G_FLAG_VERBOSE, NULL, 61 { 62 { 'f', "force", NULL, G_TYPE_BOOL }, 63 G_OPT_SENTINEL 64 }, |
65 NULL, "[-fv] name ..." | 65 "[-fv] name ..." |
66 }, | 66 }, |
67 { "dump", 0, concat_main, G_NULL_OPTS, NULL, | 67 { "dump", 0, concat_main, G_NULL_OPTS, |
68 "prov ..." 69 }, 70 { "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, concat_main, 71 { 72 { 'h', "hardcode", NULL, G_TYPE_BOOL }, 73 G_OPT_SENTINEL 74 }, | 68 "prov ..." 69 }, 70 { "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, concat_main, 71 { 72 { 'h', "hardcode", NULL, G_TYPE_BOOL }, 73 G_OPT_SENTINEL 74 }, |
75 NULL, "[-hv] name prov ..." | 75 "[-hv] name prov ..." |
76 }, 77 { "stop", G_FLAG_VERBOSE, NULL, 78 { 79 { 'f', "force", NULL, G_TYPE_BOOL }, 80 G_OPT_SENTINEL 81 }, | 76 }, 77 { "stop", G_FLAG_VERBOSE, NULL, 78 { 79 { 'f', "force", NULL, G_TYPE_BOOL }, 80 G_OPT_SENTINEL 81 }, |
82 NULL, "[-fv] name ..." | 82 "[-fv] name ..." |
83 }, 84 G_CMD_SENTINEL 85}; 86 87static int verbose = 0; 88 89static void 90concat_main(struct gctl_req *req, unsigned flags) --- 157 unchanged lines hidden --- | 83 }, 84 G_CMD_SENTINEL 85}; 86 87static int verbose = 0; 88 89static void 90concat_main(struct gctl_req *req, unsigned flags) --- 157 unchanged lines hidden --- |