diff mbox series

[MINIOS,v3,12/12] make files array private to sys.c

Message ID 20220116083328.26524-13-jgross@suse.com (mailing list archive)
State New, archived
Headers show
Series remove device specific struct file members | expand

Commit Message

Jürgen Groß Jan. 16, 2022, 8:33 a.m. UTC
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 | 2 --
 lib/sys.c     | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/include/lib.h b/include/lib.h
index e815e0a3..bec99646 100644
--- a/include/lib.h
+++ b/include/lib.h
@@ -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);
diff --git a/lib/sys.c b/lib/sys.c
index 7f3dc4e4..8f8a3de2 100644
--- 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 */