Commit graph

19802 commits

Author SHA1 Message Date
Andreas Kling
05dbf3891a LibCrypto: Fix a mistake in appendff() conversion 2021-05-07 21:57:29 +02:00
Linus Groh
c989550c09 Help: Add "Help" menu and move the about action there 2021-05-07 20:37:28 +01:00
Linus Groh
83d980ab9e Chess+Help: Remove erroneous ampersand from app name
This is not applicable here, the alt shortcut is set elsewhere.
2021-05-07 20:37:28 +01:00
Andreas Kling
834b6508d7 AK: Remove StringBuilder::appendf()
All users have been converted to using AK::Format via appendff().
2021-05-07 21:12:09 +02:00
Andreas Kling
730ed465fe LibMarkdown: Convert StringBuilder::appendf() => AK::Format
These are the last ones in the codebase. :^)
2021-05-07 21:12:09 +02:00
Andreas Kling
32080452e3 LibX86: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
977fa4df81 Utilities: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
e2ffd14e4e WidgetGallery: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
c1967fca0d LibLine: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
c7e9b6d00f LibWeb: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
eb05931ab5 LibGfx: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
f0687dbbb7 Services: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
8c3b603da3 Shell: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
ea027834df LibELF: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
79ff1902aa LibRegex: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
840b908c0b Applications: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
8d5eb075d8 LibGUI: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
5b87276841 LibDiff: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
f1c6288803 LibC: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
72259d5cee LibJS: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
e76956f712 LibCrypto: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
c2a8869c1f LibGemini: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Andreas Kling
24c149b013 LibCore: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:08 +02:00
Mart G
cab6155254 Kernel: Allow Ext2FSInode::write_bytes calls with a byte count of zero
write_bytes is called with a count of 0 bytes if a directory is being
deleted, because in that case even the . and .. pseudo directories are
getting removed. In this case write_bytes is now a no-op.

Before write_bytes would fail because it would check to see if there
were any blocks available to write in (even though it wasn't going to
write in them anyway).

This behaviour was uncovered because of a recent change where
directories are correctly reduced in size. Which in this case results in
all the blocks being removed from the inode, whereas previously there
would be some stale blocks around to pass the check.
2021-05-07 21:11:55 +02:00
Linus Groh
db06b106ae Meta: Fix error in lint-ports.py
The data structures here were changed from sets to dicts at some point,
with the sets now having different names - this would crash trying to
subtract two dicts.
2021-05-07 20:08:45 +01:00
Mart G
bfce328ade Kernel: Set unused block pointers in ext2 inodes to zero
e2fsck considers all blocks reachable through any of the pointers in
m_raw_inode.i_block as part of this inode regardless of the value in
m_raw_inode.i_size. When it finds more blocks than the amount that
is indicated by i_size or i_blocks it offers to repair the filesystem
by changing those values. That will actually cause further corruption.
So we must zero all pointers to blocks that are now unused.
2021-05-07 20:13:00 +02:00
Valtteri Koskivuori
09ea57031f Base: Add manpage for file(1) 2021-05-07 16:29:58 +01:00
Linus Groh
336a79a452 Base: Consistently stylize arguments in man pages as inline code 2021-05-07 16:19:49 +01:00
Linus Groh
e37d9eabb1 file: Clean up mime type enumeration macro
- Improve naming
- Order alphabetically
- Remove duplicates
2021-05-07 15:43:23 +01:00
Linus Groh
2ddd2d0866 file: Remove unused static description strings 2021-05-07 15:43:23 +01:00
Linus Groh
d7446e05db file: Don't exit immediately after file open error
Instead just remember that a file failed to open, carry on and return 1
at the end.
2021-05-07 15:43:23 +01:00
Linus Groh
85a7dae391 file: Remove redundant value_or({}) 2021-05-07 15:43:23 +01:00
Linus Groh
a9fcdc767e file: Avoid some unnecessary string copies 2021-05-07 15:43:23 +01:00
Brian Gianforcaro
dd633b9dd1 Meta: Fix Fuzzers CMakeLists.txt and ReadMe.md to use CXX_COMPILER_ID
Previously the directions omitted that you have to specify
`-CMAKE_CXX_COMPILER` when building the Fuzzers. This
would cause all kinds of weird problems at compilation and
link time. You can't specify one or the other, they must
both be pointing at clang in order for things to work as
experted. Fix this by updating the documentation to specify
that the user should specify both the C and CXX compiler explicitly
to be safe, as well as forcing the cmake clang argument handling
to modify the CXX compiler variable instead of the C version.
2021-05-07 15:19:48 +01:00
Gunnar Beutner
f999d5a91a Kernel: Limit the number of in-flight packet buffers
This fixes an OOM when hitting the VM with lots of UDP packets.

