=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/file/magic-load.c,v retrieving revision 1.7 retrieving revision 1.8 diff -c -r1.7 -r1.8 *** src/usr.bin/file/magic-load.c 2015/08/11 21:42:16 1.7 --- src/usr.bin/file/magic-load.c 2015/08/11 21:52:14 1.8 *************** *** 1,4 **** ! /* $OpenBSD: magic-load.c,v 1.7 2015/08/11 21:42:16 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: magic-load.c,v 1.8 2015/08/11 21:52:14 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott *************** *** 262,268 **** break; case MAGIC_TYPE_BESTRING16: case MAGIC_TYPE_LESTRING16: ! magic_warn(ml, "unsupported type %s", ml->type_string); return (-1); } } --- 262,268 ---- break; case MAGIC_TYPE_BESTRING16: case MAGIC_TYPE_LESTRING16: ! magic_warn(ml, "unsupported type: %s", ml->type_string); return (-1); } } *************** *** 540,546 **** endptr = magic_strtoll(s, &ml->indirect_offset); if (endptr == NULL) { ! magic_warn(ml, "can't parse offset"); goto fail; } s = endptr; --- 540,546 ---- endptr = magic_strtoll(s, &ml->indirect_offset); if (endptr == NULL) { ! magic_warn(ml, "can't parse offset: %s", s); goto fail; } s = endptr; *************** *** 550,556 **** if (*s == '.') { s++; if (*s == '\0' || strchr("bslBSL", *s) == NULL) { ! magic_warn(ml, "unknown offset type"); goto fail; } ml->indirect_type = *s; --- 550,556 ---- if (*s == '.') { s++; if (*s == '\0' || strchr("bslBSL", *s) == NULL) { ! magic_warn(ml, "unknown offset type: %c", *s); goto fail; } ml->indirect_type = *s; *************** *** 560,566 **** } if (*s == '\0' || strchr("+-*", *s) == NULL) { ! magic_warn(ml, "unknown offset operator"); goto fail; } ml->indirect_operator = *s; --- 560,566 ---- } if (*s == '\0' || strchr("+-*", *s) == NULL) { ! magic_warn(ml, "unknown offset operator: %c", *s); goto fail; } ml->indirect_operator = *s; *************** *** 633,639 **** ml->type_operator = *cp; endptr = magic_strtoull(cp + 1, &ml->type_operand); if (endptr == NULL || *endptr != '\0') { ! magic_warn(ml, "can't parse operand"); goto fail; } *cp = '\0'; --- 633,639 ---- ml->type_operator = *cp; endptr = magic_strtoull(cp + 1, &ml->type_operand); if (endptr == NULL || *endptr != '\0') { ! magic_warn(ml, "can't parse operand: %s", cp + 1); goto fail; } *cp = '\0'; *************** *** 754,760 **** else if (strcmp(s, "default") == 0) ml->type = MAGIC_TYPE_DEFAULT; else { ! magic_warn(ml, "unknown type"); goto fail; } magic_mark_text(ml, 0); --- 754,760 ---- else if (strcmp(s, "default") == 0) ml->type = MAGIC_TYPE_DEFAULT; else { ! magic_warn(ml, "unknown type: %s", s); goto fail; } magic_mark_text(ml, 0); *************** *** 850,856 **** else endptr = magic_strtoll(s, &ml->test_signed); if (endptr == NULL || *endptr != '\0') { ! magic_warn(ml, "can't parse number"); goto fail; } --- 850,856 ---- else endptr = magic_strtoll(s, &ml->test_signed); if (endptr == NULL || *endptr != '\0') { ! magic_warn(ml, "can't parse number: %s", s); goto fail; }