Age | Commit message (Collapse) | Author |
|
It is now possible to mount ext2 `DiskDevice` devices under Serenity on
any folder in the root filesystem. Currently any user can do this with
any permissions. There's a fair amount of assumptions made here too,
that might not be too good, but can be worked on in the future. This is
a good start to allow more dynamic operation under the OS itself.
It is also currently impossible to unmount and such, and devices will
fail to mount in Linux as the FS 'needs to be cleaned'. I'll work on
getting `umount` done ASAP to rectify this (as well as working on less
assumption-making in the mount syscall. We don't want to just be able
to mount DiskDevices!). This could probably be fixed with some `-t`
flag or something similar.
|
|
|
|
|
|
Use AK::exchange() to switch out the internal storage. Also mark these
functions with [[nodiscard]] to provoke an compile-time error if they
are called without using the return value.
|
|
This gives us better error messages when dereferencing null RefPtrs.
|
|
Many of the RefPtr assignment operators would cause ref leaks when we
call them to assign a pointer that's already the one kept.
|
|
This gives us much better error messages when you try to use them.
Without this change, it would complain about the absence of functions
named ref() and deref() on RefPtr itself. With it, we instead get a
"hey, this function is deleted" error.
Change operator=(T&) to operator=T(const T&) also, to keep assigning
a const T& to a NonnullRefPtr working.
|
|
We would leak a ref when assigning a T& to a NonnullRefPtr that already
contains that same T.
|
|
This will make it immediately obvious what the problem is when you're
dereferencing a null OwnPtr.
|
|
Ideally we should also verify that the assertion actually happens,
but we need some support in the TestSuite framework for that.
|
|
Instead of aborting the program when we hit an assertion, just print a
message and keep going.
This allows us to write tests that provoke assertions on purpose.
|
|
Also remove an unused variable.
|
|
|
|
We were forgetting where we put the userspace thread stacks, so added a
member called Thread::m_userspace_thread_stack to keep track of it.
Then, in ~Thread(), we now deallocate the userspace, kernel and signal
stacks (if present.)
Out of curiosity, the "init_stage2" process doesn't have a kernel stack
which I found surprising. :^)
|
|
Previously we would wait until the whole process died before actually
deleting its threads.
|
|
The runnable lists have moved from Thread to Scheduler.
|
|
Somewhat reproducible by opening ProcessManager and trying to view the
stacks for WindowServer.
Regressed in 53262cd08b08f3d4d2b77cff9c348e84b1bf5eb9.
|
|
|
|
|
|
|
|
There was a bug in the "prepend_vector_object" test but it was masked
by us not printing failures. (The bug was that we were adding three
elements to the "objects" vector and then checking that another
vector called "more_objects" indeed had three elements. Oops!)
|
|
|
|
OwnPtr's must move around, they can't be copy constructed.
|
|
This is a complement to append() that works by constructing the new
element in-place via placement new and forwarded constructor arguments.
The STL calls this emplace_back() which looks ugly, so I'm inventing
a nice word for it instead. :^)
|
|
|
|
This code should probably be structured differently to handle things
like children dying, etc. But not right now.
Found by PVS-Studio.
|
|
Found by PVS-Studio.
|
|
Also rename CoreIPCServer::m_pid to m_client_pid for clarification.
Found by PVS-Studio.
|
|
Found by PVS-Studio.
|
|
I'm not sure if this actually matters, but it won't hurt anyone to use
a 32-bit aligned buffer here.
Found by PVS-Studio.
|
|
We were falling back to an incorrect compiler-generated copy ctor for
this class, and let's not do that.
Found by PVS-Studio.
|
|
Found by PVS-Studio.
|
|
CObjects should really be reference-counted instead of this error-prone
(but convenient) model.
Found by PVS-Studio.
|
|
Found by PVS-Studio.
|
|
Found by PVS-Studio.
|
|
There is no signal 0. The valid ones are 1 (SIGHUP) through 31 (SIGSYS)
Found by PVS-Studio.
|
|
Furthermore, fread() has already handled EOF, so there's no need to do
it again. If we read a character, return it, otherwise return EOF.
Note that EOF means "EOF or error" here.
|
|
|
|
|
|
There's some confusion between the write syscall and CIODevice::write()
here. The internal write() returns a boolean, and has already whined
in case the syscall failed, so we don't need to do that again.
|
|
|
|
Now that GTableView elides text content by default, this column was a
little too wide and ended up getting elided sometimes.
|
|
I originally thought I'd have to implement text clipping in Painter for
this, but it seems like I can get away without doing that today. :^)
Fixes #390.
|
|
The create_thread() syscall returns the thread ID now, not 0.
|
|
|
|
This is how it seems to work:
- If ext2_inode.i_blocks[0] is non-zero, it contains the major/minor.
- Otherwise, it's in ext2_inode.i_blocks[1].
|
|
|
|
FileManager used to open up with the root directory loaded by default.
Now it will try to load either 1) the first argument specified on the
command line, 2) the user's home directory, or 3) the root directory.
Fixes #389
|
|
In the event where you want to find the index of a deeply-nested path
with a GFileSystemModel that hasn't yet traversed most of that path, it
is possible for a false negative failure to occur. This failure is
caused by the GFileSystemModel incorrectly bailing out of the search
when it hits the first unseen path segment that is not at the very end
of the path.
This patch fixes this problem by reifying the intermediate nodes during
that search and traversal process.
|
|
|