geom_part.c (188330) | geom_part.c (193648) |
---|---|
1/*- 2 * Copyright (c) 2007, 2008 Marcel Moolenaar 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) 2007, 2008 Marcel Moolenaar 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/part/geom_part.c 188330 2009-02-08 20:19:19Z marcel $"); | 28__FBSDID("$FreeBSD: head/sbin/geom/class/part/geom_part.c 193648 2009-06-07 20:12:14Z marcel $"); |
29 30#include <sys/stat.h> 31 32#include <assert.h> 33#include <err.h> 34#include <errno.h> 35#include <fcntl.h> 36#include <libgeom.h> --- 26 unchanged lines hidden (view full) --- 63static char partcode_param[] = "partcode"; 64 65static void gpart_bootcode(struct gctl_req *, unsigned int); 66static void gpart_issue(struct gctl_req *, unsigned int); 67static void gpart_show(struct gctl_req *, unsigned int); 68 69struct g_command PUBSYM(class_commands)[] = { 70 { "add", 0, gpart_issue, { | 29 30#include <sys/stat.h> 31 32#include <assert.h> 33#include <err.h> 34#include <errno.h> 35#include <fcntl.h> 36#include <libgeom.h> --- 26 unchanged lines hidden (view full) --- 63static char partcode_param[] = "partcode"; 64 65static void gpart_bootcode(struct gctl_req *, unsigned int); 66static void gpart_issue(struct gctl_req *, unsigned int); 67static void gpart_show(struct gctl_req *, unsigned int); 68 69struct g_command PUBSYM(class_commands)[] = { 70 { "add", 0, gpart_issue, { |
71 { 'b', "start", NULL, G_TYPE_STRING }, 72 { 's', "size", NULL, G_TYPE_STRING }, | 71 { 'b', "start", NULL, G_TYPE_ASCLBA }, 72 { 's', "size", NULL, G_TYPE_ASCLBA }, |
73 { 't', "type", NULL, G_TYPE_STRING }, | 73 { 't', "type", NULL, G_TYPE_STRING }, |
74 { 'i', index_param, optional, G_TYPE_STRING }, | 74 { 'i', index_param, optional, G_TYPE_ASCNUM }, |
75 { 'l', "label", optional, G_TYPE_STRING }, 76 { 'f', "flags", flags, G_TYPE_STRING }, 77 G_OPT_SENTINEL }, 78 "geom", NULL 79 }, 80 { "bootcode", 0, gpart_bootcode, { 81 { 'b', bootcode_param, optional, G_TYPE_STRING }, 82 { 'p', partcode_param, optional, G_TYPE_STRING }, | 75 { 'l', "label", optional, G_TYPE_STRING }, 76 { 'f', "flags", flags, G_TYPE_STRING }, 77 G_OPT_SENTINEL }, 78 "geom", NULL 79 }, 80 { "bootcode", 0, gpart_bootcode, { 81 { 'b', bootcode_param, optional, G_TYPE_STRING }, 82 { 'p', partcode_param, optional, G_TYPE_STRING }, |
83 { 'i', index_param, optional, G_TYPE_STRING }, | 83 { 'i', index_param, optional, G_TYPE_ASCNUM }, |
84 { 'f', "flags", flags, G_TYPE_STRING }, 85 G_OPT_SENTINEL }, 86 "geom", NULL 87 }, 88 { "commit", 0, gpart_issue, G_NULL_OPTS, "geom", NULL }, 89 { "create", 0, gpart_issue, { 90 { 's', "scheme", NULL, G_TYPE_STRING }, | 84 { 'f', "flags", flags, G_TYPE_STRING }, 85 G_OPT_SENTINEL }, 86 "geom", NULL 87 }, 88 { "commit", 0, gpart_issue, G_NULL_OPTS, "geom", NULL }, 89 { "create", 0, gpart_issue, { 90 { 's', "scheme", NULL, G_TYPE_STRING }, |
91 { 'n', "entries", optional, G_TYPE_STRING }, | 91 { 'n', "entries", optional, G_TYPE_ASCNUM }, |
92 { 'f', "flags", flags, G_TYPE_STRING }, 93 G_OPT_SENTINEL }, 94 "provider", NULL 95 }, 96 { "delete", 0, gpart_issue, { | 92 { 'f', "flags", flags, G_TYPE_STRING }, 93 G_OPT_SENTINEL }, 94 "provider", NULL 95 }, 96 { "delete", 0, gpart_issue, { |
97 { 'i', index_param, NULL, G_TYPE_STRING }, | 97 { 'i', index_param, NULL, G_TYPE_ASCNUM }, |
98 { 'f', "flags", flags, G_TYPE_STRING }, 99 G_OPT_SENTINEL }, 100 "geom", NULL 101 }, 102 { "destroy", 0, gpart_issue, { 103 { 'f', "flags", flags, G_TYPE_STRING }, 104 G_OPT_SENTINEL }, 105 "geom", NULL }, 106 { "modify", 0, gpart_issue, { | 98 { 'f', "flags", flags, G_TYPE_STRING }, 99 G_OPT_SENTINEL }, 100 "geom", NULL 101 }, 102 { "destroy", 0, gpart_issue, { 103 { 'f', "flags", flags, G_TYPE_STRING }, 104 G_OPT_SENTINEL }, 105 "geom", NULL }, 106 { "modify", 0, gpart_issue, { |
107 { 'i', index_param, NULL, G_TYPE_STRING }, | 107 { 'i', index_param, NULL, G_TYPE_ASCNUM }, |
108 { 'l', "label", optional, G_TYPE_STRING }, 109 { 't', "type", optional, G_TYPE_STRING }, 110 { 'f', "flags", flags, G_TYPE_STRING }, 111 G_OPT_SENTINEL }, 112 "geom", NULL 113 }, 114 { "set", 0, gpart_issue, { 115 { 'a', "attrib", NULL, G_TYPE_STRING }, | 108 { 'l', "label", optional, G_TYPE_STRING }, 109 { 't', "type", optional, G_TYPE_STRING }, 110 { 'f', "flags", flags, G_TYPE_STRING }, 111 G_OPT_SENTINEL }, 112 "geom", NULL 113 }, 114 { "set", 0, gpart_issue, { 115 { 'a', "attrib", NULL, G_TYPE_STRING }, |
116 { 'i', index_param, NULL, G_TYPE_STRING }, | 116 { 'i', index_param, NULL, G_TYPE_ASCNUM }, |
117 { 'f', "flags", flags, G_TYPE_STRING }, 118 G_OPT_SENTINEL }, 119 "geom", NULL 120 }, 121 { "show", 0, gpart_show, { 122 { 'l', "show_label", NULL, G_TYPE_BOOL }, 123 { 'r', "show_rawtype", NULL, G_TYPE_BOOL }, 124 G_OPT_SENTINEL }, 125 NULL, "[-lr] [geom ...]" 126 }, 127 { "undo", 0, gpart_issue, G_NULL_OPTS, "geom", NULL }, 128 { "unset", 0, gpart_issue, { 129 { 'a', "attrib", NULL, G_TYPE_STRING }, | 117 { 'f', "flags", flags, G_TYPE_STRING }, 118 G_OPT_SENTINEL }, 119 "geom", NULL 120 }, 121 { "show", 0, gpart_show, { 122 { 'l', "show_label", NULL, G_TYPE_BOOL }, 123 { 'r', "show_rawtype", NULL, G_TYPE_BOOL }, 124 G_OPT_SENTINEL }, 125 NULL, "[-lr] [geom ...]" 126 }, 127 { "undo", 0, gpart_issue, G_NULL_OPTS, "geom", NULL }, 128 { "unset", 0, gpart_issue, { 129 { 'a', "attrib", NULL, G_TYPE_STRING }, |
130 { 'i', index_param, NULL, G_TYPE_STRING }, | 130 { 'i', index_param, NULL, G_TYPE_ASCNUM }, |
131 { 'f', "flags", flags, G_TYPE_STRING }, 132 G_OPT_SENTINEL }, 133 "geom", NULL 134 }, 135 G_CMD_SENTINEL 136}; 137 138static struct gclass * --- 422 unchanged lines hidden --- | 131 { 'f', "flags", flags, G_TYPE_STRING }, 132 G_OPT_SENTINEL }, 133 "geom", NULL 134 }, 135 G_CMD_SENTINEL 136}; 137 138static struct gclass * --- 422 unchanged lines hidden --- |