int rc;
unsigned int *mask = data;
int is_subsys = (mask == &libcfs_subsystem_debug) ? 1 : 0;
+ int is_printk = (mask == &libcfs_printk) ? 1 : 0;
rc = trace_allocate_string_buffer(&tmpstr, tmpstrlen);
if (rc < 0)
return rc;
-
+
if (!write) {
libcfs_debug_mask2str(tmpstr, tmpstrlen, *mask, is_subsys);
rc = strlen(tmpstr);
rc = trace_copyin_string(tmpstr, tmpstrlen, buffer, nob);
if (rc < 0)
return rc;
-
+
rc = libcfs_debug_str2mask(mask, tmpstr, is_subsys);
+ /* Always print LBUG/LASSERT to console, so keep this mask */
+ if (is_printk)
+ *mask |= D_EMERG;
}
trace_free_string_buffer(tmpstr, tmpstrlen);