diff options
| author | Dan McDonald <danmcd@joyent.com> | 2021-08-20 17:08:39 -0400 |
|---|---|---|
| committer | Dan McDonald <danmcd@joyent.com> | 2021-08-20 17:08:39 -0400 |
| commit | a2147f7a3c06d97137a8fe90bd5a977834ce127e (patch) | |
| tree | c0c7e9853712f3a675df762f911cfd0c0e86e45a /usr/src/boot/lib/libstand/stand.h | |
| parent | 11a4a3baf9e07b7dce7a0bf888f756236a4037e4 (diff) | |
| parent | a2027c5d4c477546faea39a790b019c3480c9b9b (diff) | |
| download | illumos-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.h | 8 |
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 */ |
