]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsns: (refactor) rename read_related_namespaces to connect_namespaces
authorMasatake YAMATO <yamato@redhat.com>
Wed, 1 May 2024 17:21:09 +0000 (02:21 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Wed, 1 May 2024 19:54:09 +0000 (04:54 +0900)
read_related_namespaces() itself doesn't read names of new namespaces.
Connecting namespaces for making a tree is the the main job the function.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
sys-utils/lsns.c

index 2d62dedf44a566c510cf5d8e62dd8246f74f5ad8..1bc533b9d551df0a2879fbe378d4818f749d2ebc 100644 (file)
@@ -890,7 +890,7 @@ static void interpolate_missing_namespaces(struct lsns *ls, struct lsns_namespac
        close(fd_missing);
 }
 
-static void read_related_namespaces(struct lsns *ls)
+static void connect_namespaces(struct lsns *ls)
 {
        struct list_head *p;
        struct lsns_namespace *orphan[2] = {NULL, NULL};
@@ -1011,7 +1011,7 @@ static int read_namespaces(struct lsns *ls)
        read_persistent_namespaces(ls);
 
        if (ls->tree == LSNS_TREE_OWNER || ls->tree == LSNS_TREE_PARENT)
-               read_related_namespaces(ls);
+               connect_namespaces(ls);
 #endif
        list_sort(&ls->namespaces, cmp_namespaces, NULL);