Check that TAP devices aren't in use.
This is just a sanity check at the moment to avoid multiple VMMs using
the same TAP device. Looking at the list of tap devices in use will in
the future help with selecting available instance numbers / indexes to
run a device in.
Prior to this change, if the TAP device was already being used,
run_cvd would run without that tap device and print
"Unable to connect to ..tap interface: Device or resource busy".
This makes run_cvd fail outright if the tap device is already being used
by another process.
Test: Build and run when TAP device is in use (through vde_plug2tap)
Change-Id: If233470bbae6fdbcb2956f618f350ca2dec7f4ff
diff --git a/host/commands/run_cvd/runner_defs.h b/host/commands/run_cvd/runner_defs.h
index 1486b11..daf8868 100644
--- a/host/commands/run_cvd/runner_defs.h
+++ b/host/commands/run_cvd/runner_defs.h
@@ -44,6 +44,7 @@
kTombstoneServerError = 20,
kTombstoneDirCreationError = 21,
kInitRamFsConcatError = 22,
+ kTapDeviceInUse = 23,
};
// Actions supported by the launcher server