salvage: add repository path helpers
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#define NWSALVAGE_DEFAULT_RECYCLE_NAME ".recycle"
|
||||
#define NWSALVAGE_DEFAULT_METADATA_NAME ".salvage"
|
||||
#define NWSALVAGE_REPOSITORY_NAME_MAX 64
|
||||
#define NWSALVAGE_PATH_MAX 4096
|
||||
|
||||
struct nwsalvage_config {
|
||||
int enabled;
|
||||
@@ -24,5 +25,14 @@ int nwsalvage_config_set_repositories(struct nwsalvage_config *config,
|
||||
int nwsalvage_config_parse_repositories(struct nwsalvage_config *config,
|
||||
const char *line);
|
||||
int nwsalvage_repository_name_valid(const char *name);
|
||||
int nwsalvage_relative_path_valid(const char *relative_path);
|
||||
int nwsalvage_build_recycle_path(char *out, size_t out_len,
|
||||
const struct nwsalvage_config *config,
|
||||
const char *volume_root,
|
||||
const char *relative_path);
|
||||
int nwsalvage_build_metadata_path(char *out, size_t out_len,
|
||||
const struct nwsalvage_config *config,
|
||||
const char *volume_root,
|
||||
const char *relative_path);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user