Lines Matching +full:device +full:- +full:version
3 * Common Development and Distribution License ("CDDL"), version 1.0.
4 * You may only use this file in accordance with the terms of version
23 * Store device name to zpool label bootenv area.
24 * This call will set bootenv version to VB_NVLIST, if bootenv currently
25 * does contain other version, then old data will be replaced.
28 lzbe_set_boot_device(const char *pool, lzbe_flags_t flag, const char *device) in lzbe_set_boot_device() argument
34 uint64_t version; in lzbe_set_boot_device() local
35 int rv = -1; in lzbe_set_boot_device()
54 * We got the nvlist, check for version. in lzbe_set_boot_device()
55 * if version is missing or is not VB_NVLIST, in lzbe_set_boot_device()
59 &version); in lzbe_set_boot_device()
60 if (rv == 0 && version == VB_NVLIST) in lzbe_set_boot_device()
74 /* version is mandatory */ in lzbe_set_boot_device()
79 * If device name is empty, remove boot device configuration. in lzbe_set_boot_device()
81 if ((device == NULL || *device == '\0')) { in lzbe_set_boot_device()
86 * Use device name directly if it does start with in lzbe_set_boot_device()
89 if (strncmp(device, "zfs:", 4) == 0) { in lzbe_set_boot_device()
90 fnvlist_add_string(nv, OS_BOOTONCE, device); in lzbe_set_boot_device()
92 if (asprintf(&descriptor, "zfs:%s:", device) > 0) { in lzbe_set_boot_device()
111 * Return boot device name from bootenv, if set.
114 lzbe_get_boot_device(const char *pool, char **device) in lzbe_get_boot_device() argument
120 int rv = -1; in lzbe_get_boot_device()
122 if (pool == NULL || *pool == '\0' || device == NULL) in lzbe_get_boot_device()
139 * zfs device descriptor is in form of "zfs:dataset:", in lzbe_get_boot_device()
147 if (tmp[len - 1] == ':') in lzbe_get_boot_device()
148 tmp[len - 1] = '\0'; in lzbe_get_boot_device()
149 *device = tmp; in lzbe_get_boot_device()