git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
allow specifiying access mode when creating twifs file node
[lunaix-os.git]
/
lunaix-os
/
includes
/
lunaix
/
fs
/
twimap.h
diff --git
a/lunaix-os/includes/lunaix/fs/twimap.h
b/lunaix-os/includes/lunaix/fs/twimap.h
index c9d56a2aaa6a1de1dcd8a8a29cdf74ed88b43808..3086c633c44d41b46be2e7ffadd9cd8a9f60a76b 100644
(file)
--- a/
lunaix-os/includes/lunaix/fs/twimap.h
+++ b/
lunaix-os/includes/lunaix/fs/twimap.h
@@
-8,15
+8,29
@@
extern struct v_file_ops twimap_file_ops;
extern struct v_file_ops twimap_file_ops;
+#define __TWIMAP_OPS \
+ void (*read)(struct twimap* mapping); \
+ int (*go_next)(struct twimap* mapping); \
+ void (*reset)(struct twimap* mapping);
+
+struct twimap;
+struct twimap_ops
+{
+ __TWIMAP_OPS
+};
+
struct twimap
{
void* index;
void* buffer;
void* data;
size_t size_acc;
struct twimap
{
void* index;
void* buffer;
void* data;
size_t size_acc;
- void (*read)(struct twimap* mapping);
- int (*go_next)(struct twimap* mapping);
- void (*reset)(struct twimap* mapping);
+ union
+ {
+ struct twimap_ops ops;
+ struct { __TWIMAP_OPS };
+ };
+
};
int
};
int