be_info.c (e307eb94ae520d98dc1d346a0c53667a41beab5d) be_info.c (5773e924e791dfe8cc13049cefbf5f99aab6cc66)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
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

--- 291 unchanged lines hidden (view full) ---

300 }
301}
302
303
304/*
305 * Usage
306 */
307int
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
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

--- 291 unchanged lines hidden (view full) ---

300 }
301}
302
303
304/*
305 * Usage
306 */
307int
308be_exists(libbe_handle_t *lbh, char *be)
308be_exists(libbe_handle_t *lbh, const char *be)
309{
310 char buf[BE_MAXPATHLEN];
311
312 be_root_concat(lbh, be, buf);
313
314 if (!zfs_dataset_exists(lbh->lzh, buf, ZFS_TYPE_DATASET))
315 return (BE_ERR_NOENT);
316
317 return (BE_ERR_SUCCESS);
318}
309{
310 char buf[BE_MAXPATHLEN];
311
312 be_root_concat(lbh, be, buf);
313
314 if (!zfs_dataset_exists(lbh->lzh, buf, ZFS_TYPE_DATASET))
315 return (BE_ERR_NOENT);
316
317 return (BE_ERR_SUCCESS);
318}