Commit Graph

3876 Commits

Author SHA1 Message Date
Conrad Pankoff
0b3308f995 Kernel: Remove over-eager const from rtl8139 driver link_up function 2019-08-21 17:16:03 +02:00
Conrad Pankoff
4afe9e4f2a Kernel: Implement rtl8139 network interface driver 2019-08-21 17:10:34 +02:00
Conrad Pankoff
286bafbb19 Kernel: Implement link status in /proc/net/adapters 2019-08-21 17:10:34 +02:00
Andreas Kling
af840af1ce Documentation: Let's have a coding style document
This is only meant to be about higher-level coding style, not the small
things like brace placement, indentation, etc. For all of that we just
obey clang-format.
2019-08-21 17:01:29 +02:00
Conrad Pankoff
bcd214c29d Userland: Fix ifconfig use of /proc/net/adapters 2019-08-21 16:57:31 +02:00
Andreas Kling
de87258b4f Userland: Remove immature "tc" and "uc" programs in favor of "nc"
The netcat-lite "nc" utility is where we should put all of the various
"lightweight" TCP/UDP client features.
2019-08-21 16:49:11 +02:00
Andreas Kling
5de483cfbb Kernel: Move DiskDevice::block_size() up to BlockDevice
All block devices should have a block size, after all. This defaults to
PAGE_SIZE if no size is specified.
2019-08-21 16:48:59 +02:00
Rok Povsic
52366e3f02 Meta: Update ReadMe with GCC 8 requirement 2019-08-21 11:50:40 +02:00
Andreas Kling
9731bff44c ls: Sort the output alphabetically
Also use StringBuilder to construct the full relative paths, to get rid
of an unnecessary and suspicious-looking buffer.
2019-08-20 21:39:01 +02:00
Andreas Kling
029786e6b5 ls: Don't layout or colorize output if stdout is not a TTY 2019-08-20 21:06:44 +02:00
marprok
d4b7b92492 Userland: ls division by zero.
When the terminal app window became smaller than the longest filename,
a division by zero occured while calculating the offset.
2019-08-20 20:17:10 +02:00
Andreas Kling
c106ec4719 Terminal: Allow scrolling through terminal history with the mouse wheel
Fixes #470.
2019-08-20 20:12:31 +02:00
Andreas Kling
dc3c6be6f2 GScrollBar: Allow scrolling the scrollbar by mouse-wheeling over it 2019-08-20 20:11:20 +02:00
Andreas Kling
076827a05d GModel: Rename on_model_update(GModel&) => on_update()
Just simplifying the API of this hook a little bit.
2019-08-20 19:45:08 +02:00
Andreas Kling
f7dce05c82 LibGUI: Remove confusing GModelNotification concept
This was a bad idea and it didn't stick. Instead we should just use the
simple "on_foo" hook functions like we do for everything else. :^)
2019-08-20 19:44:02 +02:00
Andreas Kling
4f3234148a Inspector: Show remote object properties in a table view
This patch expands the object model of this program quite a bit.
We now have a RemoteProcess object that contains a list of remote root
RemoteObject objects.

The RemoteProcess vends a RemoteObjectGraphModel&, and indices in that
model have internal_data() pointing to a corresponding RemoteObject.
RemoteObjects in turn vend a RemoteObjectPropertyModel&, which is what
we use to show the object properties.

This is pretty cool :^)
2019-08-19 20:29:52 +02:00
Andreas Kling
736dc5f6c0 Inspector: Add a missing "override" in RemoteObjectGraphModel 2019-08-19 19:46:40 +02:00
Andreas Kling
64f16c141d Terminal: Implement basic history scrollback
This code needs some optimization work to reduce the amount of repaints
but the history feature basically works, which is cool :^)

