From f4a1c832cfa18b558311b3b3d2b80175cedba422 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 14 Nov 2018 12:58:07 +0100 Subject: ubiformat: print messages after checking a block is not bad ubiformat prints its "flashing eraseblock x" and "formatting eraseblock x" messages before having checked that a block is actually good. This is misleading, so first check if a block is good and only if it is print a message. Signed-off-by: Sascha Hauer --- common/ubiformat.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'common') diff --git a/common/ubiformat.c b/common/ubiformat.c index 9fe1c7c501..0811525bd2 100644 --- a/common/ubiformat.c +++ b/common/ubiformat.c @@ -235,6 +235,9 @@ static int flash_image(struct ubiformat_args *args, struct mtd_info *mtd, int err, new_len; long long ec; + if (si->ec[eb] == EB_BAD) + continue; + if (!args->quiet && !args->verbose) { if (is_timeout(lastprint, 300 * MSECOND) || eb == eb_cnt - 1) { @@ -244,9 +247,6 @@ static int flash_image(struct ubiformat_args *args, struct mtd_info *mtd, } } - if (si->ec[eb] == EB_BAD) - continue; - if (args->verbose) { normsg_cont("eraseblock %d: erase", eb); } @@ -357,6 +357,9 @@ static int format(struct ubiformat_args *args, struct mtd_info *mtd, for (eb = start_eb; eb < eb_cnt; eb++) { long long ec; + if (si->ec[eb] == EB_BAD) + continue; + if (!args->quiet && !args->verbose) { if (is_timeout(lastprint, 300 * MSECOND) || eb == eb_cnt - 1) { @@ -366,9 +369,6 @@ static int format(struct ubiformat_args *args, struct mtd_info *mtd, } } - if (si->ec[eb] == EB_BAD) - continue; - if (args->override_ec) ec = args->ec; else if (si->ec[eb] <= EC_MAX) -- cgit v1.2.3 From 4bc94d9c8fa33188ed7ef71fd2d66fdd0781d531 Mon Sep 17 00:00:00 2001 From: Oleksij Rempel Date: Sat, 10 Nov 2018 08:59:51 +0100 Subject: ddr_spd: remove unused array Signed-off-by: Oleksij Rempel Signed-off-by: Sascha Hauer --- common/ddr_spd.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'common') diff --git a/common/ddr_spd.c b/common/ddr_spd.c index ec343ef5a5..7e2945ed96 100644 --- a/common/ddr_spd.c +++ b/common/ddr_spd.c @@ -166,7 +166,6 @@ static int ddr2_sdram_ctime(uint8_t byte) void ddr_spd_print(uint8_t *record) { int highestCAS = 0; - int cas[256]; int i, i_i, k, x, y; int ddrclk, tbits, pcclk; int trcd, trp, tras; @@ -199,7 +198,6 @@ void ddr_spd_print(uint8_t *record) for (i_i = 2; i_i < 7; i_i++) { if (s->cas_lat & 1 << i_i) { highestCAS = i_i; - cas[highestCAS]++; } } -- cgit v1.2.3 From 7dab73c677e0e50aed4813f0301241ffead666ce Mon Sep 17 00:00:00 2001 From: Roland Hieber Date: Tue, 20 Nov 2018 23:57:13 +0100 Subject: memory_display: add padding to simplify counting Trying to count single bytes (e.g. when adding an offset) in 'word' or 'byte' output mode is not easy in the current formatting, and (at least for me) has a high chance of miscounting or losing track of groups: barebox@boardname:/ md -b 0x149983f0+32 149983f0: 18 00 00 00 00 00 0d 86 00 00 00 00 00 00 00 00 ................ 14998400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ barebox@boardname:/ md -w 0x149983f0+32 149983f0: 0018 0000 0000 860d 0000 0000 0000 0000 ................ 14998400: 0000 0000 0000 0000 0000 0000 0000 0000 ................ With an additional space after 8 bytes, counting becomes easier: barebox@boardname:/ md -b 0x149983f0+32 149983f0: 18 00 00 00 00 00 0d 86 00 00 00 00 00 00 00 00 ................ 14998400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ barebox@boardname:/ md -w 0x149983f0+32 149983f0: 0018 0000 0000 860d 0000 0000 0000 0000 ................ 14998400: 0000 0000 0000 0000 0000 0000 0000 0000 ................ The 'quad' and 'long' output modes stay the same and are already much more easier to count because they build bigger and therefore less groups of bytes per line. Signed-off-by: Roland Hieber Signed-off-by: Sascha Hauer --- common/memory_display.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common') diff --git a/common/memory_display.c b/common/memory_display.c index ea91985e5d..30821cced4 100644 --- a/common/memory_display.c +++ b/common/memory_display.c @@ -58,6 +58,8 @@ int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int res = *((uint16_t *)addr); if (swab) res = __swab16(res); + if (i > 1 && i % 8 == 0) + count -= printf(" "); if (data_abort_unmask()) { res = 0xffff; count -= printf(" xxxx"); @@ -69,6 +71,8 @@ int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int uint8_t res; data_abort_mask(); res = *((uint8_t *)addr); + if (i > 1 && i % 8 == 0) + count -= printf(" "); if (data_abort_unmask()) { res = 0xff; count -= printf(" xx"); -- cgit v1.2.3 From fd6d00c56064cc770068726da16db8b1ea6bd217 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 27 Nov 2018 09:41:45 +0100 Subject: hush: Add pr_fmt define To give the hush debug output more context. Signed-off-by: Sascha Hauer --- common/hush.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common') diff --git a/common/hush.c b/common/hush.c index 792b61ac9a..386b3d7aef 100644 --- a/common/hush.c +++ b/common/hush.c @@ -106,6 +106,9 @@ * General Public License for more details. * */ + +#define pr_fmt(fmt) "hush: " fmt + #include /* malloc, free, realloc*/ #include #include /* isalpha, isdigit */ -- cgit v1.2.3 From ced41d800dfeb9c1d6ae7e2bc3aff3f9decd5cf0 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 27 Nov 2018 09:42:52 +0100 Subject: hush: Add extra define for hush debugging I've seen people increasing the compile loglevel to get more debugging output from barebox. This is generally a good idea, but the tons of hush debugging printed makes barebox quite unusable. This patch puts hush debugging behind an extra HUSH_DEBUG define so increasing the compile loglevel no longer results in hush debugging. Signed-off-by: Sascha Hauer --- common/hush.c | 55 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 25 deletions(-) (limited to 'common') diff --git a/common/hush.c b/common/hush.c index 386b3d7aef..d2f9cc70f5 100644 --- a/common/hush.c +++ b/common/hush.c @@ -266,8 +266,13 @@ struct in_str { #define b_getch(input) ((input)->get(input)) #define b_peek(input) ((input)->peek(input)) +#ifdef HUSH_DEBUG +#define hush_debug(fmt, arg...) debug(fmt, ##arg) +#else +#define hush_debug(fmt, arg...) +#endif -#define final_printf debug +#define final_printf hush_debug static void syntax(void) { @@ -352,7 +357,7 @@ static int b_check_space(o_string *o, int len) static int b_addchr(o_string *o, int ch) { - debug("%s: %c %d %p\n", __func__, ch, o->length, o); + hush_debug("%s: %c %d %p\n", __func__, ch, o->length, o); if (b_check_space(o, 1)) return B_NOSPAC; @@ -507,7 +512,7 @@ static int file_get(struct in_str *i) if (i->p && *i->p) ch = *i->p++; - debug("%s: got a %d\n", __func__, ch); + hush_debug("%s: got a %d\n", __func__, ch); return ch; } @@ -759,7 +764,7 @@ static int run_pipe_real(struct p_context *ctx, struct pipe *pi) child = &pi->progs[0]; if (child->group) { - debug("non-subshell grouping\n"); + hush_debug("non-subshell grouping\n"); rcode = run_list_real(ctx, child->group); return rcode; @@ -785,7 +790,7 @@ static int run_pipe_real(struct p_context *ctx, struct pipe *pi) char *name, *value; name = xstrdup(child->argv[i]); - debug("Local environment set: %s\n", name); + hush_debug("Local environment set: %s\n", name); value = strchr(name, '='); if (value) @@ -891,7 +896,7 @@ static int run_list_real(struct p_context *ctx, struct pipe *pi) } } rmode = pi->r_mode; - debug("rmode=%d if_code=%d next_if_code=%d skip_more=%d\n", + hush_debug("rmode=%d if_code=%d next_if_code=%d skip_more=%d\n", rmode, if_code, next_if_code, skip_more_in_this_rmode); if (rmode == skip_more_in_this_rmode && flag_skip) { if (pi->followup == PIPE_SEQ) @@ -962,7 +967,7 @@ static int run_list_real(struct p_context *ctx, struct pipe *pi) continue; rcode = run_pipe_real(ctx, pi); - debug("run_pipe_real returned %d\n",rcode); + hush_debug("run_pipe_real returned %d\n",rcode); if (rcode < -1) { last_return_code = -rcode - 2; @@ -1053,16 +1058,16 @@ static int xglob(o_string *dest, int flags, glob_t *pglob, int glob_needed) if (dest->nonnull) { /* bash man page calls this an "explicit" null */ gr = fake_glob(dest->data, flags, NULL, pglob); - debug("globhack returned %d\n",gr); + hush_debug("globhack returned %d\n",gr); } else { return 0; } } else if (glob_needed) { gr = do_glob(dest->data, flags, NULL, pglob); - debug("glob returned %d\n",gr); + hush_debug("glob returned %d\n",gr); } else { gr = fake_glob(dest->data, flags, NULL, pglob); - debug("globhack returned %d\n",gr); + hush_debug("globhack returned %d\n",gr); } if (gr != 0) { /* GLOB_ABORTED ? */ error_msg("glob(3) error %d",gr); @@ -1213,12 +1218,12 @@ static int reserved_word(o_string *dest, struct p_context *ctx) if (strcmp(dest->data, r->literal)) continue; - debug("found reserved word %s, code %d\n",r->literal,r->code); + hush_debug("found reserved word %s, code %d\n",r->literal,r->code); if (r->flag & FLAG_START) { struct p_context *new = xmalloc(sizeof(struct p_context)); - debug("push stack\n"); + hush_debug("push stack\n"); if (ctx->w == RES_IN || ctx->w == RES_FOR) { syntax(); @@ -1244,7 +1249,7 @@ static int reserved_word(o_string *dest, struct p_context *ctx) if (ctx->old_flag & FLAG_END) { struct p_context *old; - debug("pop stack\n"); + hush_debug("pop stack\n"); done_pipe(ctx,PIPE_SEQ); old = ctx->stack; @@ -1269,9 +1274,9 @@ static int done_word(o_string *dest, struct p_context *ctx) glob_t *glob_target; int gr, flags = GLOB_NOCHECK; - debug("%s: %s %p\n", __func__, dest->data, child); + hush_debug("%s: %s %p\n", __func__, dest->data, child); if (dest->length == 0 && !dest->nonnull) { - debug(" true null, ignored\n"); + hush_debug(" true null, ignored\n"); return 0; } if (child->group) { @@ -1279,7 +1284,7 @@ static int done_word(o_string *dest, struct p_context *ctx) return 1; /* syntax error, groups and arglists don't mix */ } if (!child->argv && (ctx->type & FLAG_PARSE_SEMICOLON)) { - debug("checking %s for reserved-ness\n",dest->data); + hush_debug("checking %s for reserved-ness\n",dest->data); if (reserved_word(dest,ctx)) return ctx->w == RES_SNTX; } @@ -1318,13 +1323,13 @@ static int done_command(struct p_context *ctx) struct child_prog *prog = ctx->child; if (prog && prog->group == NULL && prog->argv == NULL) { - debug("%s: skipping null command\n", __func__); + hush_debug("%s: skipping null command\n", __func__); return 0; } else if (prog) { pi->num_progs++; - debug("%s: num_progs incremented to %d\n", __func__, pi->num_progs); + hush_debug("%s: num_progs incremented to %d\n", __func__, pi->num_progs); } else { - debug("%s: initializing\n", __func__); + hush_debug("%s: initializing\n", __func__); } pi->progs = xrealloc(pi->progs, sizeof(*pi->progs) * (pi->num_progs + 1)); @@ -1347,7 +1352,7 @@ static int done_pipe(struct p_context *ctx, pipe_style type) done_command(ctx); /* implicit closure of previous command */ - debug("%s: type %d\n", __func__, type); + hush_debug("%s: type %d\n", __func__, type); ctx->pipe->followup = type; ctx->pipe->r_mode = ctx->w; @@ -1408,7 +1413,7 @@ static int handle_dollar(o_string *dest, struct p_context *ctx, struct in_str *i int advance = 0, i; int ch = input->peek(input); /* first character after the $ */ - debug("%s: ch=%c\n", __func__, ch); + hush_debug("%s: ch=%c\n", __func__, ch); if (isalpha(ch)) { b_addchr(dest, SPECIAL_VAR_SYMBOL); @@ -1493,7 +1498,7 @@ static int parse_stream(o_string *dest, struct p_context *ctx, * A single-quote triggers a bypass of the main loop until its mate is * found. When recursing, quote state is passed in via dest->quote. */ - debug("%s: end_trigger=%d\n", __func__, end_trigger); + hush_debug("%s: end_trigger=%d\n", __func__, end_trigger); while ((ch = b_getch(input)) != EOF) { m = map[ch]; @@ -1501,7 +1506,7 @@ static int parse_stream(o_string *dest, struct p_context *ctx, return 1; next = (ch == '\n') ? 0 : b_peek(input); - debug("%s: ch=%c (%d) m=%d quote=%d - %c\n", + hush_debug("%s: ch=%c (%d) m=%d quote=%d - %c\n", __func__, ch >= ' ' ? ch : '.', ch, m, dest->quote, ctx->stack == NULL ? '*' : '.'); @@ -1522,7 +1527,7 @@ static int parse_stream(o_string *dest, struct p_context *ctx, } if (ch == end_trigger && !dest->quote && ctx->w==RES_NONE) { - debug("%s: leaving (triggered)\n", __func__); + hush_debug("%s: leaving (triggered)\n", __func__); return 0; } @@ -1611,7 +1616,7 @@ static int parse_stream(o_string *dest, struct p_context *ctx, * that is, we were really supposed to get end_trigger, and never got * one before the EOF. Can't use the standard "syntax error" return code, * so that parse_stream_outer can distinguish the EOF and exit smoothly. */ - debug("%s: leaving (EOF)\n", __func__); + hush_debug("%s: leaving (EOF)\n", __func__); if (end_trigger != '\0') return -1; -- cgit v1.2.3 From ecff6da0ba5030db2d0322a8d343f1fdba74808d Mon Sep 17 00:00:00 2001 From: "Thorsten K. Scherer" Date: Tue, 27 Nov 2018 17:07:30 +0100 Subject: imd: fix missing error message imd -t just returns 'imd: error 61', if there is not tag for reference: common/imd.c:357 if (!imd) { ... Signed-off-by: Thorsten K. Scherer Signed-off-by: Sascha Hauer --- common/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') diff --git a/common/misc.c b/common/misc.c index 665f72be7e..66aba534fc 100644 --- a/common/misc.c +++ b/common/misc.c @@ -67,11 +67,11 @@ const char *strerror(int errnum) case ETIMEDOUT : str = "Connection timed out"; break; case EPROBE_DEFER : str = "Requested probe deferral"; break; case ELOOP : str = "Too many symbolic links encountered"; break; + case ENODATA : str = "No data available"; break; #if 0 /* These are probably not needed */ case ENOTBLK : str = "Block device required"; break; case EFBIG : str = "File too large"; break; case EBADSLT : str = "Invalid slot"; break; - case ENODATA : str = "No data available"; break; case ETIME : str = "Timer expired"; break; case ENONET : str = "Machine is not on the network"; break; case EADV : str = "Advertise error"; break; -- cgit v1.2.3 From e2e9582916f44319a861afe6338da518aa66fd36 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 30 Nov 2018 09:22:02 +0100 Subject: memory_display: Print whole line at once Instead of using many printf assemble a printed line first and print it at once. This has the purpose of being able to pick different output functions in the next step. Signed-off-by: Sascha Hauer --- common/memory_display.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'common') diff --git a/common/memory_display.c b/common/memory_display.c index 30821cced4..03d418b33b 100644 --- a/common/memory_display.c +++ b/common/memory_display.c @@ -8,6 +8,7 @@ int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int { unsigned long linebytes, i; unsigned char *cp; + unsigned char line[sizeof("00000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................")]; /* Print the lines. * @@ -20,9 +21,9 @@ int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int uint32_t *uip = (uint32_t *)linebuf; uint16_t *usp = (uint16_t *)linebuf; uint8_t *ucp = (uint8_t *)linebuf; - unsigned count = 52; + unsigned char *pos = line; - printf("%08llx:", offs); + pos += sprintf(pos, "%08llx:", offs); linebytes = (nbytes > DISP_LINE_LEN) ? DISP_LINE_LEN : nbytes; for (i = 0; i < linebytes; i += size) { @@ -34,9 +35,9 @@ int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int res = __swab64(res); if (data_abort_unmask()) { res = 0xffffffffffffffffULL; - count -= printf(" xxxxxxxxxxxxxxxx"); + pos += sprintf(pos, " xxxxxxxxxxxxxxxx"); } else { - count -= printf(" %016llx", res); + pos += sprintf(pos, " %016llx", res); } *ullp++ = res; } else if (size == 4) { @@ -47,9 +48,9 @@ int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int res = __swab32(res); if (data_abort_unmask()) { res = 0xffffffff; - count -= printf(" xxxxxxxx"); + pos += sprintf(pos, " xxxxxxxx"); } else { - count -= printf(" %08x", res); + pos += sprintf(pos, " %08x", res); } *uip++ = res; } else if (size == 2) { @@ -59,12 +60,12 @@ int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int if (swab) res = __swab16(res); if (i > 1 && i % 8 == 0) - count -= printf(" "); + pos += sprintf(pos, " "); if (data_abort_unmask()) { res = 0xffff; - count -= printf(" xxxx"); + pos += sprintf(pos, " xxxx"); } else { - count -= printf(" %04x", res); + pos += sprintf(pos, " %04x", res); } *usp++ = res; } else { @@ -72,12 +73,12 @@ int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int data_abort_mask(); res = *((uint8_t *)addr); if (i > 1 && i % 8 == 0) - count -= printf(" "); + pos += sprintf(pos, " "); if (data_abort_unmask()) { res = 0xff; - count -= printf(" xx"); + pos += sprintf(pos, " xx"); } else { - count -= printf(" %02x", res); + pos += sprintf(pos, " %02x", res); } *ucp++ = res; } @@ -85,19 +86,19 @@ int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int offs += size; } - while (count--) - putchar(' '); + pos += sprintf(pos, "%*s", 61 - (pos - line), ""); cp = linebuf; for (i = 0; i < linebytes; i++) { if ((*cp < 0x20) || (*cp > 0x7e)) - putchar('.'); + sprintf(pos, "."); else - printf("%c", *cp); + sprintf(pos, "%c", *cp); + pos++; cp++; } - putchar('\n'); + printf("%s\n", line); nbytes -= linebytes; if (ctrlc()) return -EINTR; -- cgit v1.2.3 From 67a6c4417abf1904e9b415c939a2f501cb4216e0 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 30 Nov 2018 09:57:30 +0100 Subject: Add pr_memory_display pr_memory_display is a memory_display variant that takes a MSG_* loglevel priority with which the hexdump is printed. Like the normal pr_* function this is optimized out when the priority is below the compile time priority. Signed-off-by: Sascha Hauer --- common/memory_display.c | 37 ++++++++++++++++++++++++++++++++----- include/printk.h | 8 ++++++++ 2 files changed, 40 insertions(+), 5 deletions(-) (limited to 'common') diff --git a/common/memory_display.c b/common/memory_display.c index 03d418b33b..cd0eadf88d 100644 --- a/common/memory_display.c +++ b/common/memory_display.c @@ -4,11 +4,21 @@ #define DISP_LINE_LEN 16 -int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int swab) + +int __pr_memory_display(int level, const void *addr, loff_t offs, unsigned nbytes, + int size, int swab, const char *fmt, ...) { unsigned long linebytes, i; unsigned char *cp; unsigned char line[sizeof("00000000: 0000 0000 0000 0000 0000 0000 0000 0000 ................")]; + struct va_format vaf; + int ret; + va_list args; + + va_start(args, fmt); + + vaf.fmt = fmt; + vaf.va = &args; /* Print the lines. * @@ -98,11 +108,28 @@ int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int cp++; } - printf("%s\n", line); + if (level >= MSG_EMERG) + pr_print(level, "%pV%s\n", &vaf, line); + else + printf("%s\n", line); + nbytes -= linebytes; - if (ctrlc()) - return -EINTR; + if (ctrlc()) { + ret = -EINTR; + goto out; + } + } while (nbytes > 0); - return 0; + va_end(args); + ret = 0; +out: + + return ret; } + +int memory_display(const void *addr, loff_t offs, unsigned nbytes, + int size, int swab) +{ + return pr_memory_display(-1, addr, offs, nbytes, size, swab); +} \ No newline at end of file diff --git a/include/printk.h b/include/printk.h index 4843dadd76..aaad07552e 100644 --- a/include/printk.h +++ b/include/printk.h @@ -105,6 +105,14 @@ static inline int pr_print(int level, const char *format, ...) int memory_display(const void *addr, loff_t offs, unsigned nbytes, int size, int swab); +int __pr_memory_display(int level, const void *addr, loff_t offs, unsigned nbytes, + int size, int swab, const char *format, ...); + +#define pr_memory_display(level, addr, offs, nbytes, size, swab) \ + ({ \ + (level) <= LOGLEVEL ? __pr_memory_display((level), (addr), \ + (offs), (nbytes), (size), (swab), pr_fmt("")) : 0; \ + }) #define DUMP_PREFIX_OFFSET 0 static inline void print_hex_dump(const char *level, const char *prefix_str, -- cgit v1.2.3 From 6400620c4c955e89ba500add85aa2a50d2094f05 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Tue, 4 Dec 2018 10:16:32 +0100 Subject: common/parser.c: s/%d/%zu/ when printing size_t Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer --- common/parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/parser.c b/common/parser.c index 6136dbf36f..397d268da1 100644 --- a/common/parser.c +++ b/common/parser.c @@ -70,7 +70,7 @@ static void process_macros (const char *input, char *output) /* 3 = waiting for ''' */ char __maybe_unused *output_start = output; - pr_debug("[PROCESS_MACROS] INPUT len %d: \"%s\"\n", strlen (input), + pr_debug("[PROCESS_MACROS] INPUT len %zu: \"%s\"\n", strlen (input), input); prev = '\0'; /* previous character */ @@ -158,7 +158,7 @@ static void process_macros (const char *input, char *output) if (outputcnt) *output = 0; - pr_debug("[PROCESS_MACROS] OUTPUT len %d: \"%s\"\n", + pr_debug("[PROCESS_MACROS] OUTPUT len %zu: \"%s\"\n", strlen (output_start), output_start); } -- cgit v1.2.3