summaryrefslogtreecommitdiff
path: root/fs.h
diff options
context:
space:
mode:
authorkaashoek <kaashoek>2006-08-24 02:44:41 +0000
committerkaashoek <kaashoek>2006-08-24 02:44:41 +0000
commitea2909b6b5ceb54383ab23fd195ebae29cfdb7ca (patch)
tree78a7076d23319c0c38b7f62108b6d06908379c42 /fs.h
parent8b58e81077abf4e843873f16c03077e2fafce52d (diff)
downloadxv6-labs-ea2909b6b5ceb54383ab23fd195ebae29cfdb7ca.tar.gz
xv6-labs-ea2909b6b5ceb54383ab23fd195ebae29cfdb7ca.tar.bz2
xv6-labs-ea2909b6b5ceb54383ab23fd195ebae29cfdb7ca.zip
user-level malloc (untested)
nit in sbrk indirect block fix dup to share fd struct
Diffstat (limited to 'fs.h')
-rw-r--r--fs.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs.h b/fs.h
index 2112c25..de81e81 100644
--- a/fs.h
+++ b/fs.h
@@ -9,7 +9,11 @@ struct superblock{
uint ninodes;
};
-#define NDIRECT 13
+#define NADDRS NDIRECT+1
+#define NDIRECT 12
+#define INDIRECT 12
+#define NINDIRECT (BSIZE / sizeof(uint))
+#define MAXFILE (NDIRECT + NINDIRECT)
struct dinode {
short type;
@@ -17,7 +21,7 @@ struct dinode {
short minor;
short nlink;
uint size;
- uint addrs[NDIRECT];
+ uint addrs[NADDRS];
};
#define T_DIR 1