Andreas Kling
2cfcbdc735
AK: Add Retained<T>, like RetainPtr, but never null.
...
Also use some Clang attribute wizardry to get a warning for use-after-move.
2019-02-25 12:43:52 +01:00
Andreas Kling
d218686c0a
Ext2FS: Don't copy more than sizeof(ext2_inode) bytes of raw inode data.
...
Some file systems have inodes larger than sizeof(ext2_inode) so this would
stomp all over unrelated data.
2019-02-24 14:24:04 +01:00
Andreas Kling
1da261eeb6
Ext2FS: Tweak a debug message to print file mode in octal.
2019-02-22 09:13:05 +01:00
Andreas Kling
f5f136931a
Kernel: Start adding various file system permission checks.
...
Fail with EACCES in various situations. Fix userland bugs that were exposed.
2019-02-21 15:45:31 +01:00
Andreas Kling
43075e5878
Add a simple /bin/df which gathers its info from /proc/df.
2019-02-21 14:48:00 +01:00
Andreas Kling
7d288aafb2
Kernel: Add link() syscall to create hard links.
...
This accidentally grew into a little bit of VFS cleanup as well.
Also add a simple /bin/ln implementation to exercise it.
2019-02-21 13:26:40 +01:00
Andreas Kling
e0b81ee4c9
Ext2FS: Remove the inode cache lock in favor of one big lock instead.
2019-02-20 21:58:55 +01:00
Andreas Kling
3df4a902df
Ext2FS: Lock a lot. Go way overkill with locking for now.
2019-02-20 13:09:59 +01:00
Andreas Kling
799177feda
Kernel: Make BochsVGADevice a BlockDevice and support mmapping it.
...
Currently you can only mmap the entire framebuffer.
Using this when starting up the WindowServer gets us yet another step
closer towards it moving into userspace. :^)
2019-02-16 09:57:42 +01:00
Andreas Kling
749db8237c
Ext2FS: Fix various bugs in inode and block allocation.
...
I had the wrong idea about how group indices work, so using a larger fs
with more than one group caused all kinds of mess.
2019-02-15 23:28:20 +01:00
Andreas Kling
f8951afe17
Ext2FS: Fix broken logic for accessing inode and block bitmaps.
...
This logic only worked for the very first block group.
2019-02-11 12:46:56 +01:00
Andreas Kling
298a49c688
IDEDiskDevice: Detect disk errors and report failure to clients.
...
Previously we'd just fail silently if there was an I/O error of any kind.
2019-02-11 11:38:14 +01:00
Andreas Kling
6274208eb9
Ext2FS: Fix bitmap overrun when reaching outside the first block group.
2019-02-08 17:14:51 +01:00
Andreas Kling
2736957701
Ext2FS: Fix dumb bitmap size bug in *_inode_allocation_state().
2019-02-08 08:43:08 +01:00
Andreas Kling
ca16d9d98e
Kernel: Invalidate file-backed VMO's when inodes are written.
...
The current strategy is simply to nuke all physical pages and force
reload them from disk. This is obviously not optimal and should eventually
be optimized. It should be fairly straightforward.
2019-02-05 08:17:46 +01:00
Andreas Kling
3a9c01619f
Ext2FS: Avoid a kmallocation every time we fetch an inode from disk.
2019-02-03 04:05:30 +01:00
Andreas Kling
ffab6897aa
Big, possibly complete sweep of naming changes.
2019-01-31 17:31:23 +01:00
Andreas Kling
fc0b63ca3c
Kernel: Include absolute paths of mount points in /proc/mounts
2019-01-31 06:13:55 +01:00
Andreas Kling
c4fce9b3f9
Make stat() work on device files again.
...
FileDescriptor will now keep a pointer to the original inode even after
opening it resolves to a character device.
Fixed up /bin/ls to display major and minor device numbers instead of size
for device files.
2019-01-31 05:05:57 +01:00
Andreas Kling
c3cc318028
Ext2FS: Remove an unnecessary heap allocation in create_inode().
2019-01-31 04:17:16 +01:00
Andreas Kling
3a4207b863
Fix dumb bug in HashTable::clear().
...
We forgot to clear the m_buckets pointer. This meant that multiple calls to
clear() would cause trouble.
2019-01-30 19:32:54 +01:00
Andreas Kling
c30e2c8d44
Implement basic chmod() syscall and /bin/chmod helper.
...
Only raw octal modes are supported right now.
This patch also changes mode_t from 32-bit to 16-bit to match the on-disk
type used by Ext2FS.
I also ran into EPERM being errno=0 which was confusing, so I inserted an
ESUCCESS in its place.
2019-01-29 04:55:08 +01:00
Andreas Kling
c95228b128
Add support for removing directories.
...
It's really only supported in Ext2FS since SynthFS doesn't really want you
mucking around with its files. This is pretty neat though :^)
I ran into some trouble with HashMap while working on this but opted to work
around it and leave that for a separate investigation.
2019-01-28 04:16:01 +01:00
Andreas Kling
1ee8597ce4
Ext2FS: Include meta blocks in an inode's i_blocks count.
2019-01-23 15:43:29 +01:00
Andreas Kling
8bb18fdc56
Kernel: Get rid of Unix namespace.
...
This is no longer needed as the Kernel can stand on its own legs now
and there won't be any conflict with host system data types.
2019-01-23 06:57:00 +01:00
Andreas Kling
730c14e647
VFS: Rename FS::id() to fsid() for consistency.
2019-01-23 05:39:11 +01:00
Andreas Kling
754037874c
Move VFS sources into Kernel/.
2019-01-23 05:14:00 +01:00