svn commit: trunk/busybox: archival archival/libunarchive e2fsprogs etc...

vda at busybox.net vda at busybox.net
Wed Sep 6 19:02:48 UTC 2006


Author: vda
Date: 2006-09-06 12:02:46 -0700 (Wed, 06 Sep 2006)
New Revision: 16059

Log:
removed a lot of trailing \n in bb_msg() calls. It is added
automatically by function itself.



Modified:
   trunk/busybox/archival/dpkg.c
   trunk/busybox/archival/libunarchive/decompress_unzip.c
   trunk/busybox/archival/libunarchive/get_header_cpio.c
   trunk/busybox/e2fsprogs/e2fsck.c
   trunk/busybox/e2fsprogs/tune2fs.c
   trunk/busybox/editors/awk.c
   trunk/busybox/editors/sed.c
   trunk/busybox/libbb/xfuncs.c
   trunk/busybox/loginutils/passwd.c
   trunk/busybox/loginutils/sulogin.c
   trunk/busybox/miscutils/makedevs.c
   trunk/busybox/miscutils/rx.c
   trunk/busybox/modutils/insmod.c
   trunk/busybox/util-linux/mount.c


Changeset:
Modified: trunk/busybox/archival/dpkg.c
===================================================================
--- trunk/busybox/archival/dpkg.c	2006-09-06 18:36:50 UTC (rev 16058)
+++ trunk/busybox/archival/dpkg.c	2006-09-06 19:02:46 UTC (rev 16059)
@@ -492,7 +492,7 @@
 					else if (strncmp(version, ">=", offset_ch) == 0) {
 						edge->operator = VER_MORE_EQUAL;
 					} else {
-						bb_error_msg_and_die("Illegal operator\n");
+						bb_error_msg_and_die("Illegal operator");
 					}
 				}
 				/* skip to start of version numbers */
@@ -1136,7 +1136,7 @@
 				 * EDGE_PRE_DEPENDS == OR_PRE_DEPENDS -1
 				 */
 				if ( root_of_alternatives && package_edge->type != root_of_alternatives->type - 1)
-					bb_error_msg_and_die("Fatal error. Package dependencies corrupt: %d != %d - 1 \n",
+					bb_error_msg_and_die("Fatal error. Package dependencies corrupt: %d != %d - 1",
 							     package_edge->type, root_of_alternatives->type);
 
 				if (package_hashtable[package_num] != NULL)
@@ -1718,7 +1718,7 @@
 				search_name_hashtable(argv[optind]),
 				search_name_hashtable("ANY"), VER_ANY);
 			if (package_hashtable[deb_file[deb_count]->package] == NULL) {
-				bb_error_msg_and_die("Package %s is uninstalled or unknown\n", argv[optind]);
+				bb_error_msg_and_die("Package %s is uninstalled or unknown", argv[optind]);
 			}
 			package_num = deb_file[deb_count]->package;
 			status_num = search_status_hashtable(name_hashtable[package_hashtable[package_num]->name]);

Modified: trunk/busybox/archival/libunarchive/decompress_unzip.c
===================================================================
--- trunk/busybox/archival/libunarchive/decompress_unzip.c	2006-09-06 18:36:50 UTC (rev 16058)
+++ trunk/busybox/archival/libunarchive/decompress_unzip.c	2006-09-06 19:02:46 UTC (rev 16059)
@@ -770,7 +770,7 @@
 	}
 	default:
 		/* bad block type */
-		bb_error_msg_and_die("bad block type %d\n", t);
+		bb_error_msg_and_die("bad block type %d", t);
 	}
 }
 

