Andreas Kling
63764b3a65
Import very modest Userland.
2018-10-22 14:06:22 +02:00
Andreas Kling
ba185e3eba
Zero out VirtualFileSystem::s_the in initializeGlobals().
...
This catches attempts to access the vfs before it's been constructed.
2018-10-22 12:54:19 +02:00
Andreas Kling
79ffdb7205
A lot of hacking:
...
- More work on funneling console output through Console.
- init() now breaks off into a separate task ASAP.
- ..this leaves the "colonel" task as a simple hlt idle loop.
- Mask all IRQs on startup (except IRQ2 for slave passthru)
- Fix underallocation bug in Task::allocateRegion().
- Remember how many times each Task has been scheduled.
The panel and scheduling banner are disabled until I get things
working nicely in the (brave) new Console world.
2018-10-22 11:15:16 +02:00
Andreas Kling
a89bebfda4
printf -> kprintf
2018-10-21 23:48:13 +02:00
Andreas Kling
2d1d01661b
Add a way to initialize VFS globals.
...
This is needed since the kernel loader doesn't even zero out bss,
much less call any static constructors.
2018-10-19 11:20:49 +02:00
Andreas Kling
e86cadc7af
Add an fd field to FileHandle in Kernel builds.
2018-10-18 10:27:07 +02:00
Andreas Kling
f82b25d4f9
Fix some minor build warnings.
2018-10-17 16:48:43 +02:00
Andreas Kling
7580ac576f
Make VFS host build work again.
2018-10-17 12:23:19 +02:00
Andreas Kling
39fa1eb2c2
Print the contents of motd.txt on boot.
2018-10-17 12:07:39 +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
aec8ab0a60
Add the basic character devices to kernel.
2018-10-16 14:33:16 +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
cafb5b2ad6
Fixup small.fs again.
2018-10-16 14:00:44 +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
b0eaca436c
"stat" command should print st_mode in octal.
2018-10-15 02:12:09 +02:00
Andreas Kling
47fc6344ac
Support the ext2 directory entry file_type field.
2018-10-15 01:57:57 +02:00
Andreas Kling
e7901476d3
Bring back the intentionally broken symlink I had for testing.
2018-10-15 01:00:01 +02:00
Andreas Kling
05b088ee2f
Add a simple /dev/random.
2018-10-15 00:44:54 +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
9f9b4a2382
Add a simple /dev/full.
2018-10-14 13:16:09 +02:00
Andreas Kling
e5acbca0e8
Disable the "create /empty" test path for now.
2018-10-14 03:02:28 +02:00
Andreas Kling
93556d6743
Add basic character device support. Start with null and zero.
2018-10-14 03:01:32 +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
03a0dc0103
Add a /dev/zero to the small.fs image.
2018-10-14 02:09:34 +02:00
Andreas Kling
6ea8ce500c
Use HashMap::remove() in some places that I wanted it.
2018-10-13 14:26:37 +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