diff options
| author | Toomas Soome <tsoome@me.com> | 2021-07-21 23:32:24 +0300 |
|---|---|---|
| committer | Toomas Soome <tsoome@me.com> | 2021-08-20 20:04:44 +0300 |
| commit | a2027c5d4c477546faea39a790b019c3480c9b9b (patch) | |
| tree | 6acaede0abe496e863e86036da0081660115d0db /usr/src/boot/lib/libstand/stand.h | |
| parent | d6bf170859287b7b5b26419e266a7e6fdee7ff4d (diff) | |
| download | illumos-joyent-a2027c5d4c477546faea39a790b019c3480c9b9b.tar.gz | |
13965 loader: open file list should be dynamic
Reviewed by: Andy Fiddaman <andy@omnios.org>
Approved by: Robert Mustacchi <rm@fingolfin.org>
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 */ |
