diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-11-29 02:49:41 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-24 23:40:26 -0500 |
commit | 9f66fa2a4690a16da0dbaae2f44ddfc313802504 (patch) | |
tree | 0cad3298a317626fad0a2a7055ed8905b98e8eb0 /lib/kobject_uevent.c | |
parent | cfb36fff45e3997b8044c81045fc4869ba5f281a (diff) |
kobject: clean up debugging messages
The kobject debugging messages are a mess. This provides a unified
message that makes them actually useful.
The format for new kobject debug messages should be:
kobject: 'KOBJECT_NAME' (ADDRESS): FUNCTION_NAME: message.\n
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'lib/kobject_uevent.c')
-rw-r--r-- | lib/kobject_uevent.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c index 5886147252d0..51dc4d287add 100644 --- a/lib/kobject_uevent.c +++ b/lib/kobject_uevent.c | |||
@@ -98,7 +98,8 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, | |||
98 | int i = 0; | 98 | int i = 0; |
99 | int retval = 0; | 99 | int retval = 0; |
100 | 100 | ||
101 | pr_debug("%s\n", __FUNCTION__); | 101 | pr_debug("kobject: '%s' (%p): %s\n", |
102 | kobject_name(kobj), kobj, __FUNCTION__); | ||
102 | 103 | ||
103 | /* search the kset we belong to */ | 104 | /* search the kset we belong to */ |
104 | top_kobj = kobj; | 105 | top_kobj = kobj; |
@@ -106,7 +107,9 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, | |||
106 | top_kobj = top_kobj->parent; | 107 | top_kobj = top_kobj->parent; |
107 | 108 | ||
108 | if (!top_kobj->kset) { | 109 | if (!top_kobj->kset) { |
109 | pr_debug("kobject attempted to send uevent without kset!\n"); | 110 | pr_debug("kobject: '%s' (%p): %s: attempted to send uevent " |
111 | "without kset!\n", kobject_name(kobj), kobj, | ||
112 | __FUNCTION__); | ||
110 | return -EINVAL; | 113 | return -EINVAL; |
111 | } | 114 | } |
112 | 115 | ||
@@ -116,7 +119,9 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, | |||
116 | /* skip the event, if the filter returns zero. */ | 119 | /* skip the event, if the filter returns zero. */ |
117 | if (uevent_ops && uevent_ops->filter) | 120 | if (uevent_ops && uevent_ops->filter) |
118 | if (!uevent_ops->filter(kset, kobj)) { | 121 | if (!uevent_ops->filter(kset, kobj)) { |
119 | pr_debug("kobject filter function caused the event to drop!\n"); | 122 | pr_debug("kobject: '%s' (%p): %s: filter function " |
123 | "caused the event to drop!\n", | ||
124 | kobject_name(kobj), kobj, __FUNCTION__); | ||
120 | return 0; | 125 | return 0; |
121 | } | 126 | } |
122 | 127 | ||
@@ -126,7 +131,9 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, | |||
126 | else | 131 | else |
127 | subsystem = kobject_name(&kset->kobj); | 132 | subsystem = kobject_name(&kset->kobj); |
128 | if (!subsystem) { | 133 | if (!subsystem) { |
129 | pr_debug("unset subsystem caused the event to drop!\n"); | 134 | pr_debug("kobject: '%s' (%p): %s: unset subsystem caused the " |
135 | "event to drop!\n", kobject_name(kobj), kobj, | ||
136 | __FUNCTION__); | ||
130 | return 0; | 137 | return 0; |
131 | } | 138 | } |
132 | 139 | ||
@@ -166,8 +173,9 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, | |||
166 | if (uevent_ops && uevent_ops->uevent) { | 173 | if (uevent_ops && uevent_ops->uevent) { |
167 | retval = uevent_ops->uevent(kset, kobj, env); | 174 | retval = uevent_ops->uevent(kset, kobj, env); |
168 | if (retval) { | 175 | if (retval) { |
169 | pr_debug ("%s - uevent() returned %d\n", | 176 | pr_debug("kobject: '%s' (%p): %s: uevent() returned " |
170 | __FUNCTION__, retval); | 177 | "%d\n", kobject_name(kobj), kobj, |
178 | __FUNCTION__, retval); | ||
171 | goto exit; | 179 | goto exit; |
172 | } | 180 | } |
173 | } | 181 | } |