|
@@ -151,29 +151,50 @@ static struct interface * intf_get_passthru ( struct interface *intf ) {
|
151
|
151
|
}
|
152
|
152
|
|
153
|
153
|
/**
|
154
|
|
- * Get object interface destination and operation method
|
|
154
|
+ * Get object interface destination and operation method (without pass-through)
|
155
|
155
|
*
|
156
|
156
|
* @v intf Object interface
|
157
|
157
|
* @v type Operation type
|
158
|
158
|
* @ret dest Destination interface
|
159
|
159
|
* @ret func Implementing method, or NULL
|
160
|
160
|
*/
|
161
|
|
-void * intf_get_dest_op_untyped ( struct interface *intf, void *type,
|
162
|
|
- struct interface **dest ) {
|
|
161
|
+void * intf_get_dest_op_no_passthru_untyped ( struct interface *intf,
|
|
162
|
+ void *type,
|
|
163
|
+ struct interface **dest ) {
|
163
|
164
|
struct interface_descriptor *desc;
|
164
|
165
|
struct interface_operation *op;
|
165
|
166
|
unsigned int i;
|
166
|
167
|
|
|
168
|
+ *dest = intf_get ( intf->dest );
|
|
169
|
+ desc = (*dest)->desc;
|
|
170
|
+ for ( i = desc->num_op, op = desc->op ; i ; i--, op++ ) {
|
|
171
|
+ if ( op->type == type )
|
|
172
|
+ return op->func;
|
|
173
|
+ }
|
|
174
|
+
|
|
175
|
+ return NULL;
|
|
176
|
+}
|
|
177
|
+
|
|
178
|
+/**
|
|
179
|
+ * Get object interface destination and operation method
|
|
180
|
+ *
|
|
181
|
+ * @v intf Object interface
|
|
182
|
+ * @v type Operation type
|
|
183
|
+ * @ret dest Destination interface
|
|
184
|
+ * @ret func Implementing method, or NULL
|
|
185
|
+ */
|
|
186
|
+void * intf_get_dest_op_untyped ( struct interface *intf, void *type,
|
|
187
|
+ struct interface **dest ) {
|
|
188
|
+ void *func;
|
|
189
|
+
|
167
|
190
|
while ( 1 ) {
|
|
191
|
+
|
168
|
192
|
/* Search for an implementing method provided by the
|
169
|
193
|
* current destination interface.
|
170
|
194
|
*/
|
171
|
|
- *dest = intf_get ( intf->dest );
|
172
|
|
- desc = (*dest)->desc;
|
173
|
|
- for ( i = desc->num_op, op = desc->op ; i ; i--, op++ ) {
|
174
|
|
- if ( op->type == type )
|
175
|
|
- return op->func;
|
176
|
|
- }
|
|
195
|
+ func = intf_get_dest_op_no_passthru_untyped( intf, type, dest );
|
|
196
|
+ if ( func )
|
|
197
|
+ return func;
|
177
|
198
|
|
178
|
199
|
/* Pass through to the underlying interface, if applicable */
|
179
|
200
|
if ( ! ( intf = intf_get_passthru ( *dest ) ) )
|