Commit Graph

214 Commits

Author SHA1 Message Date
Andreas Kling
e4dfd5a3a4 WindowServer: Support PNG wallpapers.
Fix up /bin/pape so it tells the WindowServer which wallpaper file to use.
2019-03-21 15:54:19 +01:00
Andreas Kling
0114c61cf1 Userland: Turn off double buffering in QuickShow.
Since this program is primarily used to display potentially huge but still
static images, let's not put extra strain on the system by double buffering.
2019-03-21 13:31:47 +01:00
Andreas Kling
65348e7dc1 PNGLoader: Support for color type 2 (RGB triplets) and multiple IDAT chunks. 2019-03-21 05:25:54 +01:00
Andreas Kling
42755e98cf SharedGraphics: Implement a simple PNG decoder.
This is extremely unoptimized, but it does successfully load "folder32.png"
so it must be at least somewhat correct. :^)
2019-03-21 03:57:42 +01:00
Andreas Kling
4ea625e08b Userland: Allow ping <hostname> :^) 2019-03-20 03:38:09 +01:00
Andreas Kling
0e4a1936ca LibC: Implement gethostbyname() by talking to the DNSLookupServer.
We now talk to the lookup server over a local socket and it does the lookup
on our behalf. Including some retry logic, which is nice, because it seems
like DNS requests disappear in the ether pretty damn often where I am.
2019-03-20 01:15:22 +01:00
Andreas Kling
57ff293a51 LibGUI: Implement nested event loops to support dialog boxes.
This patch adds a simple GMessageBox that can run in a nested event loop.
Here's how you use it:

    GMessageBox box("Message text here", "Message window title");
    int result = box.exec();

The next step is to make the WindowServer respect the modality flag of
these windows and prevent interaction with other windows in the same
process until the modal window has been closed.
2019-03-19 00:01:02 +01:00
Andreas Kling
4629272135 Userland: Turn the tc test util into a simple dumb HTTP client. 2019-03-14 15:19:20 +01:00
Andreas Kling
3d5296a901 IPv4: Last burst of TCP hacking for today.
Connecting to a test server and exchanging data back and forth works.
2019-03-14 01:44:42 +01:00
Andreas Kling
be46f1bb1f IPv4: More work on the TCP implementation.
Reading from the peer now kinda works. Something still going wrong with
sending packets but it's getting closer.
2019-03-14 01:00:10 +01:00
Andreas Kling
032d9d7065 IPv4: More hacking on bringing up TCP support.
This was a bit more complicated than I expected, but it's moving forward.
2019-03-13 23:14:30 +01:00
Andreas Kling
7aba68d51c Userland+LibC: Add a new little "tc" program for testing TCP.
Also added send() and recv() to LibC in support of this. They are just
wrappers around sendto() and recvfrom().
2019-03-13 17:33:40 +01:00
Andreas Kling
4dddf949c8 IPv4: More work on UDP support.
I'm now able to connect to a simple UDP server on my host machine and
exchange some data. Very cool! :^)
2019-03-13 15:40:30 +01:00
Andreas Kling
ea6a537b70 Userland: Add a simple utility for UDP testing. 2019-03-13 15:00:02 +01:00
Andreas Kling
19a51132f5 Kernel: recvfrom() should treat the address arguments as outparams. 2019-03-13 14:47:21 +01:00
Andreas Kling
562663df7c Add support for socket send/receive timeouts.
Only the receive timeout is hooked up yet. You can change the timeout by
calling setsockopt(..., SOL_SOCKET, SO_RCVTIMEO, ...).

Use this mechanism to make /bin/ping report timeouts.
2019-03-13 13:15:05 +01:00
Andreas Kling
cf250e1245 More work on IPv4 sockets and /bin/ping.
It's now actually possible to ping other hosts on the network! :^)
I've switched the "run" script over to starting QEMU with user networking
since that works better for my testing needs right now.
2019-03-13 03:26:01 +01:00
Andreas Kling
a7d5e9781a Kernel+LibC+Userland: Yet more networking bringup hacking.
All ICMP sockets now receive all ICMP packets. All this buffering is gonna
need some limits and such.
2019-03-12 17:27:07 +01:00
Andreas Kling
a017a77442 Kernel+LibC+Userland: Start working on an IPv4 socket backend.
The first userland networking program will be "ping" :^)
2019-03-12 15:51:42 +01:00
Andreas Kling
971dd46aec Userland: Use AK::quick_sort() in /bin/top 2019-03-09 16:20:46 +01:00
Andreas Kling
28a6ba498a Userland: Fix broken permissions for files created by /bin/cp.
When passing O_CREAT to open(), it will grab a third "mode" argument from
the stack. Let's not forget to actually pass this!

