|
@@ -290,6 +290,41 @@ void intf_shutdown ( struct interface *intf, int rc ) {
|
290
|
290
|
intf_unplug ( &tmp );
|
291
|
291
|
}
|
292
|
292
|
|
|
293
|
+/**
|
|
294
|
+ * Shut down multiple object interfaces
|
|
295
|
+ *
|
|
296
|
+ * @v intfs Object interfaces
|
|
297
|
+ * @v rc Reason for close
|
|
298
|
+ */
|
|
299
|
+void intfs_vshutdown ( va_list intfs, int rc ) {
|
|
300
|
+ struct interface *intf;
|
|
301
|
+ va_list tmp;
|
|
302
|
+
|
|
303
|
+ /* Nullify all interfaces to avoid potential loops */
|
|
304
|
+ va_copy ( tmp, intfs );
|
|
305
|
+ while ( ( intf = va_arg ( tmp, struct interface * ) ) )
|
|
306
|
+ intf_nullify ( intf );
|
|
307
|
+ va_end ( tmp );
|
|
308
|
+
|
|
309
|
+ /* Shut down all interfaces */
|
|
310
|
+ while ( ( intf = va_arg ( intfs, struct interface * ) ) )
|
|
311
|
+ intf_shutdown ( intf, rc );
|
|
312
|
+}
|
|
313
|
+
|
|
314
|
+/**
|
|
315
|
+ * Shut down multiple object interfaces
|
|
316
|
+ *
|
|
317
|
+ * @v rc Reason for close
|
|
318
|
+ * @v ... Object interfaces
|
|
319
|
+ */
|
|
320
|
+void intfs_shutdown ( int rc, ... ) {
|
|
321
|
+ va_list intfs;
|
|
322
|
+
|
|
323
|
+ va_start ( intfs, rc );
|
|
324
|
+ intfs_vshutdown ( intfs, rc );
|
|
325
|
+ va_end ( intfs );
|
|
326
|
+}
|
|
327
|
+
|
293
|
328
|
/**
|
294
|
329
|
* Shut down and restart an object interface
|
295
|
330
|
*
|
|
@@ -316,6 +351,40 @@ void intf_restart ( struct interface *intf, int rc ) {
|
316
|
351
|
intf_reinit ( intf );
|
317
|
352
|
}
|
318
|
353
|
|
|
354
|
+/**
|
|
355
|
+ * Shut down and restart multiple object interfaces
|
|
356
|
+ *
|
|
357
|
+ * @v intfs Object interfaces
|
|
358
|
+ * @v rc Reason for close
|
|
359
|
+ */
|
|
360
|
+void intfs_vrestart ( va_list intfs, int rc ) {
|
|
361
|
+ struct interface *intf;
|
|
362
|
+ va_list tmp;
|
|
363
|
+
|
|
364
|
+ /* Shut down all interfaces */
|
|
365
|
+ va_copy ( tmp, intfs );
|
|
366
|
+ intfs_vshutdown ( tmp, rc );
|
|
367
|
+ va_end ( tmp );
|
|
368
|
+
|
|
369
|
+ /* Reinitialise all interfaces */
|
|
370
|
+ while ( ( intf = va_arg ( intfs, struct interface * ) ) )
|
|
371
|
+ intf_reinit ( intf );
|
|
372
|
+}
|
|
373
|
+
|
|
374
|
+/**
|
|
375
|
+ * Shut down and restart multiple object interfaces
|
|
376
|
+ *
|
|
377
|
+ * @v rc Reason for close
|
|
378
|
+ * @v ... Object interfaces
|
|
379
|
+ */
|
|
380
|
+void intfs_restart ( int rc, ... ) {
|
|
381
|
+ va_list intfs;
|
|
382
|
+
|
|
383
|
+ va_start ( intfs, rc );
|
|
384
|
+ intfs_vrestart ( intfs, rc );
|
|
385
|
+ va_end ( intfs );
|
|
386
|
+}
|
|
387
|
+
|
319
|
388
|
/**
|
320
|
389
|
* Poke an object interface
|
321
|
390
|
*
|