zfs boot: allow file vdevs to be used in testing (e.g. with zfsboottest)

MFC after:	1 week
This commit is contained in:
avg 2011-12-04 21:29:56 +00:00
parent c3db2f30bb
commit 2d5c2df342

View File

@ -458,6 +458,9 @@ vdev_init_from_nvlist(const unsigned char *nvlist, vdev_t *pvdev,
if (strcmp(type, VDEV_TYPE_MIRROR)
&& strcmp(type, VDEV_TYPE_DISK)
#ifdef ZFS_TEST
&& strcmp(type, VDEV_TYPE_FILE)
#endif
&& strcmp(type, VDEV_TYPE_RAIDZ)
&& strcmp(type, VDEV_TYPE_REPLACING)) {
printf("ZFS: can only boot from disk, mirror, raidz1, raidz2 and raidz3 vdevs\n");