From 6a73e13d75d31da2c3f1145d8487725f0073a4b8 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 2 Nov 2018 20:07:02 -0500 Subject: Convert more option vars to the new (single letter) coding style. --- toys/other/modinfo.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'toys/other/modinfo.c') diff --git a/toys/other/modinfo.c b/toys/other/modinfo.c index 1178d675..d631b3b3 100644 --- a/toys/other/modinfo.c +++ b/toys/other/modinfo.c @@ -20,17 +20,15 @@ config MODINFO #include "toys.h" GLOBALS( - char *field; - char *knam; - char *base; + char *F, *k, *b; long mod; ) static void output_field(char *field, char *value) { - if (!TT.field) xprintf("%s:%*c", field, 15-(int)strlen(field), ' '); - else if (strcmp(TT.field, field)) return; + if (!TT.F) xprintf("%s:%*c", field, 15-(int)strlen(field), ' '); + else if (strcmp(TT.F, field)) return; xprintf("%s", value); xputc((toys.optflags & FLAG_0) ? 0 : '\n'); } @@ -111,8 +109,8 @@ void modinfo_main(void) if (uname(&uts) < 0) perror_exit("bad uname"); if (snprintf(toybuf, sizeof(toybuf), "%s/lib/modules/%s", - (toys.optflags & FLAG_b) ? TT.base : "", - (toys.optflags & FLAG_k) ? TT.knam : uts.release) >= sizeof(toybuf)) + (toys.optflags & FLAG_b) ? TT.b : "", + (toys.optflags & FLAG_k) ? TT.k : uts.release) >= sizeof(toybuf)) perror_exit("basedir/kernrelease too long"); dirtree_read(toybuf, check_module); } -- cgit v1.2.3