]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
tools/rmmod: consistently use ERR logging facility
authorEmil Velikov <emil.l.velikov@gmail.com>
Wed, 18 Sep 2024 15:49:08 +0000 (16:49 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Sat, 21 Sep 2024 15:53:12 +0000 (10:53 -0500)
Currently we'll print "Module foo is in use by:" to syslog, while the
modules themselves will end up in strerr.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/138
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
tools/rmmod.c

index b56416c28287f763486c001c3cbe75e88ca239f9..2d82c8604f92ca0ffd0bfeacead83771cbea83ff 100644 (file)
@@ -69,10 +69,10 @@ static int check_module_inuse(struct kmod_module *mod) {
 
                kmod_list_foreach(itr, holders) {
                        struct kmod_module *hm = kmod_module_get_module(itr);
-                       fprintf(stderr, " %s", kmod_module_get_name(hm));
+                       ERR(" %s", kmod_module_get_name(hm));
                        kmod_module_unref(hm);
                }
-               fputc('\n', stderr);
+               ERR("\n");
 
                kmod_module_unref_list(holders);
                return -EBUSY;