diff options
author | Matt Kraai <kraai@debian.org> | 2000-10-23 22:03:46 +0400 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2000-10-23 22:03:46 +0400 |
commit | 207061ac0d400f663dc411c132d7fc07dca7d496 (patch) | |
tree | 4d50f76923e65e6247dc399f20b37c5c1bc79487 | |
parent | 2be4797a06849cf5c9c4f97e1489d70b7fc8be36 (diff) |
Fix error messages.
-rw-r--r-- | archival/gunzip.c | 8 | ||||
-rw-r--r-- | archival/gzip.c | 8 | ||||
-rw-r--r-- | coreutils/md5sum.c | 6 | ||||
-rw-r--r-- | gunzip.c | 8 | ||||
-rw-r--r-- | gzip.c | 8 | ||||
-rw-r--r-- | insmod.c | 24 | ||||
-rw-r--r-- | md5sum.c | 6 | ||||
-rw-r--r-- | modutils/insmod.c | 24 |
8 files changed, 46 insertions, 46 deletions
diff --git a/archival/gunzip.c b/archival/gunzip.c index 7a360a6ea..0c9d40670 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c @@ -1120,11 +1120,11 @@ int in, out; /* input and output file descriptors */ if (res == 3) { errorMsg(memory_exhausted); } else if (res != 0) { - errorMsg("invalid compressed data--format violated"); + errorMsg("invalid compressed data--format violated\n"); } } else { - errorMsg("internal error, invalid method"); + errorMsg("internal error, invalid method\n"); } /* Get the crc and original length */ @@ -1153,10 +1153,10 @@ int in, out; /* input and output file descriptors */ /* Validate decompression */ if (orig_crc != updcrc(outbuf, 0)) { - errorMsg("invalid compressed data--crc error"); + errorMsg("invalid compressed data--crc error\n"); } if (orig_len != (ulg) bytes_out) { - errorMsg("invalid compressed data--length error"); + errorMsg("invalid compressed data--length error\n"); } /* Check if there are more entries in a pkzip file */ diff --git a/archival/gzip.c b/archival/gzip.c index e518ffd16..6b25e47df 100644 --- a/archival/gzip.c +++ b/archival/gzip.c @@ -1381,7 +1381,7 @@ int length; (char *) window + start, length) != EQUAL) { fprintf(stderr, " start %d, match %d, length %d\n", start, match, length); - errorMsg("invalid match"); + errorMsg("invalid match\n"); } if (verbose > 1) { fprintf(stderr, "\\[%d,%d]", start - match, length); @@ -2911,7 +2911,7 @@ int eof; /* true if this is the last block for a file */ #endif /* Since LIT_BUFSIZE <= 2*WSIZE, the input data must be there: */ if (buf == (char *) 0) - errorMsg("block vanished"); + errorMsg("block vanished\n"); copy_block(buf, (unsigned) stored_len, 0); /* without header */ compressed_len = stored_len << 3; @@ -3094,7 +3094,7 @@ local void set_file_type() bin_freq += dyn_ltree[n++].Freq; *file_type = bin_freq > (ascii_freq >> 2) ? BINARY : ASCII; if (*file_type == BINARY && translate_eol) { - errorMsg("-l used on binary file"); + errorMsg("-l used on binary file\n"); } } @@ -3256,7 +3256,7 @@ char *env; /* name of environment variable */ /* Copy the program name first */ if (oargc-- < 0) - errorMsg("argc<=0"); + errorMsg("argc<=0\n"); *(nargv++) = *(oargv++); /* Then copy the environment args */ diff --git a/coreutils/md5sum.c b/coreutils/md5sum.c index c7e540223..21570de93 100644 --- a/coreutils/md5sum.c +++ b/coreutils/md5sum.c @@ -810,7 +810,7 @@ static int md5_check(const char *checkfile_name) free(line); if (ferror(checkfile_stream)) { - errorMsg("%s: read error", checkfile_name); /* */ + errorMsg("%s: read error\n", checkfile_name); /* */ return FALSE; } @@ -991,12 +991,12 @@ int md5sum_main(int argc, } if (fclose (stdout) == EOF) { - errorMsg("write error"); + errorMsg("write error\n"); exit FALSE; } if (have_read_stdin && fclose (stdin) == EOF) { - errorMsg("standard input"); + errorMsg("standard input\n"); exit FALSE; } @@ -1120,11 +1120,11 @@ int in, out; /* input and output file descriptors */ if (res == 3) { errorMsg(memory_exhausted); } else if (res != 0) { - errorMsg("invalid compressed data--format violated"); + errorMsg("invalid compressed data--format violated\n"); } } else { - errorMsg("internal error, invalid method"); + errorMsg("internal error, invalid method\n"); } /* Get the crc and original length */ @@ -1153,10 +1153,10 @@ int in, out; /* input and output file descriptors */ /* Validate decompression */ if (orig_crc != updcrc(outbuf, 0)) { - errorMsg("invalid compressed data--crc error"); + errorMsg("invalid compressed data--crc error\n"); } if (orig_len != (ulg) bytes_out) { - errorMsg("invalid compressed data--length error"); + errorMsg("invalid compressed data--length error\n"); } /* Check if there are more entries in a pkzip file */ @@ -1381,7 +1381,7 @@ int length; (char *) window + start, length) != EQUAL) { fprintf(stderr, " start %d, match %d, length %d\n", start, match, length); - errorMsg("invalid match"); + errorMsg("invalid match\n"); } if (verbose > 1) { fprintf(stderr, "\\[%d,%d]", start - match, length); @@ -2911,7 +2911,7 @@ int eof; /* true if this is the last block for a file */ #endif /* Since LIT_BUFSIZE <= 2*WSIZE, the input data must be there: */ if (buf == (char *) 0) - errorMsg("block vanished"); + errorMsg("block vanished\n"); copy_block(buf, (unsigned) stored_len, 0); /* without header */ compressed_len = stored_len << 3; @@ -3094,7 +3094,7 @@ local void set_file_type() bin_freq += dyn_ltree[n++].Freq; *file_type = bin_freq > (ascii_freq >> 2) ? BINARY : ASCII; if (*file_type == BINARY && translate_eol) { - errorMsg("-l used on binary file"); + errorMsg("-l used on binary file\n"); } } @@ -3256,7 +3256,7 @@ char *env; /* name of environment variable */ /* Copy the program name first */ if (oargc-- < 0) - errorMsg("argc<=0"); + errorMsg("argc<=0\n"); *(nargv++) = *(oargv++); /* Then copy the environment args */ @@ -77,7 +77,7 @@ #ifndef MODUTILS_MODULE_H #define MODUTILS_MODULE_H 1 -#ident "$Id: insmod.c,v 1.27 2000/10/23 17:55:27 kraai Exp $" +#ident "$Id: insmod.c,v 1.28 2000/10/23 18:03:46 kraai Exp $" /* This file contains the structures used by the 2.0 and 2.1 kernels. We do not use the kernel headers directly because we do not wish @@ -283,7 +283,7 @@ int delete_module(const char *); #ifndef MODUTILS_OBJ_H #define MODUTILS_OBJ_H 1 -#ident "$Id: insmod.c,v 1.27 2000/10/23 17:55:27 kraai Exp $" +#ident "$Id: insmod.c,v 1.28 2000/10/23 18:03:46 kraai Exp $" /* The relocatable object is manipulated using elfin types. */ @@ -1456,7 +1456,7 @@ static int old_get_kernel_symbols(const char *m_name) nks = get_kernel_syms(NULL); if (nks < 0) { - errorMsg("get_kernel_syms: %s: %s", m_name, strerror(errno)); + errorMsg("get_kernel_syms: %s: %s\n", m_name, strerror(errno)); return 0; } @@ -1637,7 +1637,7 @@ old_init_module(const char *m_name, struct obj_file *f, m_size | (flag_autoclean ? OLD_MOD_AUTOCLEAN : 0), &routines, symtab); if (ret) - errorMsg("init_module: %s: %s", m_name, strerror(errno)); + errorMsg("init_module: %s: %s\n", m_name, strerror(errno)); free(image); free(symtab); @@ -1949,7 +1949,7 @@ static int new_get_kernel_symbols(void) module_names = xrealloc(module_names, bufsize = ret); goto retry_modules_load; } - errorMsg("QM_MODULES: %s", strerror(errno)); + errorMsg("QM_MODULES: %s\n", strerror(errno)); return 0; } @@ -1968,7 +1968,7 @@ static int new_get_kernel_symbols(void) /* The module was removed out from underneath us. */ continue; } - errorMsg("query_module: QM_INFO: %s: %s", mn, strerror(errno)); + errorMsg("query_module: QM_INFO: %s: %s\n", mn, strerror(errno)); return 0; } @@ -1983,7 +1983,7 @@ static int new_get_kernel_symbols(void) /* The module was removed out from underneath us. */ continue; default: - errorMsg("query_module: QM_SYMBOLS: %s: %s", mn, strerror(errno)); + errorMsg("query_module: QM_SYMBOLS: %s: %s\n", mn, strerror(errno)); return 0; } } @@ -2008,7 +2008,7 @@ static int new_get_kernel_symbols(void) syms = xrealloc(syms, bufsize = ret); goto retry_kern_sym_load; } - errorMsg("kernel: QM_SYMBOLS: %s", strerror(errno)); + errorMsg("kernel: QM_SYMBOLS: %s\n", strerror(errno)); return 0; } nksyms = nsyms = ret; @@ -2189,7 +2189,7 @@ new_init_module(const char *m_name, struct obj_file *f, ret = new_sys_init_module(m_name, (struct new_module *) image); if (ret) - errorMsg("init_module: %s: %s", m_name, strerror(errno)); + errorMsg("init_module: %s: %s\n", m_name, strerror(errno)); free(image); @@ -2569,7 +2569,7 @@ struct obj_file *obj_load(FILE * fp) fseek(fp, 0, SEEK_SET); if (fread(&f->header, sizeof(f->header), 1, fp) != 1) { - errorMsg("error reading ELF header: %s", strerror(errno)); + errorMsg("error reading ELF header: %s\n", strerror(errno)); return NULL; } @@ -2608,7 +2608,7 @@ struct obj_file *obj_load(FILE * fp) section_headers = alloca(sizeof(ElfW(Shdr)) * shnum); fseek(fp, f->header.e_shoff, SEEK_SET); if (fread(section_headers, sizeof(ElfW(Shdr)), shnum, fp) != shnum) { - errorMsg("error reading ELF section headers: %s", strerror(errno)); + errorMsg("error reading ELF section headers: %s\n", strerror(errno)); return NULL; } @@ -2638,7 +2638,7 @@ struct obj_file *obj_load(FILE * fp) sec->contents = xmalloc(sec->header.sh_size); fseek(fp, sec->header.sh_offset, SEEK_SET); if (fread(sec->contents, sec->header.sh_size, 1, fp) != 1) { - errorMsg("error reading ELF section data: %s", strerror(errno)); + errorMsg("error reading ELF section data: %s\n", strerror(errno)); return NULL; } } else { @@ -810,7 +810,7 @@ static int md5_check(const char *checkfile_name) free(line); if (ferror(checkfile_stream)) { - errorMsg("%s: read error", checkfile_name); /* */ + errorMsg("%s: read error\n", checkfile_name); /* */ return FALSE; } @@ -991,12 +991,12 @@ int md5sum_main(int argc, } if (fclose (stdout) == EOF) { - errorMsg("write error"); + errorMsg("write error\n"); exit FALSE; } if (have_read_stdin && fclose (stdin) == EOF) { - errorMsg("standard input"); + errorMsg("standard input\n"); exit FALSE; } diff --git a/modutils/insmod.c b/modutils/insmod.c index 2b7ae961a..4f96c950e 100644 --- a/modutils/insmod.c +++ b/modutils/insmod.c @@ -77,7 +77,7 @@ #ifndef MODUTILS_MODULE_H #define MODUTILS_MODULE_H 1 -#ident "$Id: insmod.c,v 1.27 2000/10/23 17:55:27 kraai Exp $" +#ident "$Id: insmod.c,v 1.28 2000/10/23 18:03:46 kraai Exp $" /* This file contains the structures used by the 2.0 and 2.1 kernels. We do not use the kernel headers directly because we do not wish @@ -283,7 +283,7 @@ int delete_module(const char *); #ifndef MODUTILS_OBJ_H #define MODUTILS_OBJ_H 1 -#ident "$Id: insmod.c,v 1.27 2000/10/23 17:55:27 kraai Exp $" +#ident "$Id: insmod.c,v 1.28 2000/10/23 18:03:46 kraai Exp $" /* The relocatable object is manipulated using elfin types. */ @@ -1456,7 +1456,7 @@ static int old_get_kernel_symbols(const char *m_name) nks = get_kernel_syms(NULL); if (nks < 0) { - errorMsg("get_kernel_syms: %s: %s", m_name, strerror(errno)); + errorMsg("get_kernel_syms: %s: %s\n", m_name, strerror(errno)); return 0; } @@ -1637,7 +1637,7 @@ old_init_module(const char *m_name, struct obj_file *f, m_size | (flag_autoclean ? OLD_MOD_AUTOCLEAN : 0), &routines, symtab); if (ret) - errorMsg("init_module: %s: %s", m_name, strerror(errno)); + errorMsg("init_module: %s: %s\n", m_name, strerror(errno)); free(image); free(symtab); @@ -1949,7 +1949,7 @@ static int new_get_kernel_symbols(void) module_names = xrealloc(module_names, bufsize = ret); goto retry_modules_load; } - errorMsg("QM_MODULES: %s", strerror(errno)); + errorMsg("QM_MODULES: %s\n", strerror(errno)); return 0; } @@ -1968,7 +1968,7 @@ static int new_get_kernel_symbols(void) /* The module was removed out from underneath us. */ continue; } - errorMsg("query_module: QM_INFO: %s: %s", mn, strerror(errno)); + errorMsg("query_module: QM_INFO: %s: %s\n", mn, strerror(errno)); return 0; } @@ -1983,7 +1983,7 @@ static int new_get_kernel_symbols(void) /* The module was removed out from underneath us. */ continue; default: - errorMsg("query_module: QM_SYMBOLS: %s: %s", mn, strerror(errno)); + errorMsg("query_module: QM_SYMBOLS: %s: %s\n", mn, strerror(errno)); return 0; } } @@ -2008,7 +2008,7 @@ static int new_get_kernel_symbols(void) syms = xrealloc(syms, bufsize = ret); goto retry_kern_sym_load; } - errorMsg("kernel: QM_SYMBOLS: %s", strerror(errno)); + errorMsg("kernel: QM_SYMBOLS: %s\n", strerror(errno)); return 0; } nksyms = nsyms = ret; @@ -2189,7 +2189,7 @@ new_init_module(const char *m_name, struct obj_file *f, ret = new_sys_init_module(m_name, (struct new_module *) image); if (ret) - errorMsg("init_module: %s: %s", m_name, strerror(errno)); + errorMsg("init_module: %s: %s\n", m_name, strerror(errno)); free(image); @@ -2569,7 +2569,7 @@ struct obj_file *obj_load(FILE * fp) fseek(fp, 0, SEEK_SET); if (fread(&f->header, sizeof(f->header), 1, fp) != 1) { - errorMsg("error reading ELF header: %s", strerror(errno)); + errorMsg("error reading ELF header: %s\n", strerror(errno)); return NULL; } @@ -2608,7 +2608,7 @@ struct obj_file *obj_load(FILE * fp) section_headers = alloca(sizeof(ElfW(Shdr)) * shnum); fseek(fp, f->header.e_shoff, SEEK_SET); if (fread(section_headers, sizeof(ElfW(Shdr)), shnum, fp) != shnum) { - errorMsg("error reading ELF section headers: %s", strerror(errno)); + errorMsg("error reading ELF section headers: %s\n", strerror(errno)); return NULL; } @@ -2638,7 +2638,7 @@ struct obj_file *obj_load(FILE * fp) sec->contents = xmalloc(sec->header.sh_size); fseek(fp, sec->header.sh_offset, SEEK_SET); if (fread(sec->contents, sec->header.sh_size, 1, fp) != 1) { - errorMsg("error reading ELF section data: %s", strerror(errno)); + errorMsg("error reading ELF section data: %s\n", strerror(errno)); return NULL; } } else { |