zfs.c (185029) | zfs.c (185096) |
---|---|
1/*- 2 * Copyright (c) 2007 Doug Rabson 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * | 1/*- 2 * Copyright (c) 2007 Doug Rabson 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * $FreeBSD: head/sys/boot/zfs/zfs.c 185029 2008-11-17 20:49:29Z pjd $ | 26 * $FreeBSD: head/sys/boot/zfs/zfs.c 185096 2008-11-19 16:39:01Z dfr $ |
27 */ 28 29#include <sys/cdefs.h> | 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/boot/zfs/zfs.c 185029 2008-11-17 20:49:29Z pjd $"); | 30__FBSDID("$FreeBSD: head/sys/boot/zfs/zfs.c 185096 2008-11-19 16:39:01Z dfr $"); |
31 32/* 33 * Stand-alone file reading package. 34 */ 35 36#include <sys/param.h> 37#include <sys/disklabel.h> 38#include <sys/time.h> --- 370 unchanged lines hidden (view full) --- 409 /* 410 * If we find a vdev, the zfs code will eat the fd, otherwise 411 * we close it. 412 */ 413 if (vdev_probe(vdev_read, (void*) (uintptr_t) fd, 0)) 414 close(fd); 415 416 for (slice = 1; slice <= 4; slice++) { | 31 32/* 33 * Stand-alone file reading package. 34 */ 35 36#include <sys/param.h> 37#include <sys/disklabel.h> 38#include <sys/time.h> --- 370 unchanged lines hidden (view full) --- 409 /* 410 * If we find a vdev, the zfs code will eat the fd, otherwise 411 * we close it. 412 */ 413 if (vdev_probe(vdev_read, (void*) (uintptr_t) fd, 0)) 414 close(fd); 415 416 for (slice = 1; slice <= 4; slice++) { |
417 sprintf(devname, "disk%ds%d:", unit, slice); | 417 sprintf(devname, "disk%dp%d:", unit, slice); |
418 fd = open(devname, O_RDONLY); | 418 fd = open(devname, O_RDONLY); |
419 if (fd == -1) 420 continue; | 419 if (fd == -1) { 420 sprintf(devname, "disk%ds%d:", unit, slice); 421 fd = open(devname, O_RDONLY); 422 if (fd == -1) 423 continue; 424 } |
421 if (vdev_probe(vdev_read, (void*) (uintptr_t) fd, 0)) 422 close(fd); 423 } 424 } 425 426 return (0); 427} 428 --- 86 unchanged lines hidden --- | 425 if (vdev_probe(vdev_read, (void*) (uintptr_t) fd, 0)) 426 close(fd); 427 } 428 } 429 430 return (0); 431} 432 --- 86 unchanged lines hidden --- |