Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110650308
D20458.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
D20458.diff
View Options
Index: head/sys/sys/bus.h
===================================================================
--- head/sys/sys/bus.h
+++ head/sys/sys/bus.h
@@ -810,16 +810,30 @@
static __inline type varp ## _get_ ## var(device_t dev) \
{ \
uintptr_t v; \
- BUS_READ_IVAR(device_get_parent(dev), dev, \
+ int e; \
+ e = BUS_READ_IVAR(device_get_parent(dev), dev, \
ivarp ## _IVAR_ ## ivar, &v); \
+ if (e != 0) { \
+ device_printf(dev, "failed to read ivar " \
+ __XSTRING(ivarp ## _IVAR_ ## ivar) " on bus %s, " \
+ "error = %d\n", \
+ device_get_nameunit(device_get_parent(dev)), e); \
+ } \
return ((type) v); \
} \
\
static __inline void varp ## _set_ ## var(device_t dev, type t) \
{ \
uintptr_t v = (uintptr_t) t; \
- BUS_WRITE_IVAR(device_get_parent(dev), dev, \
+ int e; \
+ e = BUS_WRITE_IVAR(device_get_parent(dev), dev, \
ivarp ## _IVAR_ ## ivar, v); \
+ if (e != 0) { \
+ device_printf(dev, "failed to write ivar " \
+ __XSTRING(ivarp ## _IVAR_ ## ivar) " on bus %s, " \
+ "error = %d\n", \
+ device_get_nameunit(device_get_parent(dev)), e); \
+ } \
}
/**
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 22, 11:10 AM (44 m, 7 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16770188
Default Alt Text
D20458.diff (1 KB)
Attached To
Mode
D20458: first step towards enforcing must-succeed semantics for bus accessors
Attached
Detach File
Event Timeline
Log In to Comment