fixes #6907
2021-05-07 16:00:07 +02:00
Gunnar Beutner
dd39bb7784 DynamicLoader: Remove math functionality in favor of -lgcc
This links the dynamic linker against libgcc.a instead of having
our own copy of the math functions.

For now we need to specify -fbuilding-libgcc as a hack to work
around a bug with the -nodefaultlibs flag. Once everyone is on
the latest toolchain version this can be removed.
2021-05-07 15:35:50 +02:00
Gunnar Beutner
224755e6ef Ports: Update the gcc patch to match the toolchain 2021-05-07 15:35:50 +02:00
Gunnar Beutner
1889006b90 Toolchain: Make -nodefaultlibs not link against libgcc_s
This fixes the -nodefaultlibs flag for gcc which previously
linked against libgcc_s anyway. Even though this is a toolchain
patch we don't need to rebuild the toolchain right away.
2021-05-07 15:35:50 +02:00
Brian Gianforcaro
e3ee539fea Profiler: Don't iterate all events when filtering timeline view
There is no need to iterate through all events in a profile when
loading the timeline view, as soon as we see one event we can
move on to the next process.
2021-05-07 15:35:23 +02:00
Brian Gianforcaro
7463cbdbdb Kernel: Move cpu sample perf event to PerformanceManager 2021-05-07 15:35:23 +02:00
Brian Gianforcaro
d7089a0417 Kernel: Move process exit perf events to PerformanceManager 2021-05-07 15:35:23 +02:00
Brian Gianforcaro
8bf4201f50 Kernel: Move process creation perf events to PerformanceManager 2021-05-07 15:35:23 +02:00
Brian Gianforcaro
ccdcb6a635 Kernel: Add PerformanceManager static class, move perf event APIs there
The current method of emitting performance events requires a bit of
boiler plate at every invocation, as well as having to ignore the
return code which isn't used outside of the perf event syscall. This
change attempts to clean that up by exposing high level API's that
can be used around the code base.
2021-05-07 15:35:23 +02:00
Gunnar Beutner
43b3fd748a Profiler: Make processes selectable in the timeline view 2021-05-07 15:26:51 +02:00
Gunnar Beutner
7b9cabb5a3 Profiler: Remove the old process selection widget 2021-05-07 15:26:51 +02:00
Gunnar Beutner
2d6091be10 Profiler: Move filter checks into their own function 2021-05-07 15:26:51 +02:00
Valtteri Koskivuori
00de3b53c8 LibCore+Userland: Add more detectable types
More binary format detectors and descriptions
2021-05-07 11:46:53 +01:00
Valtteri Koskivuori
8b2706e5bb Userland: Implement a file utility
This unix classic attempts to classify and identify information about
given files based on various heuristics. In this case, we're relying on
the Core::MimeData detector for file type and LibGfx::ImageDecoder for
additional metadata if the given file is an image.
It's very simple for now, but adding new detectors should be quite easy.
2021-05-07 11:46:53 +01:00
Valtteri Koskivuori
cf5f3a9874 LibCore: Implement basic mime type guessing based on binary patterns
This attempts to guess the mime-type from a given set of bytes from the
start of a file. It only supports a few well-defined patterns for now,
but it's a start!
2021-05-07 11:46:53 +01:00
Valtteri Koskivuori
1069979ddf AK: Implement Span::starts_with()
Useful for checking for contents at the start of a span.
2021-05-07 11:46:53 +01:00