aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-05-20 15:52:42 +0100
committerRon Yorston <rmy@pobox.com>2020-05-20 15:52:42 +0100
commit184aa4b5d07d5f3fcc15dd4bb0d4636fba734de3 (patch)
treee34649217179b033cbc2838df5302b74346caaad /include
parent1d2a15e040b272155d3e40b597292a56de540e7d (diff)
downloadbusybox-w32-184aa4b5d07d5f3fcc15dd4bb0d4636fba734de3.tar.gz
busybox-w32-184aa4b5d07d5f3fcc15dd4bb0d4636fba734de3.tar.bz2
busybox-w32-184aa4b5d07d5f3fcc15dd4bb0d4636fba734de3.zip
dd: fix handling of 'conv=notrunc seek=N'
Commit e6680912a (dd: create a sparse file when seek=N is used) broke the use of 'conv=notrunc seek=N' to modify existing files. Rename seek_sparse() to make_sparse() and: - add an argument to specify the start of the sparse region; - call make_sparse() before ftruncate(); - call make_sparse() only if: * we can determine the size of the file; * the file is not open in append mode; * the file is being extended. This should fix GitHub issue #186.
Diffstat (limited to 'include')
-rw-r--r--include/mingw.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h
index 0fead43c9..39d716521 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -537,5 +537,5 @@ int chdir_system_drive(void);
537char *xabsolute_path(char *path); 537char *xabsolute_path(char *path);
538char *get_drive_cwd(const char *path, char *buffer, int size); 538char *get_drive_cwd(const char *path, char *buffer, int size);
539void fix_path_case(char *path); 539void fix_path_case(char *path);
540void seek_sparse(int fd, size_t size); 540void make_sparse(int fd, off_t start, off_t end);
541int skip_ansi_emulation(int reset); 541int skip_ansi_emulation(int reset);