be_info.c (1d386b48a555f61cb7325543adbbb5c3f3407a66) | be_info.c (5086b6ec32d5c82c3d0894eb7bd74a9b81480644) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2017 Kyle J. Kneitinger <kyle@kneit.in> 5 * Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org> 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 167 unchanged lines hidden (view full) --- 176 if (data->single_object) 177 props = data->list; 178 else 179 nvlist_alloc(&props, NV_UNIQUE_NAME, KM_SLEEP); 180 181 dataset = zfs_get_name(zfs_hdl); 182 nvlist_add_string(props, "dataset", dataset); 183 | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2017 Kyle J. Kneitinger <kyle@kneit.in> 5 * Copyright (c) 2018 Kyle Evans <kevans@FreeBSD.org> 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 167 unchanged lines hidden (view full) --- 176 if (data->single_object) 177 props = data->list; 178 else 179 nvlist_alloc(&props, NV_UNIQUE_NAME, KM_SLEEP); 180 181 dataset = zfs_get_name(zfs_hdl); 182 nvlist_add_string(props, "dataset", dataset); 183 |
184 if (data->bootonce != NULL && 185 strcmp(dataset, data->bootonce) == 0) | 184 if (data->lbh->bootonce != NULL && 185 strcmp(dataset, data->lbh->bootonce) == 0) |
186 nvlist_add_boolean_value(props, "bootonce", true); 187 188 name = strrchr(dataset, '/') + 1; 189 nvlist_add_string(props, "name", name); 190 191 mounted = zfs_is_mounted(zfs_hdl, &mountpoint); 192 193 if (mounted) --- 53 unchanged lines hidden (view full) --- 247be_proplist_update(prop_data_t *data) 248{ 249 zfs_handle_t *root_hdl; 250 251 if ((root_hdl = zfs_open(data->lbh->lzh, data->lbh->root, 252 ZFS_TYPE_FILESYSTEM)) == NULL) 253 return (BE_ERR_ZFSOPEN); 254 | 186 nvlist_add_boolean_value(props, "bootonce", true); 187 188 name = strrchr(dataset, '/') + 1; 189 nvlist_add_string(props, "name", name); 190 191 mounted = zfs_is_mounted(zfs_hdl, &mountpoint); 192 193 if (mounted) --- 53 unchanged lines hidden (view full) --- 247be_proplist_update(prop_data_t *data) 248{ 249 zfs_handle_t *root_hdl; 250 251 if ((root_hdl = zfs_open(data->lbh->lzh, data->lbh->root, 252 ZFS_TYPE_FILESYSTEM)) == NULL) 253 return (BE_ERR_ZFSOPEN); 254 |
255 (void) lzbe_get_boot_device(zpool_get_name(data->lbh->active_phandle), 256 &data->bootonce); 257 | |
258 /* XXX TODO: some error checking here */ 259 zfs_iter_filesystems(root_hdl, prop_list_builder_cb, data); 260 261 zfs_close(root_hdl); 262 263 return (0); 264} 265 --- 51 unchanged lines hidden --- | 255 /* XXX TODO: some error checking here */ 256 zfs_iter_filesystems(root_hdl, prop_list_builder_cb, data); 257 258 zfs_close(root_hdl); 259 260 return (0); 261} 262 --- 51 unchanged lines hidden --- |