[][src]Function btrfsutil::bindings::btrfs_util_subvolume_info

pub unsafe extern "C" fn btrfs_util_subvolume_info(
    path: *const c_char,
    id: u64,
    subvol: *mut btrfs_util_subvolume_info
) -> btrfs_util_error

btrfs_util_subvolume_info() - Get information about a subvolume. @path: Path in a Btrfs filesystem. This may be any path in the filesystem; it does not have to refer to a subvolume unless @id is zero. @id: ID of subvolume to get information about. If zero is given, the subvolume ID of @path is used. @subvol: Returned subvolume information. This can be %NULL if you just want to check whether the subvolume exists; %BTRFS_UTIL_ERROR_SUBVOLUME_NOT_FOUND will be returned if it does not.

This requires appropriate privilege (CAP_SYS_ADMIN) unless @id is zero and the kernel supports BTRFS_IOC_GET_SUBVOL_INFO (kernel >= 4.18).

Return: %BTRFS_UTIL_OK on success, non-zero error code on failure.