X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=lib%2Fdummy.c;h=1354de6262c996088e8601674159a9599ad00a9c;hb=9d2e744579e5f3c4e0f65cf4ba5e8cfeab91fed5;hp=fe2fa621847a79d845604ea421471eee17afd164;hpb=fbac791aea04553de6efa02e78a9724d85cccb88;p=openvswitch diff --git a/lib/dummy.c b/lib/dummy.c index fe2fa621..1354de62 100644 --- a/lib/dummy.c +++ b/lib/dummy.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2011 Nicira Networks. + * Copyright (c) 2010, 2011, 2012 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,11 +22,16 @@ * testing. A client program might call this function if it is designed * specifically for testing or the user enables it on the command line. * + * If 'override' is false, then "dummy" dpif and netdev classes will be + * created. If 'override' is true, then in addition all existing dpif and + * netdev classes will be deleted and replaced by dummy classes. + * * There is no strong reason why dummy devices shouldn't always be enabled. */ void -dummy_enable(void) +dummy_enable(bool override) { - netdev_dummy_register(); - dpif_dummy_register(); + netdev_dummy_register(override); + dpif_dummy_register(override); timeval_dummy_register(); } +