Commit graph

8 commits

Author SHA1 Message Date
Linus Groh
f5c35fccca Userland: Replace most printf-style APIs with AK::Format APIs :^) 2021-06-01 21:30:16 +01:00
Linus Groh
1eb048bed0 Userland: Remove a bunch of unused includes
As reported by CLion.
2021-05-31 18:01:53 +01:00
Marcus Nilsson
c906987651 Utilites: Make dd truncate output file
Make dd truncate the output file as Gnu-dd does by default.
Fixes #7497
2021-05-27 15:19:06 +02:00
bleusakura
87de32df59
dd: Add ability to use k, M, & G suffixes for block sizes 2021-05-08 10:03:31 +01:00
Gunnar Beutner
605848787b Utilities: Specify mode argument when creating files with dd
When using open() with the O_CREAT flag we must specify the mode
argument. Otherwise we'll incorrectly set the new file's mode
to whatever is left on the stack:

courage:~ $ dd if=/dev/zero of=test count=1
1+0 blocks in
1+0 blocks out
512 bytes copied.
courage:~ $ ls -l test
--w-r-x---   1    anon   users        512   2021-05-08 01:29:52  test
courage:~ $

This also specifies the mode argument when opening files for
reading. This however is harmless because in those cases the argument
is ignored.

fixes #6923
2021-05-08 09:56:00 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Linus Groh
2b0c361d04 Everywhere: Fix a bunch of typos 2021-04-18 10:30:03 +02:00
g0mb4
e64a42dd50 Utilites: Add dd
This implementation of dd supports reading/writing/skipping/seeking
in terms of blocks. You can set the size of the block as well.
2021-03-29 11:02:02 +02:00