]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
storage_utils: unhide and rename is_valid_storage_type to lxc_is_valid_storage_type
authorAlexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Sun, 18 Feb 2024 14:56:47 +0000 (15:56 +0100)
committerAlexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Sun, 18 Feb 2024 14:56:47 +0000 (15:56 +0100)
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
src/lxc/storage/storage_utils.c
src/lxc/storage/storage_utils.h
src/lxc/tools/lxc_create.c

index 4f329bd907f8be144574171a90547ebb0679e087..37f154e0f19af15e0fbbfa2df0516dece0b7fff8 100644 (file)
@@ -442,7 +442,7 @@ uint64_t get_fssize(char *s)
        return ret;
 }
 
-bool is_valid_storage_type(const char *type)
+bool lxc_is_valid_storage_type(const char *type)
 {
        if (strcmp(type, "dir") == 0 ||
            strcmp(type, "btrfs") == 0 ||
index 1ec9e0c3cc37da6d3cb293022fd8a5382eb4d61c..65f073e673589837e22cf59b6c2912cc4a720c8d 100644 (file)
@@ -37,7 +37,7 @@ __hidden extern const char *linkderef(const char *path, char *dest);
 __hidden extern bool unpriv_snap_allowed(struct lxc_storage *b, const char *t, bool snap,
                                         bool maybesnap);
 __hidden extern uint64_t get_fssize(char *s);
-__hidden extern bool is_valid_storage_type(const char *type);
+extern bool lxc_is_valid_storage_type(const char *type);
 __hidden extern int storage_destroy_wrapper(void *data);
 
 #endif /* __LXC_STORAGE_UTILS_H */
index 82c41e8d0ea7fa5a1996a442976f87dee8a58257..41756078c62f1813cff783628e3b336e5a166a50 100644 (file)
@@ -237,7 +237,7 @@ int lxc_create_main(int argc, char *argv[])
        /* Final check whether the user gave use a valid bdev type. */
        if (strncmp(my_args.bdevtype, "best", strlen(my_args.bdevtype)) != 0 &&
            strncmp(my_args.bdevtype, "_unset", strlen(my_args.bdevtype)) != 0 &&
-           !is_valid_storage_type(my_args.bdevtype)) {
+           !lxc_is_valid_storage_type(my_args.bdevtype)) {
                ERROR("%s is not a valid backing storage type", my_args.bdevtype);
                exit(EXIT_FAILURE);
        }