| Age | Commit message (Collapse) | Author |
|
- Got rid of dummy proc[0]. Now proc[0] is init.
- Added initcode.S to exec /init, so that /init is
just a regular binary.
- Moved exec out of sysfile to exec.c
- Moved code dealing with fs guts (like struct inode)
from sysfile.c to fs.c. Code dealing with system call
arguments stays in sysfile.c
- Refactored directory routines in fs.c; should be simpler.
- Changed iget to return *unlocked* inode structure.
This solves the lookup-then-use race in namei
without introducing deadlocks.
It also enabled getting rid of the dummy proc[0].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lots of cleanup
|
|
idecref cwd in exit
|
|
|
|
|
|
delete unused functions
a few comments
|
|
forbid create or write of existing directory
mkdir("d1/d2/d3"), .. should refer to d2, not cwd
mkdir increase parent link count
|
|
chdir return -1 if target not a dir
|
|
fix race in mknod / creat
use last component in dirent in mknod, not path
|
|
nit in sbrk
indirect block
fix dup to share fd struct
|
|
better parsing of sh commands (copied from jos sh)
cat: read from 1 if no args
sbrk system call, but untested
getpid system call
moved locks in keyboard intr, but why do we get intr w. null characters from keyboard?
|
|
|
|
renumber system calls (run gmake clean!)
skeleton for dup system call
|
|
cd in shell
nits in mkdir, ls, etc.
|
|
mkdir
ls shows stat info for each dir entry
|
|
stat
|
|
|
|
don't hold fd table lock across idecref() (latter does block i/o)
idecref calls iput() in case last ref -> freeing inode
dir size is 512 * # blocks, so readi/writei &c work
unlink deletes dirent even if ip->nlink > 0
|
|
|
|
no more cons_put system calls
usertests tests two processes writing files
|
|
primitive ls
|
|
remove console init code from userfs
|
|
working unlink, but doesn't free dir blocks that become empty
remove out-of-date comment in ioapic
|
|
sh accepts 0-argument commands (like userfs)
reads from console
|
|
fix acquire() to cli() *before* incrementing nlock
make T_SYSCALL a trap gate, not an interrupt gate
sadly, various crashes if you hold down a keyboard key...
|
|
convert userfs to use printf
bfree
ifree
writei
start on unlink
|
|
O_RDWR, etc.
create file
|
|
set fd to writeable on open for write
|
|
checkpoint: write(fd,"hello\n",6) where fd is a console dev almost works
|
|
give cpu1 a TSS and gdt for when it enters scheduler()
and a pseudo proc[] entry for each cpu
cpu0 waits for each other cpu to start up
read() for files
|
|
|
|
|
|
ioapic
|
|
|
|
|
|
|
|
|
|
iget
mkfs makes a file system image
put this in your .bochsrc:
ata0-slave: type=disk, mode=flat, path="fs.img", cylinders=1024, heads=1, spt=1
|