diff options
author | Matt Kraai | 2001-01-31 19:00:21 +0000 |
---|---|---|
committer | Matt Kraai | 2001-01-31 19:00:21 +0000 |
commit | dd19c6990496023fe23fefef8f1798740f7d39c6 (patch) | |
tree | 3933adefa4171173db78fa2389146ac89f4edb86 /archival/tar.c | |
parent | 63ec2732454a0c973305794e185e488106f6b282 (diff) | |
download | busybox-dd19c6990496023fe23fefef8f1798740f7d39c6.zip busybox-dd19c6990496023fe23fefef8f1798740f7d39c6.tar.gz |
Removed trailing \n from error_msg{,_and_die} messages.
Diffstat (limited to 'archival/tar.c')
-rw-r--r-- | archival/tar.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/archival/tar.c b/archival/tar.c index 3082914..60744e8 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -165,10 +165,10 @@ extern int tar_unzip_init(int tarFd) signal(SIGCHLD, child_died); if (pipe(unzip_pipe)!=0) - error_msg_and_die("pipe error\n"); + error_msg_and_die("pipe error"); if ( (child_pid = fork()) == -1) - error_msg_and_die("fork failure\n"); + error_msg_and_die("fork failure"); if (child_pid==0) { /* child process */ @@ -259,7 +259,7 @@ extern int tar_main(int argc, char **argv) break; case 'f': if (*tarName != '-') - error_msg_and_die( "Only one 'f' option allowed\n"); + error_msg_and_die( "Only one 'f' option allowed"); tarName = optarg; break; #if defined BB_FEATURE_TAR_EXCLUDE @@ -294,11 +294,11 @@ extern int tar_main(int argc, char **argv) */ if (createFlag == TRUE) { #ifndef BB_FEATURE_TAR_CREATE - error_msg_and_die( "This version of tar was not compiled with tar creation support.\n"); + error_msg_and_die( "This version of tar was not compiled with tar creation support."); #else #ifdef BB_FEATURE_TAR_GZIP if (unzipFlag==TRUE) - error_msg_and_die("Creation of compressed not internally support by tar, pipe to busybox gunzip\n"); + error_msg_and_die("Creation of compressed not internally support by tar, pipe to busybox gunzip"); #endif status = writeTarFile(tarName, verboseFlag, argv + optind, excludeList); #endif @@ -330,7 +330,7 @@ extern int tar_main(int argc, char **argv) return EXIT_FAILURE; flagError: - error_msg_and_die( "Exactly one of 'c', 'x' or 't' must be specified\n"); + error_msg_and_die( "Exactly one of 'c', 'x' or 't' must be specified"); } static void @@ -383,7 +383,7 @@ tarExtractRegularFile(TarInfo *header, int extractFlag, int tostdoutFlag) } if ( (readSize = full_read(header->tarFd, buffer, readSize)) <= 0 ) { /* Tarball seems to have a problem */ - error_msg("Unexpected EOF in archive\n"); + error_msg("Unexpected EOF in archive"); return( FALSE); } if ( readSize < writeSize ) @@ -476,7 +476,7 @@ tarExtractSymLink(TarInfo *header, int extractFlag, int tostdoutFlag) /* Do not change permissions or date on symlink, * since it changes the pointed to file instead. duh. */ #else - error_msg("%s: Cannot create symlink to '%s': %s\n", + error_msg("%s: Cannot create symlink to '%s': %s", header->name, header->linkname, "symlinks not supported"); #endif @@ -543,7 +543,7 @@ readTarHeader(struct TarHeader *rawHeader, struct TarInfo *header) ++*(header->name); if (alreadyWarned == FALSE) { - error_msg("Removing leading '/' from member names\n"); + error_msg("Removing leading '/' from member names"); alreadyWarned = TRUE; } } @@ -644,7 +644,7 @@ extern int readTarFile(int tarFd, int extractFlag, int listFlag, goto endgame; } else { errorFlag=TRUE; - error_msg("Bad tar header, skipping\n"); + error_msg("Bad tar header, skipping"); continue; } } @@ -791,7 +791,7 @@ extern int readTarFile(int tarFd, int extractFlag, int listFlag, break; #endif default: - error_msg("Unknown file type '%c' in tar file\n", header.type); + error_msg("Unknown file type '%c' in tar file", header.type); close( tarFd); return( FALSE); } @@ -803,7 +803,7 @@ extern int readTarFile(int tarFd, int extractFlag, int listFlag, return ( FALSE); } else if (errorFlag==TRUE) { - error_msg( "Error exit delayed from previous errors\n"); + error_msg( "Error exit delayed from previous errors"); return( FALSE); } else return( status); @@ -813,7 +813,7 @@ endgame: close( tarFd); if ( *(header.name) == '\0' ) { if (errorFlag==TRUE) - error_msg( "Error exit delayed from previous errors\n"); + error_msg( "Error exit delayed from previous errors"); else return( TRUE); } @@ -1002,7 +1002,7 @@ writeTarHeader(struct TarBallInfo *tbInfo, const char *header_name, header.typeflag = REGTYPE; putOctal(header.size, sizeof(header.size), statbuf->st_size); } else { - error_msg("%s: Unknown file type\n", real_name); + error_msg("%s: Unknown file type", real_name); return ( FALSE); } @@ -1061,7 +1061,7 @@ static int writeFileToTarball(const char *fileName, struct stat *statbuf, void* /* It is against the rules to archive a socket */ if (S_ISSOCK(statbuf->st_mode)) { - error_msg("%s: socket ignored\n", fileName); + error_msg("%s: socket ignored", fileName); return( TRUE); } @@ -1070,7 +1070,7 @@ static int writeFileToTarball(const char *fileName, struct stat *statbuf, void* * the new tarball */ if (tbInfo->statBuf.st_dev == statbuf->st_dev && tbInfo->statBuf.st_ino == statbuf->st_ino) { - error_msg("%s: file is the archive; skipping\n", fileName); + error_msg("%s: file is the archive; skipping", fileName); return( TRUE); } @@ -1078,7 +1078,7 @@ static int writeFileToTarball(const char *fileName, struct stat *statbuf, void* while (header_name[0] == '/') { static int alreadyWarned=FALSE; if (alreadyWarned==FALSE) { - error_msg("Removing leading '/' from member names\n"); + error_msg("Removing leading '/' from member names"); alreadyWarned=TRUE; } header_name++; @@ -1111,7 +1111,7 @@ static int writeFileToTarball(const char *fileName, struct stat *statbuf, void* /* open the file we want to archive, and make sure all is well */ if ((inputFileFd = open(fileName, O_RDONLY)) < 0) { - error_msg("%s: Cannot open: %s\n", fileName, strerror(errno)); + error_msg("%s: Cannot open: %s", fileName, strerror(errno)); return( FALSE); } @@ -1150,7 +1150,7 @@ static int writeTarFile(const char* tarName, int verboseFlag, char **argv, /* Make sure there is at least one file to tar up. */ if (*argv == NULL) - error_msg_and_die("Cowardly refusing to create an empty archive\n"); + error_msg_and_die("Cowardly refusing to create an empty archive"); /* Open the tar file for writing. */ if (!strcmp(tarName, "-")) @@ -1193,7 +1193,7 @@ static int writeTarFile(const char* tarName, int verboseFlag, char **argv, /* Hang up the tools, close up shop, head home */ close(tarFd); if (errorFlag == TRUE) { - error_msg("Error exit delayed from previous errors\n"); + error_msg("Error exit delayed from previous errors"); freeHardLinkInfo(&tbInfo.hlInfoHead); return(FALSE); } |