]> xenbits.xensource.com Git - mini-os.git/commitdiff
make files array private to sys.c
authorJuergen Gross <jgross@suse.com>
Sun, 16 Jan 2022 08:33:28 +0000 (09:33 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 18 Jan 2022 18:26:43 +0000 (18:26 +0000)
There is no user of the files[] array outside of lib/sys.c left, so
it can be made static.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
include/lib.h
lib/sys.c

index e815e0a3c03a77f74887a5ed0a062f437fc72033..bec99646eea4af2575da52fa26fa0c794dfdf2d7 100644 (file)
@@ -175,8 +175,6 @@ struct file {
     };
 };
 
-extern struct file files[];
-
 struct file_ops {
     const char *name;
     int (*read)(struct file *file, void *buf, size_t nbytes);
index 7f3dc4e4a7694adae23b5235b236b2b9606a19a9..8f8a3de22ec697f4b277e51ee231fc338fc3723e 100644 (file)
--- a/lib/sys.c
+++ b/lib/sys.c
@@ -89,7 +89,7 @@ extern void minios_evtchn_close_fd(int fd);
 extern void minios_gnttab_close_fd(int fd);
 
 pthread_mutex_t fd_lock = PTHREAD_MUTEX_INITIALIZER;
-struct file files[NOFILE] = {
+static struct file files[NOFILE] = {
     { .type = FTYPE_CONSOLE }, /* stdin */
     { .type = FTYPE_CONSOLE }, /* stdout */
     { .type = FTYPE_CONSOLE }, /* stderr */