Changeset View
Changeset View
Standalone View
Standalone View
stand/libsa/zfs/zfs.c
Show First 20 Lines • Show All 1,558 Lines • ▼ Show 20 Lines | zfs_dev_print(int verbose) | ||||
} | } | ||||
return (ret); | return (ret); | ||||
} | } | ||||
/* | /* | ||||
* Attempt to open the pool described by (dev) for use by (f). | * Attempt to open the pool described by (dev) for use by (f). | ||||
*/ | */ | ||||
static int | static int | ||||
zfs_dev_open(struct open_file *f, ...) | zfs_dev_open(struct open_file *f) | ||||
{ | { | ||||
va_list args; | |||||
struct zfs_devdesc *dev; | struct zfs_devdesc *dev; | ||||
struct zfsmount *mount; | struct zfsmount *mount; | ||||
spa_t *spa; | spa_t *spa; | ||||
int rv; | int rv; | ||||
va_start(args, f); | dev = (struct zfs_devdesc *)f->f_devdata; | ||||
dev = va_arg(args, struct zfs_devdesc *); | |||||
va_end(args); | |||||
if ((spa = spa_find_by_dev(dev)) == NULL) | if ((spa = spa_find_by_dev(dev)) == NULL) | ||||
return (ENXIO); | return (ENXIO); | ||||
STAILQ_FOREACH(mount, &zfsmount, next) { | STAILQ_FOREACH(mount, &zfsmount, next) { | ||||
if (spa->spa_guid == mount->spa->spa_guid) | if (spa->spa_guid == mount->spa->spa_guid) | ||||
break; | break; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 453 Lines • Show Last 20 Lines |