diff options
author | Rob Landley | 2006-08-03 15:41:12 +0000 |
---|---|---|
committer | Rob Landley | 2006-08-03 15:41:12 +0000 |
commit | d921b2ecc0d294ad4bf8c7458fc52a60c28727d2 (patch) | |
tree | e4a2769349867c441cf2983d83097bb66701a733 /archival/uncompress.c | |
parent | 6dce0b6fa79f2d4bb7e9d90e1fbc0f6beb25f855 (diff) | |
download | busybox-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.zip busybox-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.tar.gz |
Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes... General cleanup pass. What I've
been doing for the last couple days.
And it conflicts! I've removed httpd.c from this checkin due to somebody else
touching that file. It builds for me. I have to catch a bus. (Now you know
why I'm looking forward to Mercurial.)
Diffstat (limited to 'archival/uncompress.c')
-rw-r--r-- | archival/uncompress.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/archival/uncompress.c b/archival/uncompress.c index 801293f..ca775c7 100644 --- a/archival/uncompress.c +++ b/archival/uncompress.c @@ -5,13 +5,6 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -#include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> - #include "busybox.h" #include "unarchive.h" @@ -36,7 +29,7 @@ int uncompress_main(int argc, char **argv) src_fd = STDIN_FILENO; flags |= GUNZIP_TO_STDOUT; } else { - src_fd = bb_xopen(compressed_file, O_RDONLY); + src_fd = xopen(compressed_file, O_RDONLY); } /* Check that the input is sane. */ @@ -52,7 +45,7 @@ int uncompress_main(int argc, char **argv) struct stat stat_buf; char *extension; - uncompressed_file = bb_xstrdup(compressed_file); + uncompressed_file = xstrdup(compressed_file); extension = strrchr(uncompressed_file, '.'); if (!extension || (strcmp(extension, ".Z") != 0)) { @@ -62,7 +55,7 @@ int uncompress_main(int argc, char **argv) /* Open output file */ xstat(compressed_file, &stat_buf); - dst_fd = bb_xopen3(uncompressed_file, O_WRONLY | O_CREAT, + dst_fd = xopen3(uncompressed_file, O_WRONLY | O_CREAT, stat_buf.st_mode); /* If unzip succeeds remove the old file */ |