summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2019-09-12Add stdin support to wc programTim Morgan
2019-09-11Inspector+LibCore+rpcdump: Rework the RPC stuff to be request/responseAndreas Kling
RPC clients now send JSON-encoded requests to the RPC server. The connection also stays alive instead of disconnecting automatically after the initial CObject graph dump. JSON payloads are preceded by a single host-order encoded 32-bit int containing the length of the payload. So far, we have three RPC commands: - Identify - GetAllObjects - Disconnect We'll be adding more of these as we go along. :^)
2019-09-11rpcdump: Don't call CSocket::connect() before setting up hooksAndreas Kling
2019-09-11ls: Add -h (human readable) output switchAndreas Kling
Fixes #543.
2019-09-07cp: Implement directory copyingAaron Malpas
Recursive copying is only allowed if cp is called with the -r switch, ala POSIX.
2019-09-07cp: Refactor copying into copy_file functionAaron Malpas
2019-09-07cp: Use LibCore/CArgsParser for command-line arg parsingAaron Malpas
2019-09-06AK: Rename <AK/AKString.h> to <AK/String.h>Andreas Kling
This was a workaround to be able to build on case-insensitive file systems where it might get confused about <string.h> vs <String.h>. Let's just not support building that way, so String.h can have an objectively nicer name. :^)
2019-09-01wc: Add missing newlines to some error messagesAndreas Kling
2019-08-29Userland: Add 'which' command (#497)Brandon Scott
This mimics the shell's path resolution to locate the executable that would execute if typing it as a command.
2019-08-26LibThread: Introduce a new threading librarySergey Bugaev
This library is meant to provide C++-style wrappers over lower level APIs such as syscalls and pthread_* functions, as well as utilities for easily running pieces of logic on different threads.
2019-08-25Userland: Add realpathRok Povsic
2019-08-24Userland: Remove unnecessary output from "rm"Andreas Kling
2019-08-21Userland: Fix ifconfig use of /proc/net/adaptersConrad Pankoff
2019-08-21Userland: Remove immature "tc" and "uc" programs in favor of "nc"Andreas Kling
The netcat-lite "nc" utility is where we should put all of the various "lightweight" TCP/UDP client features.
2019-08-20ls: Sort the output alphabeticallyAndreas Kling
Also use StringBuilder to construct the full relative paths, to get rid of an unnecessary and suspicious-looking buffer.
2019-08-20ls: Don't layout or colorize output if stdout is not a TTYAndreas Kling
2019-08-20Userland: ls division by zero.marprok
When the terminal app window became smaller than the longest filename, a division by zero occured while calculating the offset.
2019-08-19Userland: Improved the printing of the ls command. (#468)Marios Prokopakis
The ls command takes into consideration the length of the largest filename when it prints a line. Fixes #432.
2019-08-18Userland: Implemented a simple cut command.marprok
The current version supports only the -b list option for a single file. Ranges are also supported.
2019-08-17Userland: Reimplement the mount commandSergey Bugaev
This new version can do three things: * When invoked as `mount`, it will print out a list of mounted filesystem, * When invoked as `mount -a`, it will try to mount filesystems listed in /etc/fstab, * When invoked as `mount device mountpoint -t fstype`, it will mount that device on that mountpoint. If not specified, fstype defaults to ext2.
2019-08-17Kernel+LibC+Userland: Support mounting other kinds of filesystemsSergey Bugaev
2019-08-17LibCore+rpcdump: Publish CObject graph to on-demand RPC socketAndreas Kling
All programs that have a CEventLoop now allow local socket connections via /tmp/rpc.PID and will dump a serialized JSON array of all the live CObjects in the program onto connecting sockets. Also added a small /bin/rpcdump tool that connects to an RPC socket and produces a raw dump of the JSON that comes out.
2019-08-17Kernel: Added unmount ability to VFSJesse Buhagiar
It is now possible to unmount file systems from the VFS via `umount`. It works via looking up the `fsid` of the filesystem from the `Inode`'s metatdata so I'm not sure how fragile it is. It seems to work for now though as something to get us going.
2019-08-14Userland: Use LibPCIDB in lspci to print device namesConrad Pankoff
2019-08-14Libraries: Add LibPCIDB for reading PCI device information from pci.idsConrad Pankoff
2019-08-14Userland: Implement simple lspci commandConrad Pankoff
2019-08-12Kernel+LibC+crash: Add mprotect() syscallAndreas Kling
This patch adds the mprotect() syscall to allow changing the protection flags for memory regions. We don't do any region splitting/merging yet, so this only works on whole mmap() regions. Added a "crash -r" flag to verify that we crash when you attempt to write to read-only memory. :^)
2019-08-10Userland: Make sure sockaddr_len is initialised correctly in ncConrad Pankoff
2019-08-08Userland: Implement -l, -v, -N, -s, and -p for netcatConrad Pankoff
2019-08-08Userland: Implement nc commandConrad Pankoff
This is a very simple version of the nc (netcat) command. It only supports outgoing TCP connections, and has no options aside from the target host and port.
2019-08-08Kernel: Record network statistics and expose as JSONConrad Pankoff
This is comprised of five small changes: * Keep a counter for tx/rx packets/bytes per TCP socket * Keep a counter for tx/rx packets/bytes per network adapter * Expose that data in /proc/net_tcp and /proc/netadapters * Convert /proc/netadapters to JSON * Fix up ifconfig to read the JSON from netadapters
2019-08-07JSON: Templatize the JSON serialization codeAndreas Kling
This makes it possible to use something other than a StringBuilder for serialization (and to produce something other than a String.) :^)
2019-08-05Userland: Implement truncate commandConrad Pankoff
This has a known bug in that you can't specify a negative size value. This bug stems from the argument parser, and once it's fixed there, everything should work here.
2019-08-03AudioServer: Port to the new generated IPC mechanismAndreas Kling
Fork the IPC Connection classes into Server:: and Client::ConnectionNG. The new IPC messages are serialized very snugly instead of using the same generic data structure for all messages. Remove ASAPI.h since we now generate all of it from AudioServer.ipc :^)
2019-08-02Kernel: mount system call (#396)Jesse
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.
2019-08-01more: Don't printf(string), printf("%s", string)!Andreas Kling
Found by PVS-Studio.
2019-08-01pidof: Remove redundant bool check.Andreas Kling
Found by PVS-Studio.
2019-07-29AudioServer: Add a "main mix volume" and a simple program to get/set itAndreas Kling
Give the mixer a main volume value (percent) that we scale all the outgoing samples by (before clipping.) Also add a simple "avol" program for querying and setting the volume: - "avol" prints the current volume. - "avol 200" sets the main mix volume to 200%
2019-07-28aplay: s/Sample/Progress/ in the output. It's all in the details!Andreas Kling
2019-07-28LibAudio+aplay: Make the aplay output look a little funner.Andreas Kling
Show some information about the file we're playing, and display how many samples we've played out of how many total. This might be a bit buggy as I haven't tested it with many different files, but it's a start. :^)
2019-07-28AudioServer: Add a buffer queue so we can buffer some sound.Andreas Kling
The idea here is to keep a small number of sample buffers queued in the AudioServer so we don't get caught without something to play.
2019-07-27Audio: Make ABuffer sit on top of a SharedBuffer.Andreas Kling
This allows us to carry the same buffer all the way from the WAV loader to the AudioServer mixer. This alleviates some of the stutter, but there's still a noticeable skip when switching buffers. We're gonna need to do better. :^)
2019-07-27Audio: Make basic streaming WAV playback work.Andreas Kling
I had to solve a bunch of things simultaneously to make this work. Refactor AWavLoader to be a streaming loader rather than a one-shot one. The constructor parses the header, and if everything looks good, you can repeatedly ask the AWavLoader for sample buffers until it runs out. Also send a message from AudioServer when a buffer has finished playing. That allows us to implement a blocking variant of play(). Use all of this in aplay to play WAV files chunk-at-a-time. This is definitely not perfect and it's a little glitchy and skippy, but I think it's a step in the right direction.
2019-07-22Kernel: Add a mechanism for listening for changes to an inode.Andreas Kling
The syscall is quite simple: int watch_file(const char* path, int path_length); It returns a file descriptor referring to a "InodeWatcher" object in the kernel. It becomes readable whenever something changes about the inode. Currently this is implemented by hooking the "metadata dirty bit" in Inode which isn't perfect, but it's a start. :^)
2019-07-21ls: Don't print an empty line if there were no files to show.Andreas Kling
Fixes #352.
2019-07-19Kernel: Only allow superuser to halt() the system (#342)Jesse
Following the discussion in #334, shutdown must also have root-only run permissions.
2019-07-19Kernel+Userland: Addd reboot syscall (#334)Jesse
Rolling with the theme of adding a dialog to shutdown the machine, it is probably nice to have a way to reboot the machine without performing a full system powerdown. A reboot program has been added to `/bin/` as well as a corresponding `syscall` (SC_reboot). This syscall works by attempting to pulse the 8042 keyboard controller. Note that this is NOT supported on new machines, and should only be a fallback until we have proper ACPI support. The implementation causes a triple fault in QEMU, which then restarts the system. The filesystems are locked and synchronized before this occurs, so there shouldn't be any corruption etctera.
2019-07-18Userland: Remove some no-longer-needed test utilities.Andreas Kling
2019-07-18LibDraw: Introduce (formerly known as SharedGraphics.)Andreas Kling
Instead of LibGUI and WindowServer building their own copies of the drawing and graphics code, let's it in a separate LibDraw library. This avoids building the code twice, and will encourage better separation of concerns. :^)