Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111020224
D49113.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
D49113.diff
View Options
diff --git a/sys/kern/device_if.m b/sys/kern/device_if.m
--- a/sys/kern/device_if.m
+++ b/sys/kern/device_if.m
@@ -69,7 +69,7 @@
static void * null_register(device_t dev)
{
- return NULL;
+ return NULL;
}
};
diff --git a/sys/tools/makeobjops.awk b/sys/tools/makeobjops.awk
--- a/sys/tools/makeobjops.awk
+++ b/sys/tools/makeobjops.awk
@@ -45,6 +45,7 @@
print " -p use the path component in the source file for destination dir";
print " -l set line width for output files [80]";
print " -d switch on debugging";
+ print " -s generate default function with correct signature when DEFAULT is missed";
exit 1;
}
@@ -291,9 +292,17 @@
firstvar = varnames[1];
- if (default_function == "")
+ if (default_function == "") {
default_function = "kobj_error_method";
+ if (opt_s) {
+ default_function=mname "_error_method";
+ # Generate correct default function for KCFI use
+ # kobj_error_method return ENXIO
+ printc("static " ret " " default_function "(" argument_list ")\n{\n " "return (" ret ") ENXIO;\n}\n");
+ }
+ }
+
# the method description
printh("/** @brief Unique descriptor for the " umname "() method */");
printh("extern struct kobjop_desc " mname "_desc;");
@@ -364,6 +373,7 @@
else if (o == "h") opt_h = 1;
else if (o == "p") opt_p = 1;
else if (o == "d") opt_d = 1;
+ else if (o == "s") opt_s = 1;
else if (o == "l") {
if (length(ARGV[i]) > j) {
opt_l = substr(ARGV[i], j + 1);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 27, 7:44 AM (19 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16849375
Default Alt Text
D49113.diff (1 KB)
Attached To
Mode
D49113: sys/tools: add -s options for KCFI use
Attached
Detach File
Event Timeline
Log In to Comment