geom_raid3.c (143586) | geom_raid3.c (147947) |
---|---|
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/raid3/geom_raid3.c 143586 2005-03-14 14:25:47Z pjd $"); | 28__FBSDID("$FreeBSD: head/sbin/geom/class/raid3/geom_raid3.c 147947 2005-07-13 07:46:55Z 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 <stdint.h> 36#include <string.h> --- 131 unchanged lines hidden (view full) --- 168 strlcpy(md.md_magic, G_RAID3_MAGIC, sizeof(md.md_magic)); 169 md.md_version = G_RAID3_VERSION; 170 str = gctl_get_asciiparam(req, "arg0"); 171 if (str == NULL) { 172 gctl_error(req, "No 'arg%u' argument.", 0); 173 return; 174 } 175 strlcpy(md.md_name, str, sizeof(md.md_name)); | 29 30#include <sys/param.h> 31#include <errno.h> 32#include <paths.h> 33#include <stdio.h> 34#include <stdlib.h> 35#include <stdint.h> 36#include <string.h> --- 131 unchanged lines hidden (view full) --- 168 strlcpy(md.md_magic, G_RAID3_MAGIC, sizeof(md.md_magic)); 169 md.md_version = G_RAID3_VERSION; 170 str = gctl_get_asciiparam(req, "arg0"); 171 if (str == NULL) { 172 gctl_error(req, "No 'arg%u' argument.", 0); 173 return; 174 } 175 strlcpy(md.md_name, str, sizeof(md.md_name)); |
176 md.md_id = arc4random(); |
|
176 md.md_all = *nargs - 1; 177 md.md_mflags = 0; 178 md.md_dflags = 0; 179 md.md_genid = 0; 180 md.md_syncid = 1; 181 md.md_sync_offset = 0; 182 noautosync = gctl_get_paraml(req, "noautosync", sizeof(*noautosync)); 183 if (noautosync == NULL) { --- 190 unchanged lines hidden --- | 177 md.md_all = *nargs - 1; 178 md.md_mflags = 0; 179 md.md_dflags = 0; 180 md.md_genid = 0; 181 md.md_syncid = 1; 182 md.md_sync_offset = 0; 183 noautosync = gctl_get_paraml(req, "noautosync", sizeof(*noautosync)); 184 if (noautosync == NULL) { --- 190 unchanged lines hidden --- |