Deleted Added
full compact
zfsboottest.c (253067) zfsboottest.c (290452)
1/*-
2 * Copyright (c) 2010 Doug Rabson
3 * Copyright (c) 2011 Andriy Gapon
4 * Copyright (c) 2011 Pawel Jakub Dawidek <pawel@dawidek.net>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
1/*-
2 * Copyright (c) 2010 Doug Rabson
3 * Copyright (c) 2011 Andriy Gapon
4 * Copyright (c) 2011 Pawel Jakub Dawidek <pawel@dawidek.net>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28/* $FreeBSD: head/tools/tools/zfsboottest/zfsboottest.c 253067 2013-07-09 08:29:14Z avg $ */
28/* $FreeBSD: head/tools/tools/zfsboottest/zfsboottest.c 290452 2015-11-06 16:27:22Z avg $ */
29
30#include <sys/param.h>
31#include <sys/queue.h>
32#include <err.h>
33#include <errno.h>
34#include <fcntl.h>
35#include <md5.h>
36#include <stdint.h>

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

131 continue;
132 }
133 if (vdev_probe(vdev_read, &fd[i - 1], NULL) != 0) {
134 warnx("vdev_probe(%s) failed", argv[i]);
135 close(fd[i - 1]);
136 }
137 }
138
29
30#include <sys/param.h>
31#include <sys/queue.h>
32#include <err.h>
33#include <errno.h>
34#include <fcntl.h>
35#include <md5.h>
36#include <stdint.h>

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

131 continue;
132 }
133 if (vdev_probe(vdev_read, &fd[i - 1], NULL) != 0) {
134 warnx("vdev_probe(%s) failed", argv[i]);
135 close(fd[i - 1]);
136 }
137 }
138
139 STAILQ_FOREACH(spa, &zfs_pools, spa_link) {
140 if (zfs_spa_init(spa)) {
141 fprintf(stderr, "can't init pool %s\n", spa->spa_name);
142 exit(1);
143 }
144 }
145
146 spa_all_status();
147
139 spa = STAILQ_FIRST(&zfs_pools);
140 if (spa == NULL) {
141 fprintf(stderr, "no pools\n");
142 exit(1);
143 }
144
148 spa = STAILQ_FIRST(&zfs_pools);
149 if (spa == NULL) {
150 fprintf(stderr, "no pools\n");
151 exit(1);
152 }
153
145 if (zfs_spa_init(spa)) {
146 fprintf(stderr, "can't init pool\n");
147 exit(1);
148 }
149
150 spa_all_status();
151
152#if 0
153 uint64_t rootobj;
154 if (zfs_get_root(spa, &rootobj)) {
155 fprintf(stderr, "can't get root\n");
156 exit(1);
157 }
158
159 if (zfs_mount(spa, rootobj, &zfsmnt)) {

--- 44 unchanged lines hidden ---
154#if 0
155 uint64_t rootobj;
156 if (zfs_get_root(spa, &rootobj)) {
157 fprintf(stderr, "can't get root\n");
158 exit(1);
159 }
160
161 if (zfs_mount(spa, rootobj, &zfsmnt)) {

--- 44 unchanged lines hidden ---