util: add generic block device listener helper
Various of our tools operate on block devices, and it's not always obvious to know which block devices are actually appropriate for use. Hence, let's add a helper that allows to list block devices, and supports some limited filtering.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
typedef enum BlockDevListFlags {
|
||||
BLOCKDEV_LIST_SHOW_SYMLINKS = 1 << 0,
|
||||
BLOCKDEV_LIST_REQUIRE_PARTITION_SCANNING = 1 << 1,
|
||||
BLOCKDEV_LIST_IGNORE_ZRAM = 1 << 2,
|
||||
BLOCKDEV_LIST_REQUIRE_LUKS = 1 << 3,
|
||||
} BlockDevListFlags;
|
||||
|
||||
int blockdev_list(BlockDevListFlags flags);
|
||||
Reference in New Issue
Block a user