Update of /cvsroot/envfs/envfs/include/linux
In directory usw-pr-cvs1:/tmp/cvs-serv21374/include/linux
Modified Files:
envfs_fs.h
Log Message:
Changes and stuff.
Index: envfs_fs.h
===================================================================
RCS file: /cvsroot/envfs/envfs/include/linux/envfs_fs.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- envfs_fs.h 2001/09/19 03:01:45 1.1
+++ envfs_fs.h 2001/09/23 04:28:11 1.2
@@ -15,22 +15,60 @@
#include <linux/fs.h>
#include <linux/config.h>
#include <linux/kernel.h>
+#include <linux/list.h>
+#include <linux/smp_lock.h>
#define ENVFS_SUPER_MAGIC 0x9cfe
#define ENVFS_MAX_ENVLEN (4 << 10)
#ifdef CONFIG_ENVFS_FS_DEBUG
- #define envfs_debug(x...) printk(KERN_DEBUG "envfs: " \
+ #define envfs_debug(x...) printk(KERN_EMERG "envfs: " \
__FUNCTION__ "(): " ##x)
#else
- #define envfs_debug(x...)
+ #define envfs_debug(x...) do { } while (0)
#endif
+#define envfs_ll_seek(list, head, pos) \
+do { \
+ unsigned int lpos = pos; \
+ \
+ while (lpos--) \
+ list_for_each(list, head) \
+ ; \
+} while (0)
+
+extern spinlock_t envfs_lock;
+extern struct list_head *envfs_dentry_list;
+
+/*
+ * The envfs dentry is a basic structure for cached information on a
+ * variable within the envp. The envp follows the standard convention
+ * of:
+ * key1:value:key2:value:...
+ *
+ * where the envfs dentry corresponds to each individual key:value pair.
+ *
+ * In addition to this, the key:value pair's position within the envp is
+ * also cached for faster lookup times.
+ *
+ * The envp can't exceed ENVFS_MAX_ENVLEN in length.
+ */
+typedef struct envfs_dentry {
+ struct list_head node;
+ struct dentry *f_dentry;
+ unsigned char *key;
+ unsigned char *val;
+ unsigned int pos;
+ void *priv;
+} envfs_dentry_t;
+
/* fs/envfs/inode.c */
extern struct address_space_operations envfs_aops;
+extern void envfs_delete_inode(struct inode *inode);
extern void envfs_read_inode(struct inode *inode);
-extern struct inode *envfs_get_inode(struct super_block *sb, int mode, int dev);
+extern struct inode *envfs_get_inode(struct super_block *sb, loff_t new_inode, int mode, int dev);
+extern int envfs_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned int arg);
/* fs/envfs/file.c */
extern struct file_operations envfs_fops;
|