From: Dirk Vogt Date: Tue, 22 Feb 2011 18:03:33 +0000 (+0000) Subject: procfs: only initialize the first time procfs is mounte X-Git-Tag: v3.2.0~647 X-Git-Url: http://zhaoyanbai.com/repos/%22../static/icons/man.7.txt?a=commitdiff_plain;h=344c18cf73a4ae8f424181942f3879a9ed666899;p=minix.git procfs: only initialize the first time procfs is mounte --- diff --git a/servers/procfs/main.c b/servers/procfs/main.c index fac11eafa..193aa94bd 100644 --- a/servers/procfs/main.c +++ b/servers/procfs/main.c @@ -54,11 +54,16 @@ PRIVATE void init_hook(void) { /* Initialization hook. Generate the static part of the tree. */ + static int first_time = 1; struct inode *root; - root = get_root_inode(); + if (first_time) { + root = get_root_inode(); - construct_tree(root, root_files); + construct_tree(root, root_files); + + first_time = 0; + } } /*===========================================================================*