Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164292383
D58412.id182525.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D58412.id182525.diff
View Options
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -2447,9 +2447,28 @@
#include <exterr_cat_filenames.h>
};
+static const char *
+cat_to_file_prefix(int category)
+{
+ switch (EXTERR_CAT_SRC(category)) {
+ case EXTERR_CAT_SRC_KERN_STATIC:
+ return ("sys/");
+ default:
+ return ("");
+ }
+}
+
static const char *
cat_to_filename(int category)
{
+ switch (EXTERR_CAT_SRC(category)) {
+ case EXTERR_CAT_SRC_KERN_STATIC:
+ break;
+ case EXTERR_CAT_SRC_KERN_DYNAMIC:
+ return ("kern:dynamic");
+ default:
+ return ("unknown");
+ }
if (category < 0 || (unsigned)category >= nitems(cat_to_filenames) ||
cat_to_filenames[category] == NULL)
return ("unknown");
@@ -2464,9 +2483,10 @@
ue = &ke->ue;
asprintf(&msg, ue->msg, (uintmax_t)ue->p1, (uintmax_t)ue->p2);
- printf("{ errno %d sys/%s:%u \"%s\" (category %u p1 %#jx p2 %#jx) }\n",
- ue->error, cat_to_filename(ue->cat), ue->src_line, msg,
- ue->cat, (uintmax_t)ue->p1, (uintmax_t)ue->p2);
+ printf("{ errno %d %s%s:%u \"%s\" (category %u p1 %#jx p2 %#jx) }\n",
+ ue->error, cat_to_file_prefix(ue->cat), cat_to_filename(ue->cat),
+ ue->src_line, msg, ue->cat,
+ (uintmax_t)ue->p1, (uintmax_t)ue->p2);
free(msg);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 31, 11:32 AM (7 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35446904
Default Alt Text
D58412.id182525.diff (1 KB)
Attached To
Mode
D58412: kdump(1): minimally adapt to exterror category sources
Attached
Detach File
Event Timeline
Log In to Comment