aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaximilian attems <max@stro.at>2011-06-28 16:10:41 +0200
committermaximilian attems <max@stro.at>2011-06-28 16:10:41 +0200
commite30f57c161f7dd643dde4aec6304dd8341f34c55 (patch)
treed628f7a2ed09a23da63dadfdd61515240d45da7d
parentbb9c74f6957596500b790f5a0da499d63580bfb0 (diff)
downloadklibc-e30f57c161f7dd643dde4aec6304dd8341f34c55.tar.gz
[klibc] cpio: cleanup O_BINARY usage.
No point of using it on a unixish OS. Signed-off-by: maximilian attems <max@stro.at>
-rw-r--r--usr/utils/cpio.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/usr/utils/cpio.c b/usr/utils/cpio.c
index 68918832d1739..15134b90ee024 100644
--- a/usr/utils/cpio.c
+++ b/usr/utils/cpio.c
@@ -31,10 +31,6 @@
#include <fnmatch.h>
#endif
-#ifndef O_BINARY
-# define O_BINARY 0
-#endif
-
# ifndef DIRECTORY_SEPARATOR
# define DIRECTORY_SEPARATOR '/'
# endif
@@ -576,8 +572,7 @@ static void create_final_defers(void)
if (link_res == 0) {
continue;
}
- out_file_des = open(d->header.c_name,
- O_CREAT | O_WRONLY | O_BINARY, 0600);
+ out_file_des = open(d->header.c_name, O_CREAT | O_WRONLY, 0600);
if (out_file_des < 0) {
fprintf(stderr, "%s: open %s: %s\n",
progname, d->header.c_name, strerror(errno));
@@ -647,8 +642,7 @@ copyin_regular_file(struct new_cpio_header *file_hdr, int in_file_des)
}
/* If not linked, copy the contents of the file. */
- out_file_des = open(file_hdr->c_name,
- O_CREAT | O_WRONLY | O_BINARY, 0600);
+ out_file_des = open(file_hdr->c_name, O_CREAT | O_WRONLY, 0600);
if (out_file_des < 0) {
fprintf(stderr, "%s: open %s: %s\n",