1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:37:44 +00:00

Utilites: Make dd truncate output file

Make dd truncate the output file as Gnu-dd does by default.
Fixes #7497
This commit is contained in:
Marcus Nilsson 2021-05-27 11:53:23 +02:00 committed by Andreas Kling
parent fae7c436e6
commit c906987651

View file

@ -132,7 +132,7 @@ int main(int argc, char** argv)
int input_fd = 0; int input_fd = 0;
int input_flags = O_RDONLY; int input_flags = O_RDONLY;
int output_fd = 1; int output_fd = 1;
int output_flags = O_CREAT | O_WRONLY; int output_flags = O_CREAT | O_WRONLY | O_TRUNC;
size_t block_size = 512; size_t block_size = 512;
size_t count = 0; size_t count = 0;
size_t skip = 0; size_t skip = 0;