| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
#include "sd-id128.h" |
| 5 |
|
| 6 |
#include "shared-forward.h" |
| 7 |
|
| 8 |
typedef enum MakeFilesystemFlags { |
| 9 |
MKFS_QUIET = 1 << 0, /* Suppress mkfs command output */ |
| 10 |
MKFS_DISCARD = 1 << 1, /* Enable 'discard' mode on the filesystem */ |
| 11 |
MKFS_FS_VERITY = 1 << 2, /* Enable fs-verity support on the filesystem */ |
| 12 |
} MakeFileSystemFlags; |
| 13 |
|
| 14 |
int mkfs_exists(const char *fstype); |
| 15 |
int mkfs_find_or_warn(const char *fstype, int have_root, char **ret); |
| 16 |
|
| 17 |
int mkfs_supports_root_option(const char *fstype); |
| 18 |
|
| 19 |
int make_filesystem( |
| 20 |
const char *node, |
| 21 |
const char *fstype, |
| 22 |
const char *label, |
| 23 |
const char *root, |
| 24 |
sd_id128_t uuid, |
| 25 |
MakeFileSystemFlags flags, |
| 26 |
uint64_t sector_size, |
| 27 |
char *compression, |
| 28 |
char *compression_level, |
| 29 |
char * const *extra_mkfs_args); |
| 30 |
|
| 31 |
int mkfs_options_from_env(const char *component, const char *fstype, char ***ret); |