lk: add mkfifo support
Alex Chiang
achiang at hp.com
Thu Apr 10 11:21:09 PDT 2008
Add mkfifo support. Leave special iops undefined for now.
Tested with the Linux POSIX file system test suite:
/root/crfs/pjd-fstest-20080402/tests/mkfifo/00......ok
/root/crfs/pjd-fstest-20080402/tests/mkfifo/01......ok
/root/crfs/pjd-fstest-20080402/tests/mkfifo/02......ok
/root/crfs/pjd-fstest-20080402/tests/mkfifo/03......ok
/root/crfs/pjd-fstest-20080402/tests/mkfifo/04......ok
/root/crfs/pjd-fstest-20080402/tests/mkfifo/05......ok
/root/crfs/pjd-fstest-20080402/tests/mkfifo/06......ok
/root/crfs/pjd-fstest-20080402/tests/mkfifo/07......ok
/root/crfs/pjd-fstest-20080402/tests/mkfifo/08......ok
/root/crfs/pjd-fstest-20080402/tests/mkfifo/09......ok
/root/crfs/pjd-fstest-20080402/tests/mkfifo/10......ok
/root/crfs/pjd-fstest-20080402/tests/mkfifo/11......ok
/root/crfs/pjd-fstest-20080402/tests/mkfifo/12......ok
Signed-off-by: Alex Chiang <achiang at hp.com>
---
diff -r da91356bfe57 lk/inode.c
--- a/lk/inode.c Mon Apr 07 17:52:34 2008 -0700
+++ b/lk/inode.c Thu Apr 10 11:57:47 2008 -0600
@@ -90,6 +90,10 @@ int crfs_populate_inode(struct inode *in
case S_IFLNK:
inode->i_op = &crfs_symlink_iops;
break;
+ case S_IFIFO:
+ inode->i_op = &crfs_special_iops;
+ init_special_inode(inode, inode->i_mode, inode->i_rdev);
+ break;
default:
BUG();
break;
diff -r da91356bfe57 lk/namei.c
--- a/lk/namei.c Mon Apr 07 17:52:34 2008 -0700
+++ b/lk/namei.c Thu Apr 10 12:14:13 2008 -0600
@@ -982,3 +982,10 @@ struct inode_operations crfs_dir_iops =
// .link = crfs_link,
.symlink = crfs_symlink,
};
+
+/*
+ * Empty for now
+ */
+struct inode_operations crfs_special_iops = {
+
+};
diff -r da91356bfe57 lk/namei.h
--- a/lk/namei.h Mon Apr 07 17:52:34 2008 -0700
+++ b/lk/namei.h Thu Apr 10 11:58:38 2008 -0600
@@ -20,6 +20,7 @@
extern struct inode_operations crfs_dir_iops;
extern struct inode_operations crfs_symlink_iops;
+extern struct inode_operations crfs_special_iops;
/* XXX should these be in their own file? */
struct crfs_change_func_args;
More information about the crfs-devel
mailing list