Andreas Kling
bca4b71bfa
Lots of hacking to make a very simple "ls" utility.
...
I added a dead-simple malloc that only allows allocations < 4096 bytes.
It just forwards the request to mmap() every time.
I also added simplified versions of opendir() and readdir().
2018-10-24 12:50:07 +02:00
Andreas Kling
705832f387
List the root directory after mounting /.
...
So cool that it works! It's spewing out a bunch of terminal escape sequences
that the OS console obviously doesn't support, but we'll get there too.
2018-10-17 11:47:14 +02:00
Andreas Kling
d2425495ca
VirtualFileSystem class builds inside Kernel.
2018-10-17 11:40:58 +02:00
Andreas Kling
9171521752
Integrate ext2 from VFS into Kernel.
2018-10-17 10:57:23 +02:00
Andreas Kling
8293a0ff36
Rework DiskDevice's read() and write() to be non-virtual wrappers.
...
This way subclasses only have to implement readBlock() and writeBlock().
read() and write() require that the offset and length are both divisible
by the blockSize().
2018-10-16 14:13:32 +02:00
Andreas Kling
9cd0a34b5c
BlockDevice -> DiskDevice.
...
BlockDevice was the wrong name for this abstraction, since a block device
is a type of file in a unix system, and we should use that name for that
concept in the fs implementation.
2018-10-16 11:21:49 +02:00
Andreas Kling
f608629704
Implement creating a new directory.
2018-10-16 00:35:03 +02:00
Andreas Kling
5c50d02c2e
Fix bug where allocating a new inode forgot that inodes are 1-based.
2018-10-15 02:42:24 +02:00
Andreas Kling
47fc6344ac
Support the ext2 directory entry file_type field.
2018-10-15 01:57:57 +02:00
Andreas Kling
9528edab92
Move readEntireInode() up to FileSystem (from ext2.)
...
It's just a wrapper around multiple calls to readInodeBytes() now.
2018-10-15 00:16:14 +02:00
Andreas Kling
0286b5ea48
Add a "stat" command to test FileHandle::stat().
2018-10-14 23:39:11 +02:00
Andreas Kling
c7c957966a
Implement SyntheticFileSystem::readInodeBytes().
2018-10-14 23:13:45 +02:00
Andreas Kling
1f41a36c52
Add a Unix namespace for foo_t types.
...
This allows me to keep prototyping things on a random desktop machine,
even if that machine has its own ideas about foo_t types.
2018-10-14 22:57:57 +02:00
Andreas Kling
c6d6ba7512
Minor errno fixups.
2018-10-14 22:16:28 +02:00
Andreas Kling
c94044a04a
Work on POSIX-like read() and lseek() support.
2018-10-14 21:19:27 +02:00
Andreas Kling
fa3b11ac64
Parse out major/minor device from character and block device inodes.
2018-10-14 02:24:12 +02:00
Andreas Kling
750b27cb07
Ext2FileSystem::readInode() should return an empty buffer for 0-length files.
2018-10-13 00:50:35 +02:00
Andreas Kling
c2d42710bb
Fix build.
2018-10-13 00:44:54 +02:00
Andreas Kling
5a30055157
Import all this stuff into a single repo called Serenity.
2018-10-10 11:53:07 +02:00