Also use the process umask for the created files.
2019-03-07 23:23:07 +01:00
Andreas Kling
3079ef01ce Userland: /bin/cp needs to handle open(dst) failing with EISDIR. 2019-03-06 20:28:00 +01:00
Andreas Kling
7d46375690 Userland: Support "cp foo somedirectory"
Don't overwrite the literal directory inode contents when copying a file
to a directory, duh. :^)
2019-03-06 20:22:23 +01:00
Andreas Kling
66a5ddd94a More work on the variable-width font support.
Katica is now the default system font, and it looks quite nice. :^)
I'm gonna need to refine the GTextBox movement stuff eventually,
but it works well-enough for basic editing now.
2019-03-06 14:06:40 +01:00
Andreas Kling
2c5a378ccc Kernel+Userland: Add symlink() syscall and add "-s" flag to /bin/ln.
It's now possible to create symbolic links! :^)

This exposed an issue in Ext2FS where we'd write uninitialized data past
the end of an inode's content. Fix this by zeroing out the tail end of
the last block in a file.
2019-03-02 01:52:24 +01:00
Andreas Kling
1b16a29044 Kernel+Userland: Implement fchmod() syscall and use it to improve /bin/cp.
/bin/cp will now copy the permission bits from source to destination. :^)
2019-03-01 10:39:19 +01:00
Andreas Kling
c09ab7cc40 Kernel: Only allow sending signals to process you own. 2019-02-28 11:46:38 +01:00
Andreas Kling
dda9b9ab1b Userland: Add a simple /bin/stat program. 2019-02-27 21:45:06 +01:00
Andreas Kling
02bfbb712a Userland: /bin/ls should show major,minor for block devices. 2019-02-27 21:32:21 +01:00
Andreas Kling
1d2529b4a1 Add chown() syscall and a simple /bin/chown program. 2019-02-27 12:32:53 +01:00
Andreas Kling
3f29a12d90 More compat work. Rename libraries from LibFoo.a => libfoo.a
This makes it more straightforward to build a cross-compiler toolchain.
Also move math stuff from LibC to LibM.
2019-02-26 13:30:57 +01:00
Andreas Kling
9624b54703 More moving towards using signed types.
I'm still feeling this out, but I am starting to like the general idea.
2019-02-25 22:06:55 +01:00
Andreas Kling
901b7d5d91 Fix a bunch of compiler warnings. Not all, but a lot. 2019-02-25 19:05:51 +01:00
Andreas Kling
a7a456002e LibC: Enough compat work to make binutils-2.32 build and run. 2019-02-23 17:24:50 +01:00
Andreas Kling
d7753c7c8d Move over to building all of userspace with i686-pc-serenity-g++. 2019-02-22 14:45:14 +01:00
Andreas Kling
b0d1969ca5 Userland: Fix two compiler warnings. 2019-02-22 10:50:59 +01:00
Andreas Kling
75b100673f Switch over to building everything with i686-elf-g++. 2019-02-22 10:45:32 +01:00
Andreas Kling
aaa11e3c25 Userland: Fix extra unused printf() argument warning. 2019-02-22 10:32:17 +01:00
Andreas Kling
6d3e12899b Kernel: Pass process arguments directly on the stack.
Get rid of the convoluted get_arguments and get_environment syscalls.
This patch also adds a simple /bin/env that just prints its environment.
2019-02-22 01:55:22 +01:00
Andreas Kling
b30773638e Userland: Minor tweaks in /bin/su 2019-02-21 23:49:16 +01:00
Andreas Kling
920e8e58ed Kernel+Userland: Implement setuid() and setgid() and add /bin/su
Also show setuid and setgid bits in "ls -l" output. :^)
2019-02-21 23:38:10 +01:00
Andreas Kling
6071a77e8e Userland: Remove the /bin/sh greeting. It was cute but spammy. 2019-02-21 23:34:14 +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
fd575055c2 Userland: /bin/sh shouldn't crash on EINTR. 2019-02-20 23:45:00 +01:00
Andreas Kling
8eedbbc9ca Prune compiler flags a bit. Let's go with -march=i686 for now. 2019-02-17 15:17:21 +01:00
Andreas Kling
809266a9fb Kernel: Remove tracking of bitmap memory.
There are no more kernel bitmaps. It's much better this way.
2019-02-17 01:16:38 +01:00
Andreas Kling
df6aaaeeef Enable -Wimplicit-fallthrough. 2019-02-15 12:39:16 +01:00
Andreas Kling
ce74db4e2a Userland: /bin/ls should display socket files nicely. 2019-02-14 17:30:58 +01:00
Andreas Kling
f529b845ec WindowServer: Convert entire API to be message-based.
One big step towards userspace WindowServer. :^)
2019-02-14 01:21:32 +01:00