diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-10-22 22:55:02 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-10-22 22:55:02 +0200 |
| commit | 3c33d36759a316b8c118b77b3eed040425db8e0a (patch) | |
| tree | 07d5a05ceccf7de043f41ea49e34824e235b0cd9 /fs/fs.c | |
| parent | 9fafc0e4937b039d67031e09843af12e9049cd73 (diff) | |
working on ext2 and readdir syscall
Diffstat (limited to 'fs/fs.c')
| -rw-r--r-- | fs/fs.c | 17 |
1 files changed, 2 insertions, 15 deletions
@@ -4,23 +4,10 @@ // // returns number of entries in the directory specified by name. // fills 0-max into *dirs + int fs_readdir(const char *name,fs_dirent *dirs,int max) { - int testdata=5; - - int inodes[]={13,14,15,16,17}; - char names[][256]={"dupa","test","drei","vier","funf"}; - char type[]={2,2,1,2,1}; - - for(int i=0;i<5;i++) - { - dirs[i].inode=inodes[i]; - for(int j=0;j<256;j++) - dirs[i].name[j]=names[i][j]; - dirs[i].type=type[i]; - } - - return 5; + return ext2_read_dir(0x80800, 2,dirs,max); // TODO: hardcoded, fix this } |
