summaryrefslogtreecommitdiffstats
path: root/lib/libstand/stand.h
diff options
context:
space:
mode:
authorjlemon <jlemon@FreeBSD.org>2000-04-29 20:47:10 +0000
committerjlemon <jlemon@FreeBSD.org>2000-04-29 20:47:10 +0000
commit9f5d586c97f0c69480f51fa40d06e6720f36dd6d (patch)
tree2a80882b8e07436637e0729c87a7192a50231dbd /lib/libstand/stand.h
parent0340a88f8a7d13623dc70269b23cf87bc47decff (diff)
downloadFreeBSD-src-9f5d586c97f0c69480f51fa40d06e6720f36dd6d.zip
FreeBSD-src-9f5d586c97f0c69480f51fa40d06e6720f36dd6d.tar.gz
Add a readdir function to the loader fsops vector, and implement the
functionality for some of the filesystesms.
Diffstat (limited to 'lib/libstand/stand.h')
-rw-r--r--lib/libstand/stand.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/libstand/stand.h b/lib/libstand/stand.h
index 23626a5..5fd209d 100644
--- a/lib/libstand/stand.h
+++ b/lib/libstand/stand.h
@@ -65,6 +65,7 @@
#include <sys/types.h>
#include <sys/cdefs.h>
#include <sys/stat.h>
+#include <sys/dirent.h>
#define CHK(fmt, args...) printf("%s(%d): " fmt "\n", __FUNCTION__, __LINE__ , ##args)
#define PCHK(fmt, args...) {printf("%s(%d): " fmt "\n", __FUNCTION__, __LINE__ , ##args); getchar();}
@@ -109,6 +110,7 @@ struct fs_ops {
size_t size, size_t *resid);
off_t (*fo_seek)(struct open_file *f, off_t offset, int where);
int (*fo_stat)(struct open_file *f, struct stat *sb);
+ int (*fo_readdir)(struct open_file *f, struct dirent *d);
};
/*
@@ -120,6 +122,7 @@ extern struct fs_ops nfs_fsops;
extern struct fs_ops cd9660_fsops;
extern struct fs_ops zipfs_fsops;
extern struct fs_ops dosfs_fsops;
+extern struct fs_ops ext2fs_fsops;
/* where values for lseek(2) */
#define SEEK_SET 0 /* set file offset to offset */
@@ -141,6 +144,11 @@ struct devsw {
void (*dv_cleanup)();
};
+/*
+ * libstand-supplied device switch
+ */
+extern struct devsw netdev;
+
extern int errno;
struct open_file {
@@ -221,6 +229,7 @@ extern ssize_t read(int, void *, size_t);
extern ssize_t write(int, void *, size_t);
extern off_t lseek(int, off_t, int);
extern int stat(const char *, struct stat *);
+extern struct dirent *readdirfd(int);
extern void srandom(u_long seed);
extern u_long random(void);
@@ -312,6 +321,8 @@ extern int null_read(struct open_file *f, void *buf, size_t size, size_t *resid)
extern int null_write(struct open_file *f, void *buf, size_t size, size_t *resid);
extern off_t null_seek(struct open_file *f, off_t offset, int where);
extern int null_stat(struct open_file *f, struct stat *sb);
+extern int null_readdir(struct open_file *f, struct dirent *d);
+
/*
* Machine dependent functions and data, must be provided or stubbed by
OpenPOWER on IntegriCloud