Changeset View
Changeset View
Standalone View
Standalone View
stand/efi/boot1/zfs_module.c
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Lines | probe(dev_info_t *dev) | ||||
/* ZFS consumes the dev on success so we need a copy. */ | /* ZFS consumes the dev on success so we need a copy. */ | ||||
tdev = malloc(sizeof(*dev)); | tdev = malloc(sizeof(*dev)); | ||||
if (tdev == NULL) { | if (tdev == NULL) { | ||||
DPRINTF("Failed to allocate tdev\n"); | DPRINTF("Failed to allocate tdev\n"); | ||||
return (EFI_OUT_OF_RESOURCES); | return (EFI_OUT_OF_RESOURCES); | ||||
} | } | ||||
memcpy(tdev, dev, sizeof(*dev)); | memcpy(tdev, dev, sizeof(*dev)); | ||||
if (vdev_probe(vdev_read, tdev, &spa) != 0) { | if (vdev_probe(vdev_read, NULL, tdev, &spa) != 0) { | ||||
free(tdev); | free(tdev); | ||||
return (EFI_UNSUPPORTED); | return (EFI_UNSUPPORTED); | ||||
} | } | ||||
dev->devdata = spa; | dev->devdata = spa; | ||||
add_device(&devices, dev); | add_device(&devices, dev); | ||||
return (EFI_SUCCESS); | return (EFI_SUCCESS); | ||||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |