aboutsummaryrefslogtreecommitdiff
path: root/toys/other/modinfo.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-11-02 20:07:02 -0500
committerRob Landley <rob@landley.net>2018-11-02 20:07:02 -0500
commit6a73e13d75d31da2c3f1145d8487725f0073a4b8 (patch)
tree17b5bb8b6b5e94b1c93818954cf322a39941a4be /toys/other/modinfo.c
parent49e1d8733ebcaf130623c68a2393a3c43702a524 (diff)
downloadtoybox-6a73e13d75d31da2c3f1145d8487725f0073a4b8.tar.gz
Convert more option vars to the new (single letter) coding style.
Diffstat (limited to 'toys/other/modinfo.c')
-rw-r--r--toys/other/modinfo.c12
1 files changed, 5 insertions, 7 deletions
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);
}