From: Masatake YAMATO Date: Wed, 1 May 2024 17:21:09 +0000 (+0900) Subject: lsns: (refactor) rename read_related_namespaces to connect_namespaces X-Git-Tag: v2.42-start~354^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a998ea99bfd49ad25dacf058e36bbf21a4c8e88;p=thirdparty%2Futil-linux.git lsns: (refactor) rename read_related_namespaces to connect_namespaces 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 --- diff --git a/sys-utils/lsns.c b/sys-utils/lsns.c index 2d62dedf4..1bc533b9d 100644 --- a/sys-utils/lsns.c +++ b/sys-utils/lsns.c @@ -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);