Commit graph

1402 commits

Author SHA1 Message Date
Sam Atkins
14ce07dd52 markdown-check: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
ccebf8bf59 man: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
75208f2333 lsusb: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
880b35739e lspci: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
376b5731a2 lsof: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
9e4689f4c8 lsirq: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
2be7f9f42d lscpu: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
03a3b6f91c lsblk: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
8d7179766a js: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
678b4983cb json: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
1d67a1e73f ifconfig: Port to Core::Stream and Core::System 2022-11-19 17:00:10 +00:00
Sam Atkins
78a94cd3b7 headless-browser: Port screenshot output to Core::Stream
As noted in https://github.com/SerenityOS/serenity/issues/15239
`headless-browser` is currently broken, with or without these changes.
2022-11-19 17:00:10 +00:00
Sam Atkins
2228786329 gron: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
c757db9475 gml-format: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
d39552a7b7 fortune: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
813fc10aae file: Port to Core::Stream
Some nicer way of dealing with `stat` would be good. :thonk:
2022-11-19 17:00:10 +00:00
Sam Atkins
7684e514dd du: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
e08a42acd8 dmesg: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
37d4e01fc4 diff: Port to Core::Stream
Also switched to calling Core::System::isatty(), and doing so once
instead of per hunk.
2022-11-19 17:00:10 +00:00
Sam Atkins
ed6d353cdd df: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
05c3b48e63 Utilities: Port cpp utilities to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
39a4f1560b copy: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
6763e1bd60 comm: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
8ed5403d8c comm: Stop skipping a line in the output
Because of how we output lines in the loop above, if we leave that loop
when the last line was not the same in both files, then either
`file1_line` or `file2_line` has not been output yet.
`process_remaining()` does not print that line either, since it
immediately reads a new line. So, output the previously-missing line
before we call that. :^)
2022-11-19 17:00:10 +00:00
Sam Atkins
83366e2b2e cksum: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
d071a93047 base64: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Sam Atkins
5a0c298074 arp: Port to Core::Stream 2022-11-19 17:00:10 +00:00
Andreas Kling
fb00d3ed25 Kernel+lsirq: Track per-CPU IRQ handler call counts
Each GenericInterruptHandler now tracks the number of calls that each
CPU has serviced.

This takes care of a FIXME in the /sys/kernel/interrupts generator.

Also, the lsirq command line tool now displays per-CPU call counts.
2022-11-19 15:39:30 +01:00
MacDue
8a5d2be617 Everywhere: Remove unnecessary mutable attributes from lambdas
These lambdas were marked mutable as they captured a Ptr wrapper
class by value, which then only returned const-qualified references
to the value they point from the previous const pointer operators.

Nothing is actually mutating in the lambdas state here, and now
that the Ptr operators don't add extra const qualifiers these
can be removed.
2022-11-19 14:37:31 +00:00
Eli Youngs
1b4ebcaa0c hexdump: Support truncating output with -n 2022-11-14 14:54:45 +00:00
Eli Youngs
ae68def54b hexdump: Pledge stdio and rpath 2022-11-14 14:54:45 +00:00
Eli Youngs
bd4bb4fd51 seq: Fix clang-tidy warnings 2022-11-14 14:38:23 +00:00
Eli Youngs
f05ec0da53 seq: Add the --terminator option 2022-11-14 14:38:23 +00:00
Eli Youngs
956ef0c9fd seq: Add the --separator option 2022-11-14 14:38:23 +00:00
Eli Youngs
d16fa32674 seq: Interpret parameters with ArgsParser 2022-11-14 14:38:23 +00:00
implicitfield
58e9262ff1 LibArchive: Make get_field_as_integral error out on non-octal input
Fixes this bug that was reported by OSS-Fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52493
2022-11-13 17:37:26 -07:00
implicitfield
c88d8a21cc LibArchive: Make TarInputStream::advance report errors
Fixes this bug that was reported by OSS-Fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=52862
2022-11-13 17:37:26 -07:00
Lucas CHOLLET
84fd011c49 less: Use LibLine to compute line arrangement with fixed line width 2022-11-10 12:34:21 +03:30
Liav A
8d8b0d0a34 Userland: Add support for jails
This happens in two ways:
1. LibCore now has two new methods for creating Jails and attaching
   processes to a Jail.
2. We introduce 3 new utilities - lsjails, jail-create and jails-attach,
   which list jails, create jails and attach processes to a Jail,
   respectively.
2022-11-05 18:00:58 -06:00
Liav A
1d0066a5cc Userland/pls: Use Core::System::exec_command method to execute a command 2022-11-05 18:00:58 -06:00
demostanis
c8f790e4dd tail: Port to Core::Stream, use Core::FileWatcher 2022-11-02 21:29:20 -06:00
Tim Schumacher
6490529ef7 Utilities: Clean up CMakeLists.txt
We previously had a lot of duplication (and mismatched settings) around
whether a target was "special" or not, although the only special thing
about it was that its name was a reserved keyword and therefore had to
be renamed later.

Fix that by mostly consolidating the different configuration paths and
then purging all duplicated linking libraries from the bottom of the
file.
2022-11-01 14:49:09 +00:00
Tim Schumacher
ce2f1b845f Everywhere: Mark dependencies of most targets as PRIVATE
Otherwise, we end up propagating those dependencies into targets that
link against that library, which creates unnecessary link-time
dependencies.

Also included are changes to readd now missing dependencies to tools
that actually need them.
2022-11-01 14:49:09 +00:00
Tim Schumacher
7834e26ddb Everywhere: Explicitly link all binaries against the LibC target
Even though the toolchain implicitly links against -lc, it does not know
where it should get LibC from except for the sysroot. In the case of
Clang this causes it to pick up the LibC stub instead, which might be
slightly outdated and feature missing symbols.

This is currently not an issue that manifests because we pass through
the dependency on LibC and other libraries by accident, which causes
CMake to link against the LibC target (instead of just the library),
and thus points the linker at the build output directory.

Since we are looking to fix that in the upcoming commits, let's make
sure that everything will still be able to find the proper LibC first.
2022-11-01 14:49:09 +00:00
Peter Elliott
83e62e8c4f Utilities+LibArchive: Don't follow symlinks 2022-10-31 22:10:22 +00:00
Timothy Flynn
a53749bc9d ntpquery: Unveil paths after parsing arguments
This allows running `ntpquery --help` in environments that do not have
the LookupServer service running, e.g. when generating man pages. The
same was done for netstat in commit 7fba413.
2022-10-31 22:10:14 +00:00
Tim Schumacher
d0d494a151 LibELF: Drop the separate file name member from DynamicLoader 2022-10-31 19:23:02 +00:00
Tim Schumacher
177a5baf60 LibELF: Ensure that DynamicLoader only receives absolute paths
While at it, start renaming variables where we know that they store a
path, so that we will get less confused in the future.
2022-10-31 19:23:02 +00:00
Timothy Flynn
bda737fde7 nologin: Use proper format strings with out() and outln()
1. Don't use the sv literal as this bypasses CheckedFormatString.

2. Don't use the content of a file as the format string. If the file
   contains "{}", the program will crash.
2022-10-31 11:22:39 -04:00
Beckett Normington
30189186e9 Utilities: Add nologin application
This adds the `nologin` application to the system. This application
will look for `/etc/nologin`. If it is present, it will display the
message in the file. Otherwise, it will display an error about the
current account being unavailable.
2022-10-31 10:54:00 +00:00