Modified: trunk/busybox/archival/libunarchive/get_header_cpio.c
===================================================================
--- trunk/busybox/archival/libunarchive/get_header_cpio.c	2006-09-06 18:36:50 UTC (rev 16058)
+++ trunk/busybox/archival/libunarchive/get_header_cpio.c	2006-09-06 19:02:46 UTC (rev 16059)
@@ -31,7 +31,7 @@
 		oldtmp = NULL;
 
 		while (tmp) {
-			bb_error_msg_and_die("need to fix this\n");
+			bb_error_msg_and_die("need to fix this");
 			if (tmp->entry->link_name) { /* Found a hardlink ready to be extracted */
 				file_header = tmp->entry;
 				if (oldtmp) {

Modified: trunk/busybox/e2fsprogs/e2fsck.c
===================================================================
--- trunk/busybox/e2fsprogs/e2fsck.c	2006-09-06 18:36:50 UTC (rev 16058)
+++ trunk/busybox/e2fsprogs/e2fsck.c	2006-09-06 19:02:46 UTC (rev 16059)
@@ -1469,7 +1469,7 @@
 						     bh->b_blocknr,
 						     1, bh->b_data);
 			if (retval) {
-				bb_error_msg("while reading block %lu\n",
+				bb_error_msg("while reading block %lu",
 					(unsigned long) bh->b_blocknr);
 				bh->b_err = retval;
 				continue;
@@ -1480,7 +1480,7 @@
 						      bh->b_blocknr,
 						      1, bh->b_data);
 			if (retval) {
-				bb_error_msg("while writing block %lu\n",
+				bb_error_msg("while writing block %lu",
 					(unsigned long) bh->b_blocknr);
 				bh->b_err = retval;
 				continue;
@@ -1796,7 +1796,7 @@
 
 	ll_rw_block(READ, 1, &jbh);
 	if (jbh->b_err) {
-		bb_error_msg(_("reading journal superblock\n"));
+		bb_error_msg(_("reading journal superblock"));
 		return jbh->b_err;
 	}
 
@@ -1852,7 +1852,7 @@
 	 * format to be able to proceed safely, so any other checks that
 	 * fail we should attempt to recover from. */
 	if (jsb->s_blocksize != htonl(journal->j_blocksize)) {
-		bb_error_msg(_("%s: no valid journal superblock found\n"),
+		bb_error_msg(_("%s: no valid journal superblock found"),
 			ctx->device_name);
 		return EXT2_ET_CORRUPT_SUPERBLOCK;
 	}
@@ -1860,7 +1860,7 @@
 	if (ntohl(jsb->s_maxlen) < journal->j_maxlen)
 		journal->j_maxlen = ntohl(jsb->s_maxlen);
 	else if (ntohl(jsb->s_maxlen) > journal->j_maxlen) {
-		bb_error_msg(_("%s: journal too short\n"),
+		bb_error_msg(_("%s: journal too short"),
 			ctx->device_name);
 		return EXT2_ET_CORRUPT_SUPERBLOCK;
 	}
@@ -5108,7 +5108,7 @@
 			p = (struct dup_block *) dnode_get(n);
 			decrement_badcount(ctx, *block_nr, p);
 		} else
-			bb_error_msg(_("internal error; can't find dup_blk for %d\n"),
+			bb_error_msg(_("internal error; can't find dup_blk for %d"),
 				*block_nr);
 	} else {
 		ext2fs_unmark_block_bitmap(ctx->block_found_map, *block_nr);
@@ -5241,7 +5241,7 @@
 			ext2fs_mark_block_bitmap(fs->block_map, new_block);
 			return BLOCK_CHANGED;
 		} else
-			bb_error_msg(_("internal error; can't find dup_blk for %d\n"),
+			bb_error_msg(_("internal error; can't find dup_blk for %d"),
 				*block_nr);
 	}
 	return 0;
@@ -12657,7 +12657,7 @@
 
 	printf(_("%s is mounted.  "), ctx->filesystem_name);
 	if (!ctx->interactive)
-		bb_error_msg_and_die(_("Cannot continue, aborting.\n\n"));
+		bb_error_msg_and_die(_("Cannot continue, aborting."));
 	printf(_("\n\n\007\007\007\007WARNING!!!  "
 	       "Running e2fsck on a mounted filesystem may cause\n"
 	       "SEVERE filesystem damage.\007\007\007\n\n"));
@@ -13377,7 +13377,7 @@
 				 * happen, unless the hardware or
 				 * device driver is being bogus.
 				 */
-				bb_error_msg(_("unable to set superblock flags on %s\n"), ctx->device_name);
+				bb_error_msg(_("unable to set superblock flags on %s"), ctx->device_name);
 				bb_error_msg_and_die(0);
 			}
 			retval = e2fsck_run_ext3_journal(ctx);
@@ -13409,12 +13409,12 @@
 #ifdef ENABLE_COMPRESSION
 	/* FIXME - do we support this at all? */
 	if (sb->s_feature_incompat & EXT2_FEATURE_INCOMPAT_COMPRESSION)
-		bb_error_msg(_("Warning: compression support is experimental.\n"));
+		bb_error_msg(_("Warning: compression support is experimental."));
 #endif
 #ifndef ENABLE_HTREE
 	if (sb->s_feature_compat & EXT2_FEATURE_COMPAT_DIR_INDEX) {
 		bb_error_msg(_("E2fsck not compiled with HTREE support,\n\t"
-			  "but filesystem %s has HTREE directories.\n"),
+			  "but filesystem %s has HTREE directories."),
 			ctx->device_name);
 		goto get_newer;
 	}

Modified: trunk/busybox/e2fsprogs/tune2fs.c
===================================================================
--- trunk/busybox/e2fsprogs/tune2fs.c	2006-09-06 18:36:50 UTC (rev 16058)
+++ trunk/busybox/e2fsprogs/tune2fs.c	2006-09-06 19:02:46 UTC (rev 16059)
@@ -663,7 +663,7 @@
 	if (s_flag == 1) {
 		if (sb->s_feature_ro_compat &
 		    EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER)
-			bb_error_msg("\nThe filesystem already has sparse superblocks\n");
+			bb_error_msg("\nThe filesystem already has sparse superblocks");
 		else {
 			sb->s_feature_ro_compat |=
 				EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
@@ -675,7 +675,7 @@
 	if (s_flag == 0) {
 		if (!(sb->s_feature_ro_compat &
 		      EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER))
-			bb_error_msg("\nThe filesystem already has sparse superblocks disabled\n");
+			bb_error_msg("\nThe filesystem already has sparse superblocks disabled");
 		else {
 			sb->s_feature_ro_compat &=
 				~EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER;
@@ -698,7 +698,7 @@
 	}
 	if (L_flag) {
 		if (strlen(new_label) > sizeof(sb->s_volume_name))
-			bb_error_msg("Warning: label too long, truncating\n");
+			bb_error_msg("Warning: label too long, truncating");
 		memset(sb->s_volume_name, 0, sizeof(sb->s_volume_name));
 		safe_strncpy(sb->s_volume_name, new_label,
 			sizeof(sb->s_volume_name));

Modified: trunk/busybox/editors/awk.c
===================================================================
--- trunk/busybox/editors/awk.c	2006-09-06 18:36:50 UTC (rev 16058)
+++ trunk/busybox/editors/awk.c	2006-09-06 19:02:46 UTC (rev 16059)
@@ -2691,7 +2691,7 @@
 				free(s);
 				break;
 			case 'W':
-				bb_error_msg("Warning: unrecognized option '-W %s' ignored\n", optarg);
+				bb_error_msg("Warning: unrecognized option '-W %s' ignored", optarg);
 				break;
 
 			default:

Modified: trunk/busybox/editors/sed.c
===================================================================
--- trunk/busybox/editors/sed.c	2006-09-06 18:36:50 UTC (rev 16058)
+++ trunk/busybox/editors/sed.c	2006-09-06 19:02:46 UTC (rev 16059)
@@ -512,7 +512,7 @@
 
 			cmdstr++;
 			idx = get_address(cmdstr, &sed_cmd->end_line, &sed_cmd->end_match);
-			if (!idx) bb_error_msg_and_die("no address after comma\n");
+			if (!idx) bb_error_msg_and_die("no address after comma");
 			cmdstr += idx;
 		}
 

Modified: trunk/busybox/libbb/xfuncs.c
===================================================================
--- trunk/busybox/libbb/xfuncs.c	2006-09-06 18:36:50 UTC (rev 16058)
+++ trunk/busybox/libbb/xfuncs.c	2006-09-06 19:02:46 UTC (rev 16059)
@@ -109,7 +109,7 @@
 int xopen(const char *pathname, int flags)
 {
 	if (ENABLE_DEBUG && (flags & O_CREAT))
-		bb_error_msg_and_die("xopen() with O_CREAT\n");
+		bb_error_msg_and_die("xopen() with O_CREAT");
 
 	return xopen3(pathname, flags, 0777);
 }

Modified: trunk/busybox/loginutils/passwd.c
===================================================================
--- trunk/busybox/loginutils/passwd.c	2006-09-06 18:36:50 UTC (rev 16058)
+++ trunk/busybox/loginutils/passwd.c	2006-09-06 19:02:46 UTC (rev 16059)
@@ -170,11 +170,11 @@
 	}
 	pw = getpwnam(name);
 	if (!pw) {
-		bb_error_msg_and_die("Unknown user %s\n", name);
+		bb_error_msg_and_die("Unknown user %s", name);
 	}
 	if (!amroot && pw->pw_uid != getuid()) {
 		syslog(LOG_WARNING, "can't change pwd for `%s'", name);
-		bb_error_msg_and_die("Permission denied.\n");
+		bb_error_msg_and_die("Permission denied.");
 	}
 	if (ENABLE_FEATURE_SHADOWPASSWDS) {
 		struct spwd *sp = getspnam(name);
@@ -188,12 +188,12 @@
 		if (!amroot) {
 			if (cp[0] == '!') {
 				syslog(LOG_WARNING, "password locked for `%s'", np);
-				bb_error_msg_and_die( "The password for `%s' cannot be changed.\n", np);
+				bb_error_msg_and_die( "The password for `%s' cannot be changed.", np);
 			}
 		}
 		printf("Changing password for %s\n", name);
 		if (new_password(pw, amroot, algo)) {
-			bb_error_msg_and_die( "The password for %s is unchanged.\n", name);
+			bb_error_msg_and_die( "The password for %s is unchanged.", name);
 		}
 	} else if (lflg) {
 		if (crypt_passwd[0] != '!') {
@@ -222,7 +222,7 @@
 		printf("Password changed.\n");
 	} else {
 		syslog(LOG_WARNING, "an error occurred updating the password file");
-		bb_error_msg_and_die("An error occurred updating the password file.\n");
+		bb_error_msg_and_die("An error occurred updating the password file.");
 	}
 	if (ENABLE_FEATURE_CLEAN_UP) free(myname);
 	return (0);

Modified: trunk/busybox/loginutils/sulogin.c
===================================================================
--- trunk/busybox/loginutils/sulogin.c	2006-09-06 18:36:50 UTC (rev 16058)
+++ trunk/busybox/loginutils/sulogin.c	2006-09-06 19:02:46 UTC (rev 16059)
@@ -99,7 +99,7 @@
 	}
 	if (access(bb_path_passwd_file, 0) == -1) {
 		syslog(LOG_WARNING, "No password file\n");
-		bb_error_msg_and_die("No password file\n");
+		bb_error_msg_and_die("No password file");
 	}
 	if (!isatty(0) || !isatty(1) || !isatty(2)) {
 		exit(EXIT_FAILURE);
@@ -113,8 +113,8 @@
 
 	signal(SIGALRM, catchalarm);
 	if (!(pwd = getpwnam(name))) {
-		syslog(LOG_WARNING, "No password entry for `root'\n");
-		bb_error_msg_and_die("No password entry for `root'\n");
+		syslog(LOG_WARNING, "No password entry for `root'");
+		bb_error_msg_and_die("No password entry for `root'");
 	}
 	pwent = *pwd;
 #if ENABLE_FEATURE_SHADOWPASSWDS

Modified: trunk/busybox/miscutils/makedevs.c
===================================================================
--- trunk/busybox/miscutils/makedevs.c	2006-09-06 18:36:50 UTC (rev 16058)
+++ trunk/busybox/miscutils/makedevs.c	2006-09-06 19:02:46 UTC (rev 16059)
@@ -119,7 +119,7 @@
 		{
 			if (*line=='\0' || *line=='#' || isspace(*line))
 				continue;
-			bb_error_msg("line %d invalid: '%s'\n", linenum, line);
+			bb_error_msg("line %d invalid: '%s'", linenum, line);
 			ret = EXIT_FAILURE;
 			continue;
 		}

Modified: trunk/busybox/miscutils/rx.c
===================================================================
--- trunk/busybox/miscutils/rx.c	2006-09-06 18:36:50 UTC (rev 16058)
+++ trunk/busybox/miscutils/rx.c	2006-09-06 19:02:46 UTC (rev 16059)
@@ -266,7 +266,7 @@
 	filefd = xopen3(fn, O_RDWR|O_CREAT|O_TRUNC, 0666);
 
 	if (tcgetattr(ttyfd, &tty) < 0)
-			bb_error_msg_and_die("%s: tcgetattr failed: %m\n", argv[0]);
+			bb_perror_msg_and_die("%s: tcgetattr failed", argv[0]);
 
 	orig_tty = tty;
 
@@ -284,7 +284,7 @@
 	tcsetattr(ttyfd, TCSAFLUSH, &orig_tty);
 
 	if (n < 0)
-			bb_error_msg_and_die("\n%s: receive failed:\n  %s\n",
+		bb_error_msg_and_die("\n%s: receive failed:\n  %s",
 							   argv[0], error_buf);
 
 	bb_fflush_stdout_and_exit(EXIT_SUCCESS);

Modified: trunk/busybox/modutils/insmod.c
===================================================================
--- trunk/busybox/modutils/insmod.c	2006-09-06 18:36:50 UTC (rev 16058)
+++ trunk/busybox/modutils/insmod.c	2006-09-06 19:02:46 UTC (rev 16059)
@@ -3562,7 +3562,7 @@
 		sec->contents = imagebase + (sec->header.sh_addr - base);
 		fseek(fp, sec->header.sh_offset, SEEK_SET);
 		if (fread(sec->contents, sec->header.sh_size, 1, fp) != 1) {
-			bb_error_msg("error reading ELF section data: %s\n", strerror(errno));
+			bb_perror_msg("error reading ELF section data");
 			return 0;
 		}
 

Modified: trunk/busybox/util-linux/mount.c
===================================================================
--- trunk/busybox/util-linux/mount.c	2006-09-06 18:36:50 UTC (rev 16058)
+++ trunk/busybox/util-linux/mount.c	2006-09-06 19:02:46 UTC (rev 16059)
@@ -228,7 +228,7 @@
 		int i;
 
 		if(!mountTable)
-			bb_error_msg("No %s\n",bb_path_mtab_file);
+			bb_error_msg("No %s",bb_path_mtab_file);
 
 		// Add vfs string flags
 




More information about the busybox-cvs mailing list