Andreas Kling
2bd8118843
Kernel: Change the format of /proc/all to JSON.
...
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-29 09:04:45 +02:00
Andreas Kling
eedb4f6b2f
QuickShow: Allow panning and zooming the image instead of stretching it.
...
This needs more work and polish, but it's a step in a more pleasant and
useful direction.
Also turn QuickShow into a fully-fledged "application". (By that, I really
just mean giving it its own Applications/ subdirectory.)
2019-06-23 16:35:43 +02:00
Andreas Kling
3ed17b0792
printf: Support %zu (the 'z' is really just ignored.)
2019-06-22 16:30:32 +02:00
Andreas Kling
3b01d7fdff
Userland: Fix more compiler warnings.
2019-06-22 16:13:47 +02:00
Andreas Kling
1277d583ef
printf: Oops, '-' is the left padding modifier, not ' '.
...
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-22 15:53:52 +02:00
Andreas Kling
5980007e44
Userland: Fix many compiler warnings.
2019-06-22 15:47:08 +02:00
Andreas Kling
8c0ae711d8
Kernel+LibC: Make page fault crashes a bit more readable.
...
We'll now try to detect crashes that were due to dereferencing nullptr,
uninitialized malloc() memory, or recently free()'d memory.
It's not perfect but I think it's pretty good. :^)
Also added some color to the most important parts of the crash log,
and added some more modes to /bin/crash for exercising this code.
Fixes #243 .
2019-06-19 20:52:12 +02:00
Callum Attryde
267672efee
Userland: Add wc program ( #228 )
...
Fixes #159 .
2019-06-16 14:13:57 +02:00
Robin Burchell
952382b413
Kernel/Userland: Add a halt syscall, and a shutdown binary to invoke it
2019-06-16 12:25:30 +02:00
Andreas Kling
9e0f7acfe5
Kernel+Userland: Expose list of network adapters through /proc/netadapters.
...
Added a simple /bin/ifconfig program that just pretty-prints that file. :^)
2019-06-16 07:06:49 +02:00
Conrad Pankoff
f0ce0910ab
Userland: Add test program for stressing memory allocation
2019-06-12 15:38:17 +02:00
Conrad Pankoff
7b04c7dc48
Userland: Implement -c [characters] option for head
2019-06-08 18:01:06 +02:00
Andreas Kling
39d1a9ae66
Meta: Tweak .clang-format to not wrap braces after enums.
2019-06-07 17:13:23 +02:00
Andreas Kling
0ed89440f1
ProcessManager+top: Rename "linear" size to "virtual" size.
...
I originally called it "linear" because that's how the Intel manual names
virtual addresses in many cases. I'm ready to accept that most people know
this as "virtual" so let's just call it that.
2019-06-07 12:44:29 +02:00
Andreas Kling
b07bbf383d
Userland: Run clang-format on everything.
2019-06-07 11:49:31 +02:00
Andreas Kling
1d5a3507b2
Userland: Add a little test program for the alarm() syscall.
2019-06-07 11:30:22 +02:00
Ben Sloane
9687f1801b
tail: Default tail behavior with no arguments ( #209 )
...
Make tail assume you wanted 10 lines of output if no -n option was provided.
2019-06-06 20:28:58 +02:00
Andreas Kling
abb3643d88
tail: Shell programs should return 1 to indicate failure.
2019-06-06 11:00:48 +02:00
Andreas Kling
6fa727a88e
cat: Fix some oversights in error handling.
...
Error messages should go to stderr so they don't get mixed in with the
program's output. Also added a check for the return value of write().
2019-06-06 11:00:48 +02:00
Andreas Kling
01f1333856
LookupServer+LibC: Add support for reverse DNS lookups via gethostbyaddr().
...
LookupServer can now take two types of requests:
* L: Lookup
* R: Reverse lookup
The /bin/host program now does a reverse lookup if the input string is a
valid IPv4 address. :^)
2019-06-06 05:35:03 +02:00
Andreas Kling
d03505bc29
LibC: inet_pton() should return 1 on success, 0 or -1 on failure.
2019-06-06 05:25:18 +02:00
Christopher Dumas
8fecc0eaee
Userland: Implement recursive rm
2019-06-03 20:16:00 +02:00
Robin Burchell
b55b6cd7fc
AK: Add implicit String -> StringView conversion
...
And tidy up existing view() users.
2019-06-02 12:55:51 +02:00
Robin Burchell
decf1afbaa
Userland: Use CFile in dmesg
2019-06-02 12:55:51 +02:00
Robin Burchell
7de861bdd9
Userland: Use CFile in mm
2019-06-02 12:55:51 +02:00
Robin Burchell
9a4ec2e92a
Userland: Use CFile in ps
2019-06-02 12:55:51 +02:00
Robin Burchell
e74b5975e4
Userland: Use CFile inside sysctl
...
Also add a StringView overload to CIODevice::write
2019-06-02 12:55:51 +02:00
vger92
1876606973
Userland: Add tee command ( #166 )
2019-06-02 12:45:17 +02:00
Conrad Pankoff
6cabd34b93
Userland: Improve head program
...
* allow specifying files as arguments, e.g. `head a b c`
* support multiple files
* print a filename header when multiple files are being printed
* allow suppression or forcing of filename header via flags
This change drops support for the legacy `-123` syntax in favour of the
more widely-supported `-n 123` form.
fixes #105
2019-06-01 14:48:03 +02:00
Mustafa
a4726b846c
ls: Show user name and group name if available. ( #151 )
...
Fixes #150
2019-06-01 13:23:35 +02:00
Conrad Pankoff
51a74fb3bb
Userland: Add a /bin/yes program ( fixes #110 )
2019-06-01 12:16:55 +02:00
Andreas Kling
cbd858544d
LibC: Move struct timeval to sys/time.h. #POSIX
2019-05-28 13:48:06 +02:00
Robin Burchell
9d2b08e06e
LibCore: Add CDirIterator, and use it in everything rather than readdir
2019-05-27 15:27:23 +02:00
Andreas Kling
f352a5094d
ls: Fix build and tidy up coding style.
2019-05-27 15:04:23 +02:00
faissaloo
f28cc2e2e0
Ls: Cleanup
2019-05-27 14:53:16 +02:00
faissaloo
4c410f3de6
Ls: Support multiple files
2019-05-27 14:53:16 +02:00
faissaloo
776a359a17
Ls: Support single files in long mode
2019-05-27 14:53:16 +02:00
faissaloo
fee686e2cd
Ls: Refactor long directory listings
2019-05-27 14:53:16 +02:00
faissaloo
07c356ce64
Ls: Add single file support in short mode
2019-05-27 14:53:16 +02:00
Andreas Kling
9308ce071f
Userland: Add a helpful little program for provoking different crashes.
...
Currently supported crash types:
-s : Segmentation violation
-d : Division by zero
-i : Illegal instruction
-a : Abort
2019-05-26 02:35:25 +02:00
Andreas Kling
677794f30d
LibGUI: Make GCheckBox inherit from GAbstractButton.
2019-05-24 17:11:42 +02:00
Andreas Kling
21c56477b0
LibGUI: Add a GAbstractButton base class for button widgets.
...
This patch moves GButton and GRadioButton to inherit from it. This allows
them to share code for mouse event handling, etc.
2019-05-24 16:32:20 +02:00
Robin Burchell
77dfd419e9
LibCore: Move AK/ArgsParser to LibCore/CArgsParser
...
Also rename the classes to match LibCore naming style.
This means that it's no longer incorrectly linked into LibC and Kernel.
2019-05-17 15:49:37 +02:00
Robin Burchell
190111e21a
Userland: Port ln to use ArgsParser
2019-05-17 15:49:37 +02:00
Robin Burchell
bffed9e3cb
ArgsParser: Expand to be able to handle multiple single arguments
...
This is needed for e.g. ln
2019-05-17 15:49:37 +02:00
Robin Burchell
b92fa59832
Userland: Port pape to use ArgsParser, and minor cleanups
2019-05-17 15:49:37 +02:00
Robin Burchell
56aad835ad
Userland: Port sysctl to use ArgsParser, and minor cleanups
2019-05-17 15:49:37 +02:00
Robin Burchell
6dd7ee53ea
AK/Userland: Add single value to ArgsParser usage, and port tail to use ArgsParser
2019-05-17 15:49:37 +02:00
Robin Burchell
c478503581
ArgsParser: Remove prefix from constructor
...
It makes sense to keep this consistent between applications, and the
purpose of the string is not immediately obvious from an API perspective.
If we need to make it configurable later, that can come from a setter.
2019-05-17 15:49:37 +02:00
Robin Burchell
729507f2bd
ArgsParser: Remove boolean trap on add_arg
...
Rather than requiring a boolean for whether or not the argument is
required, add some new methods to make the purpose of the bool explicit.
2019-05-17 15:49:37 +02:00