summaryrefslogtreecommitdiff
path: root/usr/src/boot/lib/libstand/stand.h
diff options
context:
space:
mode:
authorDan McDonald <danmcd@joyent.com>2021-08-20 17:08:39 -0400
committerDan McDonald <danmcd@joyent.com>2021-08-20 17:08:39 -0400
commita2147f7a3c06d97137a8fe90bd5a977834ce127e (patch)
treec0c7e9853712f3a675df762f911cfd0c0e86e45a /usr/src/boot/lib/libstand/stand.h
parent11a4a3baf9e07b7dce7a0bf888f756236a4037e4 (diff)
parenta2027c5d4c477546faea39a790b019c3480c9b9b (diff)
downloadillumos-joyent-a2147f7a3c06d97137a8fe90bd5a977834ce127e.tar.gz
[illumos-gate merge]
commit a2027c5d4c477546faea39a790b019c3480c9b9b 13965 loader: open file list should be dynamic commit d6bf170859287b7b5b26419e266a7e6fdee7ff4d 13997 Want memrchr in libc Conflicts: manifest
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 */