geom_stripe.c (130625) | geom_stripe.c (131649) |
---|---|
1/*- 2 * Copyright (c) 2004 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 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/stripe/geom_stripe.c 130625 2004-06-17 06:04:14Z pjd $"); | 28__FBSDID("$FreeBSD: head/sbin/geom/class/stripe/geom_stripe.c 131649 2004-07-05 21:16:37Z pjd $"); |
29 30#include <sys/param.h> 31#include <errno.h> 32#include <stdio.h> 33#include <stdlib.h> 34#include <stdint.h> 35#include <string.h> 36#include <strings.h> --- 10 unchanged lines hidden (view full) --- 47 48static intmax_t stripesize = 65536; 49 50static void stripe_main(struct gctl_req *req, unsigned flags); 51static void stripe_label(struct gctl_req *req); 52static void stripe_clear(struct gctl_req *req); 53 54struct g_command class_commands[] = { | 29 30#include <sys/param.h> 31#include <errno.h> 32#include <stdio.h> 33#include <stdlib.h> 34#include <stdint.h> 35#include <string.h> 36#include <strings.h> --- 10 unchanged lines hidden (view full) --- 47 48static intmax_t stripesize = 65536; 49 50static void stripe_main(struct gctl_req *req, unsigned flags); 51static void stripe_label(struct gctl_req *req); 52static void stripe_clear(struct gctl_req *req); 53 54struct g_command class_commands[] = { |
55 { "clear", G_FLAG_VERBOSE, stripe_main, G_NULL_OPTS }, |
|
55 { "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, 56 { 57 { 's', "stripesize", &stripesize, G_TYPE_NUMBER }, 58 G_OPT_SENTINEL 59 } 60 }, 61 { "destroy", G_FLAG_VERBOSE, NULL, 62 { 63 { 'f', "force", NULL, G_TYPE_NONE }, 64 G_OPT_SENTINEL 65 } 66 }, 67 { "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, stripe_main, 68 { 69 { 's', "stripesize", &stripesize, G_TYPE_NUMBER }, 70 G_OPT_SENTINEL 71 } 72 }, | 56 { "create", G_FLAG_VERBOSE | G_FLAG_LOADKLD, NULL, 57 { 58 { 's', "stripesize", &stripesize, G_TYPE_NUMBER }, 59 G_OPT_SENTINEL 60 } 61 }, 62 { "destroy", G_FLAG_VERBOSE, NULL, 63 { 64 { 'f', "force", NULL, G_TYPE_NONE }, 65 G_OPT_SENTINEL 66 } 67 }, 68 { "label", G_FLAG_VERBOSE | G_FLAG_LOADKLD, stripe_main, 69 { 70 { 's', "stripesize", &stripesize, G_TYPE_NUMBER }, 71 G_OPT_SENTINEL 72 } 73 }, |
73 { "clear", G_FLAG_VERBOSE, stripe_main, G_NULL_OPTS }, | 74 { "stop", G_FLAG_VERBOSE, NULL, 75 { 76 { 'f', "force", NULL, G_TYPE_NONE }, 77 G_OPT_SENTINEL 78 } 79 }, |
74 G_CMD_SENTINEL 75}; 76 77static int verbose = 0; 78 79void usage(const char *name); 80void 81usage(const char *name) 82{ 83 84 fprintf(stderr, "usage: %s create [-v] [-s stripesize] <name> <dev1> <dev2> [dev3 [...]]\n", name); 85 fprintf(stderr, " %s destroy [-fv] <name> [name2 [...]]\n", name); 86 fprintf(stderr, " %s label [-v] [-s stripesize] <name> <dev1> <dev2> [dev3 [...]]\n", name); | 80 G_CMD_SENTINEL 81}; 82 83static int verbose = 0; 84 85void usage(const char *name); 86void 87usage(const char *name) 88{ 89 90 fprintf(stderr, "usage: %s create [-v] [-s stripesize] <name> <dev1> <dev2> [dev3 [...]]\n", name); 91 fprintf(stderr, " %s destroy [-fv] <name> [name2 [...]]\n", name); 92 fprintf(stderr, " %s label [-v] [-s stripesize] <name> <dev1> <dev2> [dev3 [...]]\n", name); |
93 fprintf(stderr, " %s stop [-fv] <name> [name2 [...]]\n", name); |
|
87 fprintf(stderr, " %s clear [-v] <dev1> [dev2 [...]]\n", name); 88} 89 90static void 91stripe_main(struct gctl_req *req, unsigned flags) 92{ 93 const char *name; 94 --- 123 unchanged lines hidden --- | 94 fprintf(stderr, " %s clear [-v] <dev1> [dev2 [...]]\n", name); 95} 96 97static void 98stripe_main(struct gctl_req *req, unsigned flags) 99{ 100 const char *name; 101 --- 123 unchanged lines hidden --- |