if (magic == ZIP_CDS_MAGIC) {
break;
} else if (magic != ZIP_FILEHEADER_MAGIC) {
- bb_error_msg_and_die("Invalid zip magic %08X", magic);
+ bb_error_msg_and_die("invalid zip magic %08X", magic);
}
/* Read the file header */
zip_header.formatted.filename_len = SWAP_LE32(zip_header.formatted.filename_len);
zip_header.formatted.extra_len = SWAP_LE32(zip_header.formatted.extra_len);
if ((zip_header.formatted.method != 0) && (zip_header.formatted.method != 8)) {
- bb_error_msg_and_die("Unsupported compression method %d", zip_header.formatted.method);
+ bb_error_msg_and_die("unsupported compression method %d", zip_header.formatted.method);
}
/* Read filename */
if ((verbosity == v_list) && !list_header_done){
printf(" Length Date Time Name\n"
- " -------- ---- ---- ----\n");
+ " -------- ---- ---- ----\n");
list_header_done = 1;
}
} else if (last_char_is(dst_fn, '/')) { /* Extract directory */
if (stat(dst_fn, &stat_buf) == -1) {
if (errno != ENOENT) {
- bb_perror_msg_and_die("Cannot stat '%s'",dst_fn);
+ bb_perror_msg_and_die("cannot stat '%s'",dst_fn);
}
if (verbosity == v_normal) {
printf(" creating: %s\n", dst_fn);
}
unzip_create_leading_dirs(dst_fn);
if (bb_make_directory(dst_fn, 0777, 0)) {
- bb_error_msg_and_die("Exiting");
+ bb_error_msg_and_die("exiting");
}
} else {
if (!S_ISDIR(stat_buf.st_mode)) {
_check_file:
if (stat(dst_fn, &stat_buf) == -1) { /* File does not exist */
if (errno != ENOENT) {
- bb_perror_msg_and_die("Cannot stat '%s'",dst_fn);
+ bb_perror_msg_and_die("cannot stat '%s'",dst_fn);
}
i = 'y';
} else {
printf("replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ", dst_fn);
if (!fgets(key_buf, 512, stdin)) {
- bb_perror_msg_and_die("Cannot read input");
+ bb_perror_msg_and_die("cannot read input");
}
i = key_buf[0];
}
/* Prompt for new name */
printf("new name: ");
if (!fgets(key_buf, 512, stdin)) {
- bb_perror_msg_and_die("Cannot read input");
+ bb_perror_msg_and_die("cannot read input");
}
free(dst_fn);
dst_fn = xstrdup(key_buf);
memset(buf, 0, sizeof(buf));
if (unit < 1 || unit > 32)
- bb_error_msg_and_die("Bad character size %d", unit);
+ bb_error_msg_and_die("bad character size %d", unit);
for (i = 0; i < fontsize; i++)
memcpy(buf + (32 * i), inbuf + (unit * i), unit);
if (ioctl(fd, PIO_UNIMAPCLR, &advice)) {
#ifdef ENOIOCTLCMD
if (errno == ENOIOCTLCMD) {
- bb_error_msg("It seems this kernel is older than 1.1.92");
- bb_error_msg_and_die("No Unicode mapping table loaded.");
+ bb_error_msg("it seems this kernel is older than 1.1.92");
+ bb_error_msg_and_die("no Unicode mapping table loaded");
} else
#endif
bb_perror_msg_and_die("PIO_UNIMAPCLR");
*/
inputlth = fread(inbuf, 1, sizeof(inbuf), stdin);
if (ferror(stdin))
- bb_perror_msg_and_die("Error reading input font");
+ bb_perror_msg_and_die("error reading input font");
/* use malloc/realloc in case of giant files;
maybe these do not occur: 16kB for the font,
and 16kB for the map leaves 32 unicode values
for each font position */
if (!feof(stdin))
- bb_perror_msg_and_die("Font too large");
+ bb_perror_msg_and_die("font too large");
/* test for psf first */
{
goto no_psf;
if (psfhdr.mode > PSF_MAXMODE)
- bb_error_msg_and_die("Unsupported psf file mode");
+ bb_error_msg_and_die("unsupported psf file mode");
fontsize = ((psfhdr.mode & PSF_MODE512) ? 512 : 256);
#if !defined( PIO_FONTX ) || defined( __sparc__ )
if (fontsize != 256)
- bb_error_msg_and_die("Only fontsize 256 supported");
+ bb_error_msg_and_die("only fontsize 256 supported");
#endif
hastable = (psfhdr.mode & PSF_MODEHASTAB);
unit = psfhdr.charsize;
head = head0 + fontsize * unit;
if (head > inputlth || (!hastable && head != inputlth))
- bb_error_msg_and_die("Input file: bad length");
+ bb_error_msg_and_die("input file: bad length");
do_loadfont(fd, inbuf + head0, unit, fontsize);
if (hastable)
do_loadtable(fd, inbuf + head, inputlth - head, fontsize);
} else {
/* bare font */
if (inputlth & 0377)
- bb_error_msg_and_die("Bad input file size");
+ bb_error_msg_and_die("bad input file size");
offset = 0;
unit = inputlth / 256;
}
/* Perform actual comparison */
switch(flags&7) {
default:
- bb_error_msg_and_die("Unknown sort type.");
+ bb_error_msg_and_die("unknown sort type");
break;
/* Ascii sort */
case 0:
switch(*line) {
#ifdef CONFIG_FEATURE_SORT_BIG
case 'o':
- if(outfile) bb_error_msg_and_die("Too many -o.");
+ if(outfile) bb_error_msg_and_die("too many -o");
outfile=xfopen(optarg,"w");
break;
case 't':
if(key_separator || optarg[1])
- bb_error_msg_and_die("Too many -t.");
+ bb_error_msg_and_die("too many -t");
key_separator=*optarg;
break;
/* parse sort key */
temp2=strchr(optlist,*temp);
flag=(1<<(temp2-optlist));
if(!temp2 || (flag>FLAG_M && flag<FLAG_b))
- bb_error_msg_and_die("Unknown key option.");
+ bb_error_msg_and_die("unknown key option");
/* b after , means strip _trailing_ space */
if(i && flag==FLAG_b) flag=FLAG_bb;
key->flags|=flag;
char *line_ptr = line;
if (strcmp(line, "end") == 0) {
- return(EXIT_SUCCESS);
+ return EXIT_SUCCESS;
}
length = ((*line_ptr - 0x20) & 0x3f)* 4 / 3;
continue;
}
if (length > 60) {
- bb_error_msg_and_die("Line too long");
+ bb_error_msg_and_die("line too long");
}
line_ptr++;
/* Tolerate an overly long line to accomodate a possible exta '`' */
if (strlen(line_ptr) < (size_t)length) {
- bb_error_msg_and_die("Short file");
+ bb_error_msg_and_die("short file");
}
while (length > 0) {
}
free(line);
}
- bb_error_msg_and_die("Short file");
+ bb_error_msg_and_die("short file");
}
static int read_base64(FILE *src_stream, FILE *dst_stream)
do {
ch = fgetc(src_stream);
if (ch == EOF) {
- bb_error_msg_and_die("Short file");
+ bb_error_msg_and_die("short file");
}
} while ((table_ptr = strchr(base64_table, ch)) == NULL);
else if (*table_ptr == '\n') {
/* Check for terminating line */
if (term_count == 5) {
- return(EXIT_SUCCESS);
+ return EXIT_SUCCESS;
}
term_count = 1;
continue;
free(line);
ret = decode_fn_ptr(src_stream, dst_stream);
fclose_if_not_stdin(src_stream);
- return(ret);
+ return ret;
}
- bb_error_msg_and_die("No `begin' line");
+ bb_error_msg_and_die("no 'begin' line");
}
fileName = strdup(argv[1]);
if (fileName == NULL) {
- bb_error_msg("No memory");
+ bb_error_msg("no memory");
termEdit();
return EXIT_SUCCESS;
}
if (*endbuf != '\n')
{
- bb_error_msg("Command line too long");
+ bb_error_msg("command line too long");
do
{
case 'f':
if (*cp && !isblank(*cp))
{
- bb_error_msg("Bad file command");
+ bb_error_msg("bad file command");
break;
}
if (newname == NULL)
{
- bb_error_msg("No memory for file name");
+ bb_error_msg("no memory for file name");
break;
}
if ((*cp < 'a') || (*cp > 'a') || cp[1])
{
- bb_error_msg("Bad mark name");
+ bb_error_msg("bad mark name");
break;
}
if (have1 || *cp)
{
- bb_error_msg("Bad quit command");
+ bb_error_msg("bad quit command");
break;
}
case 'r':
if (*cp && !isblank(*cp))
{
- bb_error_msg("Bad read command");
+ bb_error_msg("bad read command");
break;
}
if (*cp == '\0')
{
- bb_error_msg("No file name");
+ bb_error_msg("no file name");
break;
}
case 'w':
if (*cp && !isblank(*cp))
{
- bb_error_msg("Bad write command");
+ bb_error_msg("bad write command");
break;
}
if (cp == NULL)
{
- bb_error_msg("No file name specified");
+ bb_error_msg("no file name specified");
break;
}
case '.':
if (have1)
{
- bb_error_msg("No arguments allowed");
+ bb_error_msg("no arguments allowed");
break;
}
break;
default:
- bb_error_msg("Unimplemented command");
+ bb_error_msg("unimplemented command");
break;
}
}
if ((num1 < 1) || (num2 > lastNum) || (num1 > num2))
{
- bb_error_msg("Bad line range for substitute");
+ bb_error_msg("bad line range for substitute");
return;
}
if (isblank(*cp) || (*cp == '\0'))
{
- bb_error_msg("Bad delimiter for substitute");
+ bb_error_msg("bad delimiter for substitute");
return;
}
if (cp == NULL)
{
- bb_error_msg("Missing 2nd delimiter for substitute");
+ bb_error_msg("missing 2nd delimiter for substitute");
return;
}
break;
default:
- bb_error_msg("Unknown option for substitute");
+ bb_error_msg("unknown option for substitute");
return;
}
{
if (searchString[0] == '\0')
{
- bb_error_msg("No previous search string");
+ bb_error_msg("no previous search string");
return;
}
if (nlp == NULL)
{
- bb_error_msg("Cannot get memory for line");
+ bb_error_msg("cannot get memory for line");
return;
}
}
if (!didSub)
- bb_error_msg("No substitutions found for \"%s\"", oldStr);
+ bb_error_msg("no substitutions found for \"%s\"", oldStr);
}
if (buf[len - 1] != '\n')
{
- bb_error_msg("Line too long");
+ bb_error_msg("line too long");
do
{
if ((*cp < 'a') || (*cp > 'z'))
{
- bb_error_msg("Bad mark name");
+ bb_error_msg("bad mark name");
return FALSE;
}
if (bufBase == NULL)
{
- bb_error_msg("No memory for buffer");
+ bb_error_msg("no memory for buffer");
return FALSE;
}
if ((num < 1) || (num > lastNum + 1))
{
- bb_error_msg("Bad line for read");
+ bb_error_msg("bad line for read");
return FALSE;
}
if (cp == NULL)
{
- bb_error_msg("No memory for buffer");
+ bb_error_msg("no memory for buffer");
close(fd);
return FALSE;
if ((num1 < 1) || (num2 > lastNum) || (num1 > num2))
{
- bb_error_msg("Bad line range for write");
+ bb_error_msg("bad line range for write");
return FALSE;
}
if ((num1 < 1) || (num2 > lastNum) || (num1 > num2))
{
- bb_error_msg("Bad line range for print");
+ bb_error_msg("bad line range for print");
return FALSE;
}
if ((num < 1) || (num > lastNum + 1))
{
- bb_error_msg("Inserting at bad line number");
+ bb_error_msg("inserting at bad line number");
return FALSE;
}
if (newLp == NULL)
{
- bb_error_msg("Failed to allocate memory for line");
+ bb_error_msg("failed to allocate memory for line");
return FALSE;
}
if ((num1 < 1) || (num2 > lastNum) || (num1 > num2))
{
- bb_error_msg("Bad line numbers for delete");
+ bb_error_msg("bad line numbers for delete");
return FALSE;
}
if ((num1 < 1) || (num2 > lastNum) || (num1 > num2))
{
- bb_error_msg("Bad line numbers for search");
+ bb_error_msg("bad line numbers for search");
return 0;
}
{
if (searchString[0] == '\0')
{
- bb_error_msg("No previous search string");
+ bb_error_msg("no previous search string");
return 0;
}
lp = lp->next;
}
- bb_error_msg("Cannot find string \"%s\"", str);
+ bb_error_msg("cannot find string \"%s\"", str);
return 0;
}
if ((num < 1) || (num > lastNum))
{
- bb_error_msg("Line number %d does not exist", num);
+ bb_error_msg("line number %d does not exist", num);
return NULL;
}
if (sed_cmd->sub_match == NULL) {
current_regex = bbg.previous_regex_ptr;
if (!current_regex)
- bb_error_msg_and_die("No previous regexp.");
+ bb_error_msg_and_die("no previous regexp");
} else
bbg.previous_regex_ptr = current_regex = sed_cmd->sub_match;
}
/* Unlike the original, output the remainder of the format string. */
if (!*byte_count_str) {
- bb_error_msg_and_die("bad byte count for conversion character %s.", p1);
+ bb_error_msg_and_die("bad byte count for conversion character %s", p1);
}
pr->bcnt = *byte_count_str;
} else if (*p1 == 'l') {
} else if (sokay == USEPREC) {
pr->bcnt = prec;
} else { /* NOTOKAY */
- bb_error_msg_and_die("%%s requires a precision or a byte count.");
+ bb_error_msg_and_die("%%s requires a precision or a byte count");
}
} else if (*p1 == '_') {
++p2;
}
} else {
DO_BAD_CONV_CHAR:
- bb_error_msg_and_die("bad conversion character %%%s.", p1);
+ bb_error_msg_and_die("bad conversion character %%%s", p1);
}
/*
/* only one conversion character if byte count */
if (!(pr->flags & F_ADDRESS) && fu->bcnt && nconv++) {
- bb_error_msg_and_die("byte count with multiple conversion characters.");
+ bb_error_msg_and_die("byte count with multiple conversion characters");
}
}
/*
}
if (code->name == 0) {
- bb_error_msg("unrecognized opcode %s.", argv[1]);
+ bb_error_msg("unrecognized opcode %s", argv[1]);
return EXIT_FAILURE;
}
}
if( !dt ) {
- bb_error_msg ("module %s not found.", mod);
+ bb_error_msg ("module %s not found", mod);
return;
}
dt = adt;
}
else {
- bb_error_msg ("module %s not found.", mod);
+ bb_error_msg ("module %s not found", mod);
return;
}
}
rth->fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
if (rth->fd < 0) {
- bb_perror_msg("Cannot open netlink socket");
+ bb_perror_msg("cannot open netlink socket");
return -1;
}
rth->local.nl_groups = subscriptions;
if (bind(rth->fd, (struct sockaddr*)&rth->local, sizeof(rth->local)) < 0) {
- bb_perror_msg("Cannot bind netlink socket");
+ bb_perror_msg("cannot bind netlink socket");
return -1;
}
addr_len = sizeof(rth->local);
if (getsockname(rth->fd, (struct sockaddr*)&rth->local, &addr_len) < 0) {
- bb_perror_msg("Cannot getsockname");
+ bb_perror_msg("cannot getsockname");
return -1;
}
if (addr_len != sizeof(rth->local)) {
- bb_error_msg("Wrong address length %d", addr_len);
+ bb_error_msg("wrong address length %d", addr_len);
return -1;
}
if (rth->local.nl_family != AF_NETLINK) {
- bb_error_msg("Wrong address family %d", rth->local.nl_family);
+ bb_error_msg("wrong address family %d", rth->local.nl_family);
return -1;
}
rth->seq = time(NULL);
h = NLMSG_NEXT(h, status);
}
if (msg.msg_flags & MSG_TRUNC) {
- bb_error_msg("Message truncated");
+ bb_error_msg("message truncated");
continue;
}
if (status) {
- bb_error_msg_and_die("!!!Remnant of size %d", status);
+ bb_error_msg_and_die("remnant of size %d!", status);
}
}
}
status = sendmsg(rtnl->fd, &msg, 0);
if (status < 0) {
- bb_perror_msg("Cannot talk to rtnetlink");
+ bb_perror_msg("cannot talk to rtnetlink");
return -1;
}
if (l<0 || len>status) {
if (msg.msg_flags & MSG_TRUNC) {
- bb_error_msg("Truncated message");
+ bb_error_msg("truncated message");
return -1;
}
- bb_error_msg_and_die("!!!malformed message: len=%d", len);
+ bb_error_msg_and_die("malformed message: len=%d!", len);
}
if (nladdr.nl_pid != peer ||
return 0;
}
- bb_error_msg("Unexpected reply!!!");
+ bb_error_msg("unexpected reply!");
status -= NLMSG_ALIGN(len);
h = (struct nlmsghdr*)((char*)h + NLMSG_ALIGN(len));
}
if (msg.msg_flags & MSG_TRUNC) {
- bb_error_msg("Message truncated");
+ bb_error_msg("message truncated");
continue;
}
if (status) {
- bb_error_msg_and_die("!!!Remnant of size %d", status);
+ bb_error_msg_and_die("remnant of size %d!", status);
}
}
}
rta = RTA_NEXT(rta,len);
}
if (len) {
- bb_error_msg("!!!Deficit %d, rta_len=%d", len, rta->rta_len);
+ bb_error_msg("deficit %d, rta_len=%d!", len, rta->rta_len);
}
return 0;
}
if (strchr(arg, '.')) {
inet_prefix pfx;
if (get_addr_1(&pfx, arg, AF_INET)) {
- bb_error_msg("\"%s\" is invalid lladdr.", arg);
+ bb_error_msg("\"%s\" is invalid lladdr", arg);
return -1;
}
if (len < 4) {
cp++;
}
if (sscanf(arg, "%x", &temp) != 1) {
- bb_error_msg("\"%s\" is invalid lladdr.", arg);
+ bb_error_msg("\"%s\" is invalid lladdr", arg);
return -1;
}
if (temp < 0 || temp > 255) {
- bb_error_msg("\"%s\" is invalid lladdr.", arg);
+ bb_error_msg("\"%s\" is invalid lladdr", arg);
return -1;
}
lladdr[i] = temp;
line_ptr = line_buffer;
if (!fgets(line_buffer, LINE_LENGTH, stdin)) {
/* error or eof */
- bb_error_msg_and_die("\ngot EOF - exiting...");
+ bb_error_msg_and_die("\ngot EOF, exiting");
}
while (*line_ptr && !isgraph(*line_ptr))
line_ptr++;