Changeset View
Changeset View
Standalone View
Standalone View
sys/boot/zfs/zfs.c
Show First 20 Lines • Show All 477 Lines • ▼ Show 20 Lines | zfs_probe_partition(void *arg, const char *partname, | ||||
return (0); | return (0); | ||||
} | } | ||||
int | int | ||||
zfs_probe_dev(const char *devname, uint64_t *pool_guid) | zfs_probe_dev(const char *devname, uint64_t *pool_guid) | ||||
{ | { | ||||
struct ptable *table; | struct ptable *table; | ||||
struct zfs_probe_args pa; | struct zfs_probe_args pa; | ||||
off_t mediasz; | uint64_t mediasz; | ||||
int ret; | int ret; | ||||
pa.fd = open(devname, O_RDONLY); | pa.fd = open(devname, O_RDONLY); | ||||
if (pa.fd == -1) | if (pa.fd == -1) | ||||
return (ENXIO); | return (ENXIO); | ||||
/* Probe the whole disk */ | /* Probe the whole disk */ | ||||
ret = zfs_probe(pa.fd, pool_guid); | ret = zfs_probe(pa.fd, pool_guid); | ||||
if (ret == 0) | if (ret == 0) | ||||
▲ Show 20 Lines • Show All 413 Lines • Show Last 20 Lines |