zpool_vdev.c (296537) | zpool_vdev.c (297763) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 65 unchanged lines hidden (view full) --- 74#include <paths.h> 75#include <sys/stat.h> 76#include <sys/disk.h> 77#include <sys/mntent.h> 78#include <libgeom.h> 79 80#include "zpool_util.h" 81 | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 65 unchanged lines hidden (view full) --- 74#include <paths.h> 75#include <sys/stat.h> 76#include <sys/disk.h> 77#include <sys/mntent.h> 78#include <libgeom.h> 79 80#include "zpool_util.h" 81 |
82#define DISK_ROOT "/dev/dsk" 83#define RDISK_ROOT "/dev/rdsk" | |
84#define BACKUP_SLICE "s2" 85 86/* 87 * For any given vdev specification, we can have multiple errors. The 88 * vdev_error() function keeps track of whether we have seen an error yet, and 89 * prints out a header if its the first error we've seen. 90 */ 91boolean_t error_seen; --- 287 unchanged lines hidden (view full) --- 379is_whole_disk(const char *arg) 380{ 381#ifdef illumos 382 struct dk_gpt *label; 383 int fd; 384 char path[MAXPATHLEN]; 385 386 (void) snprintf(path, sizeof (path), "%s%s%s", | 82#define BACKUP_SLICE "s2" 83 84/* 85 * For any given vdev specification, we can have multiple errors. The 86 * vdev_error() function keeps track of whether we have seen an error yet, and 87 * prints out a header if its the first error we've seen. 88 */ 89boolean_t error_seen; --- 287 unchanged lines hidden (view full) --- 377is_whole_disk(const char *arg) 378{ 379#ifdef illumos 380 struct dk_gpt *label; 381 int fd; 382 char path[MAXPATHLEN]; 383 384 (void) snprintf(path, sizeof (path), "%s%s%s", |
387 RDISK_ROOT, strrchr(arg, '/'), BACKUP_SLICE); | 385 ZFS_RDISK_ROOT, strrchr(arg, '/'), BACKUP_SLICE); |
388 if ((fd = open(path, O_RDWR | O_NDELAY)) < 0) 389 return (B_FALSE); 390 if (efi_alloc_and_init(fd, EFI_NUMPAR, &label) != 0) { 391 (void) close(fd); 392 return (B_FALSE); 393 } 394 efi_free(label); 395 (void) close(fd); --- 1128 unchanged lines hidden --- | 386 if ((fd = open(path, O_RDWR | O_NDELAY)) < 0) 387 return (B_FALSE); 388 if (efi_alloc_and_init(fd, EFI_NUMPAR, &label) != 0) { 389 (void) close(fd); 390 return (B_FALSE); 391 } 392 efi_free(label); 393 (void) close(fd); --- 1128 unchanged lines hidden --- |