NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/49697: Inconsistency between module and internal names of sdt and fbt



>Number:         49697
>Category:       kern
>Synopsis:       Inconsistency between module and internal names of sdt and fbt
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 26 09:55:00 +0000 2015
>Originator:     Ryota Ozaki
>Release:        current (7.99.5)
>Organization:
>Environment:
NetBSD kvm 7.99.5 NetBSD 7.99.5 (KVM) #122: Wed Feb 25 11:52:26 JST 2015  ozaki-r@(hidden)
>Description:
sdt.kmod and fbt.kmod were renamed to dtrace_sdt.kmod and dtrace_fbt.kmo respectively.
However, their names inside the kernel are still "sdt" and "fbt". For this reason, when we
load and unload the modules, we need to specify different names:

  modload dtrace_sdt
  modunload sdt

We should uniform them.

>How-To-Repeat:
# modload dtrace_sdt
# modunload dtrace_sdt
WARNING: module error: module `dtrace_sdt' not found
modunload: No such file or directory
# modunload sdt
# 
>Fix:
A fix for the issue is like this:

diff --git a/external/cddl/osnet/dev/sdt/sdt.c b/external/cddl/osnet/dev/sdt/sdt.c
index 3ebd4e5..f1620fb 100644
--- a/external/cddl/osnet/dev/sdt/sdt.c
+++ b/external/cddl/osnet/dev/sdt/sdt.c
@@ -450,7 +450,7 @@ sdt_unload(void)
 }
 
 static int
-sdt_modcmd(modcmd_t cmd, void *data)
+dtrace_sdt_modcmd(modcmd_t cmd, void *data)
 {
        int bmajor = -1, cmajor = -1;
 
@@ -473,4 +473,4 @@ sdt_open(dev_t dev, int flags, int mode, struct lwp *l)
        return (0);
 }
 
-MODULE(MODULE_CLASS_MISC, sdt, "dtrace");
+MODULE(MODULE_CLASS_MISC, dtrace_sdt, "dtrace");



Home | Main Index | Thread Index | Old Index