Fixes #431.
2019-08-19 19:15:36 +02:00
Andreas Kling
462336ed49 LibVT: Add scrollback history to VT::Terminal
The default (hard-coded) history size is 500 lines. When the history is
altered, the TerminalClient is notified via terminal_history_changed().
2019-08-19 19:07:52 +02:00
Andreas Kling
a5cdd0afa5 NonnullPtrVector: Add ptr_at() getters for accessing the NonnullPtr
Normally you want to access the T&, but sometimes you need to grab at
the NonnullPtr, for example when moving it out of the Vector before
a call to remove(). This is generally a weird pattern, but I don't have
a better solution at the moment.
2019-08-19 19:04:52 +02:00
Andreas Kling
179158bc97 Kernel: Put debug spam about already-paged-in inode pages behind #ifdef 2019-08-19 17:30:36 +02:00
Andreas Kling
6cd9c020ea LibC: Write to the dbg() every time we perror() in userspace
There's a high chance that we're interested in whatever errors come out
of perror(), so let's output those on the debugger as well.
2019-08-19 17:25:49 +02:00
Marios Prokopakis
91c79440a1 Userland: Improved the printing of the ls command. (#468)
The ls command takes into consideration the length of the largest
filename when it prints a line.

Fixes #432.
2019-08-19 16:37:21 +02:00
Andreas Kling
3792c91059 LibGUI: Implement save_to(JsonObject&) for GWindow and GWidget 2019-08-19 16:34:53 +02:00
Andreas Kling
c2213449c0 LibCore: Move CObject serialization into CObject::save_to(JsonObject&)
The idea is for subclasses to override this and add whatever properties
are relevant for them, then call up to their base class, etc.
2019-08-19 16:34:53 +02:00
Andreas Kling
a32123f221 Inspector: Show GWindows with a little window icon. 2019-08-19 16:34:53 +02:00
Andreas Kling
770cf498ca WindowServer: Oops, remove an assertion that won't fly with MBVGA 2019-08-19 13:50:09 +02:00
Andreas Kling
7038935f74 GraphicsBitmap: create_wrapper() should take pitch as a parameter
We shouldn't assume that the pitch of some arbitrary bitmap memory that
we're wrapping is going to be 16-byte aligned. Instead, just take the
pitch as a parameter.

Also update WindowServer to pass the pitch to the framebuffer bitmaps.
2019-08-19 13:45:22 +02:00
Sergey Bugaev
d11d847161 WindowServer: Fix an assertion
Now that the window used by a WSMenu is its child CObject, the menu also
receives CChildEvent's about the window, including CEvent::ChildAdded when
the window gets created. At this point, menu_window() still returns nullptr,
so stop unconditionally assuming that it doesn't. We should not care whether
or not we have a window for unrelated events anyway.
2019-08-19 13:43:40 +02:00
marprok
338ba238ca Userland: Implemented a simple cut command.
The current version supports only the -b list option for a single file.
Ranges are also supported.
2019-08-18 17:17:06 +02:00
Andreas Kling
5465795dc3 AK: The printf family was mixing up case and alternate form settings 2019-08-18 16:14:21 +02:00
Sergey Bugaev
ccdeafdefb SystemMonitor: Add a devices tab
This tab combines info from /proc/devices with device file paths from /dev.
2019-08-18 15:59:59 +02:00
Sergey Bugaev
0f8b45c015 ProcFS: Expose info about devices in /proc/devices 2019-08-18 15:59:59 +02:00
Sergey Bugaev
acccf9ccda Kernel: Move device lookup to Device class itself
Previously, VFS stored a list of all devices, and devices had to
register and unregister themselves with it. This cleans up things
a bit.
2019-08-18 15:59:59 +02:00
Andreas Kling
d5352b87b7 AudioServer: Turn ASMixer into a CObject
It was wrongly inheriting from RefCounted<AudioServer> without using
reference counting. Let's just make it a CObject instead.
2019-08-18 12:56:36 +02:00
Andreas Kling
8aa3b74f80 LibCore: Make it possible to pass a parent to CFile constructors 2019-08-18 12:55:56 +02:00
Andreas Kling
dc572e31fa LibGUI: Let GWindow::set_main_widget() take ownership of the widget
We were already doing this anyway, with ~GWindow() calling delete on
the main widget.
2019-08-18 12:18:17 +02:00
Andreas Kling
fc6bd52e0d LibCore: Childify children of CLocalServer and IPC::Connection
Inspecting a "TextEditor" process with Inspector now looks awesome. :^)
2019-08-18 12:15:06 +02:00
Andreas Kling
a1a4013b1c LibGUI: Make the timers in GAbstractButton and GScrollBar into children 2019-08-18 12:14:15 +02:00
Andreas Kling
93f14966c0 WindowServer: Make WSMenu's be children of the WSClientConnection 2019-08-18 12:05:33 +02:00
Andreas Kling
8aece8f5b7 WindowServer: Make WSCompositor the parent of its timers 2019-08-18 11:59:43 +02:00
Andreas Kling
1b3599fbbc LibCore: Make CSocket's notifiers into children of the CSocket
The Inspector app quickly exposes crappy flat object hiearchies without
parent/child relationships. This is one of many commits that improves
the situation by making parent/child CObject relationships explicit.
2019-08-18 11:54:39 +02:00
Andreas Kling
9d57e7ed68 WindowServer: Tell WSWindows who their CObject parent is
Instead of using a weird "internal owner" pointer, just set the owning
object as the CObject::parent of WSWindow.
2019-08-18 11:52:19 +02:00
Andreas Kling
68e94f0a2e Inspector: Implement RemoteObjectGraphModel::parent_index()
This makes GTreeView paint the tree lines correctly. It's a bit weird
that this is needed, but straightforward to implement so meh.
2019-08-18 11:12:43 +02:00
Andreas Kling
2e4e4ad957 Inspector: Add a custom 16x16 icon to represent objects
Behold, my finest "1990's OOP cube icon" :^)
2019-08-18 10:49:38 +02:00
Andreas Kling
05cd178477 Inspector: Add a GUI tool for viewing a remote process's CObject graph
Here comes the foundation for a neat remote debugging tool.

Right now, it connects to a remote process's CEventLoop RPC socket and
retreives the remote object graph JSON dump. The remote object graph
is then reconstructed and exposed through a GModel subclass, which is
then displayed in a GTreeView.

It's pretty cool, I think. :^)
2019-08-18 10:19:13 +02:00
Andreas Kling
5c7bb09a73 GTreeView: Support multiple root-level items
Previously it was only possible to have a single root-level item in a
GTreeView. This was an oversight and I didn't realize it because this
code was only ever used in the FileManager, which has one root ("/").

Also factored out item toggling into a separate function, and increase
the base indentation level so that root items can be toggled as well.

Finally, let the user toggle the selected item with the spacebar. :^)
2019-08-18 10:17:00 +02:00
Andreas Kling
f6cb2fd2fb GModel: Have create_index() take a const void*
This is just for convenience really. It lets you skip const_casting in
all the code that calls this API, which you would basically always be
doing otherwise.
2019-08-18 10:14:53 +02:00
Andreas Kling
203612439a LibGUI: Add LogStream operator<< for GModelIndex 2019-08-18 10:14:26 +02:00
Andreas Kling
fc43cf929d LibHTML: Implement basic block height computation
..and add vertical box properties to the layout tree dumps.
2019-08-18 08:39:52 +02:00