Deleted Added
full compact
geom_vinum_list.c (139778) geom_vinum_list.c (185309)
1/*-
2 * Copyright (c) 2004 Lukas Ertl
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

--- 12 unchanged lines hidden (view full) ---

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
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2004 Lukas Ertl
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

--- 12 unchanged lines hidden (view full) ---

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
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/geom/vinum/geom_vinum_list.c 139778 2005-01-06 18:27:30Z imp $");
29__FBSDID("$FreeBSD: head/sys/geom/vinum/geom_vinum_list.c 185309 2008-11-25 19:13:58Z lulf $");
30
31#include <sys/param.h>
32#include <sys/libkern.h>
33#include <sys/malloc.h>
34
35#include <geom/geom.h>
36#include <geom/vinum/geom_vinum_var.h>
37#include <geom/vinum/geom_vinum.h>

--- 19 unchanged lines hidden (view full) ---

57 argc = gctl_get_paraml(req, "argc", sizeof(*argc));
58
59 if (argc == NULL) {
60 gctl_error(req, "no arguments given");
61 return;
62 }
63
64 flags = gctl_get_paraml(req, "flags", sizeof(*flags));
30
31#include <sys/param.h>
32#include <sys/libkern.h>
33#include <sys/malloc.h>
34
35#include <geom/geom.h>
36#include <geom/vinum/geom_vinum_var.h>
37#include <geom/vinum/geom_vinum.h>

--- 19 unchanged lines hidden (view full) ---

57 argc = gctl_get_paraml(req, "argc", sizeof(*argc));
58
59 if (argc == NULL) {
60 gctl_error(req, "no arguments given");
61 return;
62 }
63
64 flags = gctl_get_paraml(req, "flags", sizeof(*flags));
65 if (flags == NULL) {
66 gctl_error(req, "no flags given");
67 return;
68 }
65
66 sc = gp->softc;
67
68 sb = sbuf_new(NULL, NULL, GV_CFG_LEN, SBUF_FIXEDLEN);
69
70 /* Figure out which command was given. */
71 cmd = gctl_get_param(req, "cmd", NULL);
69
70 sc = gp->softc;
71
72 sb = sbuf_new(NULL, NULL, GV_CFG_LEN, SBUF_FIXEDLEN);
73
74 /* Figure out which command was given. */
75 cmd = gctl_get_param(req, "cmd", NULL);
76 if (cmd == NULL) {
77 gctl_error(req, "no command given");
78 return;
79 }
72
73 /* List specific objects or everything. */
74 if (!strcmp(cmd, "list") || !strcmp(cmd, "l")) {
75 if (*argc) {
76 for (i = 0; i < *argc; i++) {
77 snprintf(buf, sizeof(buf), "argv%d", i);
78 arg = gctl_get_param(req, buf, NULL);
79 if (arg == NULL)

--- 393 unchanged lines hidden ---
80
81 /* List specific objects or everything. */
82 if (!strcmp(cmd, "list") || !strcmp(cmd, "l")) {
83 if (*argc) {
84 for (i = 0; i < *argc; i++) {
85 snprintf(buf, sizeof(buf), "argv%d", i);
86 arg = gctl_get_param(req, buf, NULL);
87 if (arg == NULL)

--- 393 unchanged lines hidden ---