summaryrefslogtreecommitdiff
path: root/modutils/insmod.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-06-21 12:43:45 +0000
committerDenis Vlasenko2007-06-21 12:43:45 +0000
commit931de892cc1c07ba3ce728cce3e4a64fe59c8444 (patch)
treed9a2eb0a78971f0556ea28538e1705b203e107ad /modutils/insmod.c
parenta80b4a0fa74e7a19881790943d4f58de0411fa58 (diff)
downloadbusybox-931de892cc1c07ba3ce728cce3e4a64fe59c8444.zip
busybox-931de892cc1c07ba3ce728cce3e4a64fe59c8444.tar.gz
random shrinkage of statics, -60 bytes saved
Diffstat (limited to 'modutils/insmod.c')
-rw-r--r--modutils/insmod.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/modutils/insmod.c b/modutils/insmod.c
index b9d8a02..cba8dc4 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -3656,16 +3656,18 @@ static int obj_gpl_license(struct obj_file *f, const char **license)
static void set_tainted(struct obj_file *f, int fd, char *m_name,
int kernel_has_tainted, int taint, const char *text1, const char *text2)
{
+ static smallint printed_info;
+
char buf[80];
int oldval;
- static int first = 1;
+
if (fd < 0 && !kernel_has_tainted)
return; /* New modutils on old kernel */
printf("Warning: loading %s will taint the kernel: %s%s\n",
m_name, text1, text2);
- if (first) {
+ if (!printed_info) {
printf(" See %s for information about tainted modules\n", TAINT_URL);
- first = 0;
+ printed_info = 1;
}
if (fd >= 0) {
read(fd, buf, sizeof(buf)-1);