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 */
/* 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 */
(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);
#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;
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");
}
}
/* Copy the program name first */
if (oargc-- < 0)
- errorMsg("argc<=0");
+ errorMsg("argc<=0\n");
*(nargv++) = *(oargv++);
/* Then copy the environment args */
free(line);
if (ferror(checkfile_stream)) {
- errorMsg("%s: read error", checkfile_name); /* */
+ errorMsg("%s: read error\n", checkfile_name); /* */
return FALSE;
}
}
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;
}
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 */
/* 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 */
(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);
#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;
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");
}
}
/* Copy the program name first */
if (oargc-- < 0)
- errorMsg("argc<=0");
+ errorMsg("argc<=0\n");
*(nargv++) = *(oargv++);
/* Then copy the environment args */
#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
#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. */
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;
}
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);
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;
}
/* 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;
}
/* 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;
}
}
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;
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);
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;
}
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;
}
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 {
free(line);
if (ferror(checkfile_stream)) {
- errorMsg("%s: read error", checkfile_name); /* */
+ errorMsg("%s: read error\n", checkfile_name); /* */
return FALSE;
}
}
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;
}
#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
#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. */
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;
}
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);
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;
}
/* 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;
}
/* 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;
}
}
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;
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);
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;
}
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;
}
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 {