summaryrefslogtreecommitdiff
path: root/usr/src/boot/lib/libstand/stand.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/boot/lib/libstand/stand.h')
-rw-r--r--usr/src/boot/lib/libstand/stand.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/src/boot/lib/libstand/stand.h b/usr/src/boot/lib/libstand/stand.h
index 1af513b5fa..408ebd73da 100644
--- a/usr/src/boot/lib/libstand/stand.h
+++ b/usr/src/boot/lib/libstand/stand.h
@@ -65,6 +65,7 @@
#include <sys/cdefs.h>
#include <sys/stat.h>
#include <sys/dirent.h>
+#include <sys/queue.h>
/* this header intentionally exports NULL from <string.h> */
#include <string.h>
@@ -183,11 +184,14 @@ struct open_file {
char *f_rabuf; /* readahead buffer pointer */
size_t f_ralen; /* valid data in readahead buffer */
off_t f_raoffset; /* consumer offset in readahead buffer */
+ int f_id; /* file number */
+ TAILQ_ENTRY(open_file) f_link; /* next entry */
#define SOPEN_RASIZE 512
};
-#define SOPEN_MAX 64
-extern struct open_file files[];
+typedef TAILQ_HEAD(file_list, open_file) file_list_t;
+extern file_list_t files;
+extern struct open_file *fd2open_file(int);
/* f_flags values */
#define F_READ 0x0001 /* file opened for reading */