summaryrefslogtreecommitdiff
path: root/fs.h
diff options
context:
space:
mode:
authorkaashoek <kaashoek>2006-08-08 18:07:37 +0000
committerkaashoek <kaashoek>2006-08-08 18:07:37 +0000
commite8d11c2e846ad15b32caacc8a919722b76d00f79 (patch)
tree057169eaa21dc0151931d8e30072ce0d26d89bcf /fs.h
parent104207726be721843e44b8616faa87222aa5f0c2 (diff)
downloadxv6-labs-e8d11c2e846ad15b32caacc8a919722b76d00f79.tar.gz
xv6-labs-e8d11c2e846ad15b32caacc8a919722b76d00f79.tar.bz2
xv6-labs-e8d11c2e846ad15b32caacc8a919722b76d00f79.zip
mknod,ialloc,iupdate
Diffstat (limited to 'fs.h')
-rw-r--r--fs.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs.h b/fs.h
index a842e64..48a1c13 100644
--- a/fs.h
+++ b/fs.h
@@ -6,18 +6,22 @@ struct superblock{
int ninodes;
};
-#define NDIRECT 14
+#define NDIRECT 13
// inodes start at the third sector
// and blocks start at (ninodes * sizeof(dinode) + 511) / 512
struct dinode {
short type;
+ short major;
+ short minor;
short nlink;
uint size;
uint addrs[NDIRECT];
};
+
#define T_DIR 1
#define T_FILE 2
+#define T_DEV 3
#define IPB (512 / sizeof(struct dinode))