Deleted Added
full compact
geom_raid3.c (212554) geom_raid3.c (213662)
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 212554 2010-09-13 13:48:18Z pjd $");
28__FBSDID("$FreeBSD: head/sbin/geom/class/raid3/geom_raid3.c 213662 2010-10-09 20:20:27Z ae $");
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>

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

239 str, (intmax_t)mediasize, (intmax_t)(msize - ssize));
240 }
241
242 md.md_no = i - 1;
243 md.md_provsize = msize;
244 if (!hardcode)
245 bzero(md.md_provider, sizeof(md.md_provider));
246 else {
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>

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

239 str, (intmax_t)mediasize, (intmax_t)(msize - ssize));
240 }
241
242 md.md_no = i - 1;
243 md.md_provsize = msize;
244 if (!hardcode)
245 bzero(md.md_provider, sizeof(md.md_provider));
246 else {
247 if (strncmp(str, _PATH_DEV, strlen(_PATH_DEV)) == 0)
248 str += strlen(_PATH_DEV);
247 if (strncmp(str, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
248 str += sizeof(_PATH_DEV) - 1;
249 strlcpy(md.md_provider, str, sizeof(md.md_provider));
250 }
251 if (verify && md.md_no == md.md_all - 1) {
252 /*
253 * In "verify" mode, force synchronization of parity
254 * component on start.
255 */
256 md.md_syncid = 0;

--- 74 unchanged lines hidden ---
249 strlcpy(md.md_provider, str, sizeof(md.md_provider));
250 }
251 if (verify && md.md_no == md.md_all - 1) {
252 /*
253 * In "verify" mode, force synchronization of parity
254 * component on start.
255 */
256 md.md_syncid = 0;

--- 74 unchanged lines hidden ---