summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem
AgeCommit message (Collapse)Author
2019-07-18ps: Port to using CProcessStatisticsReader and /proc/allRobin Burchell
Drop /proc/summary in the process. We only needed one new field here, thankfully, so this was quite straightforward.
2019-07-18CProcessStatisticsReader: Be consistent about terminology from the kernel downRobin Burchell
2019-07-16Kernel: Remove use of [[gnu::pure]].Andreas Kling
I was messing around with this to tell the compiler that these functions always return the same value no matter how many times you call them. It doesn't really seem to improve code generation and it looks weird so let's just get rid of it.
2019-07-11Kernel: Remove use of copy_ref() in favor of regular RefPtr copies.Andreas Kling
This is obviously more readable. If we ever run into a situation where ref count churn is actually causing trouble in the future, we can deal with it then. For now, let's keep it simple. :^)
2019-07-09Kernel: Move VirtualAddress.h into VM/Andreas Kling
2019-07-09Kernel: Move SharedMemory.{cpp,h} into FileSystem/Andreas Kling
2019-07-09Kernel: Move File.{cpp,h} into FileSystem/Andreas Kling
Also tweak the kernel's Makefile to use -nostdinc and -nostdinc++. This prevents us from picking up random headers from ../Root, which may include older versions of kernel headers. Since we still need <initializer_list> for Vector, we specifically include the necessary GCC path. This is a bit hackish but it works for now.
2019-07-08StringView: Rename characters() to characters_without_null_termination().Andreas Kling
This should make you think twice before trying to use the const char* from a StringView as if it's a null-terminated string.
2019-07-03AK: Rename the common integer typedefs to make it obvious what they are.Andreas Kling
These types can be picked up by including <AK/Types.h>: * u8, u16, u32, u64 (unsigned) * i8, i16, i32, i64 (signed)
2019-07-01Kernel+Userland: Convert /proc/df to JSON.Andreas Kling
2019-07-01Kernel+ProcessManager: Convert /proc/memstat to JSON.Andreas Kling
2019-06-29AK: Defer to Traits<T> for equality comparison in container templates.Andreas Kling
This is prep work for supporting HashMap with NonnullRefPtr<T> as values. It's currently not possible because many HashTable functions require being able to default-construct the value type.
2019-06-29ProcFS: Remove unused StringBuilder in procfs$all().Andreas Kling
2019-06-29Kernel: Change the format of /proc/all to JSON.Andreas Kling
Update ProcessManager, top and WSCPUMonitor to handle the new format. Since the kernel is not allowed to use floating-point math, we now compile the JSON classes in AK without JsonValue::Type::Double support. To accomodate large unsigned ints, I added a JsonValue::Type::UnsignedInt.
2019-06-27Kernel: More use of NonnullRefPtrVector in the kernel.Andreas Kling
2019-06-27Kernel: Use NonnullRefPtrVector in parts of the kernel.Andreas Kling
2019-06-22Kernel: Fix all compiler warnings.Andreas Kling
2019-06-22printf: Oops, '-' is the left padding modifier, not ' '.Andreas Kling
It's kinda funny how I can make a mistake like this in Serenity and then get so used to it by spending lots of time using this API that I start to believe that this is how printf() always worked..
2019-06-21AK: Rename Retainable.h => RefCounted.h.Andreas Kling
2019-06-21AK: Rename RetainPtr.h => RefPtr.h, Retained.h => NonnullRefPtr.h.Andreas Kling
2019-06-21AK: Rename RetainPtr => RefPtr and Retained => NonnullRefPtr.Andreas Kling
2019-06-21AK: Rename Retainable => RefCounted.Andreas Kling
(And various related renames that go along with it.)
2019-06-16Kernel: Expose kernel command line to userspace through /proc/cmdlineRobin Burchell
2019-06-16Kernel/Userland: Add a halt syscall, and a shutdown binary to invoke itRobin Burchell
2019-06-16Kernel+Userland: Expose list of network adapters through /proc/netadapters.Andreas Kling
Added a simple /bin/ifconfig program that just pretty-prints that file. :^)
2019-06-14Kernel: Fix not returning errors for the last path item.Sergey Bugaev
Previously the check for an empty part would happen before the check for access and for the parent being a directory, and so an error in those would not be detected.
2019-06-14AK: Add more StringView utilities for making substrings.Sergey Bugaev
These two allow making a new substring view starting from, or starting after, an existing substring view. Also make use of one of them in the kernel.
2019-06-13Kernel: Rename "descriptor" to "description" where appropriate.Andreas Kling
Now that FileDescription is called that, variables of that type should not be called "descriptor". This is kinda wordy but we'll get used to it.
2019-06-12Kernel: Fix resolving symlinks in the middle of a path.Sergey Bugaev
If a symlink is not the last part of a path, the remaining part of the path has to be further resolved against the symlink target. With this, a path containing a symlink always resolves to the target of the first (leftmost) symlink in it, for example any path of form /proc/self/... resolves to the corresponding /proc/pid directory.
2019-06-12Kernel: Fix comparing StringViews with strcmp().Sergey Bugaev
StringView character buffer is not guaranteed to be null-terminated; in particular it will not be null-terminated when making a substring. This means that the buffer can not be used with C functions that expect a null-terminated string. Instead, StringView provides a convinient operator == for comparing it with Strings and C stirngs, so use that. This fixes /proc/self/... resolution failures in ProcFS, since the name ("self") passed to ProcFSInode::lookup() would not be null-terminated.
2019-06-12Kernel: Refactor MemoryManager to use a Bitmap rather than a VectorConrad Pankoff
This significantly reduces the pressure on the kernel heap when allocating a lot of pages. Previously at about 250MB allocated, the free page list would outgrow the kernel's heap. Given that there is no longer a page list, this does not happen. The next barrier will be the kernel memory used by the page records for in-use memory. This kicks in at about 1GB.
2019-06-09FileSystem: Don't perform path resolution twice for open() with O_CREAT.Andreas Kling
2019-06-09Ext2FS: The block numbers returned by allocate_blocks() should be 1-based.Andreas Kling
e2fsck complained about two inodes sharing the same block, and this was why.
2019-06-09Ext2FS: Fix wrong file mode being passed from create_inode() to add_child().Andreas Kling
2019-06-09Ext2FS: Move directory writing logic into Ext2FSInode.Andreas Kling
2019-06-09Kernel: Use StringView more in Inode and subclasses.Andreas Kling
2019-06-07Kernel: Move i386.{cpp,h} => Arch/i386/CPU.{cpp,h}Andreas Kling
There's a ton of work that would need to be done before we could spin up on another architecture, but let's at least try to separate things out a bit.
2019-06-07Kernel: Qualify a bunch of #include statements.Andreas Kling
2019-06-07Meta: Tweak .clang-format to not wrap braces after enums.Andreas Kling
2019-06-07Kernel: Rename LinearAddress => VirtualAddress.Andreas Kling
2019-06-07Kernel: Run clang-format on everything.Andreas Kling
2019-06-07Kernel: Rename FileDescriptor to FileDescription.Andreas Kling
After reading a bunch of POSIX specs, I've learned that a file descriptor is the number that refers to a file description, not the description itself. So this patch renames FileDescriptor to FileDescription, and Process now has FileDescription* file_description(int fd).
2019-06-06FIFO: Raise SIGPIPE in processes that write() to a broken pipe.Andreas Kling
2019-06-06FIFO: Let write() fail with EPIPE if there's no reader.Andreas Kling
2019-06-02FileSystem: Rename VFS::fchmod() -> chmod().Andreas Kling
2019-06-02FileSystem: Route chown() and fchown() through VFS for access control.Andreas Kling
2019-06-02FileSystem: Only retrieve inode metadata once in VFS::chown().Andreas Kling
2019-06-02Kernel: Memory-mapped files now have the absolute path as their name.Andreas Kling
It's generated when the mapping is first created, so it won't update if the file moves. Maybe that's something we should support, too.
2019-06-01Kernel: Add fchown() syscall.Andreas Kling
2019-06-01Kernel: Make File::absolute_path() const.Andreas Kling