linux tap device discovery: redirect stderr of run to /dev/null

This commit is contained in:
Hannes Mehnert 2020-04-21 11:00:21 +02:00
parent 03c9948526
commit b7747a2547

View file

@ -140,7 +140,8 @@ let create_tap bridge =
let prefix = "vmmtap" in
let rec find_n x =
let nam = prefix ^ string_of_int x in
match Bos.OS.Cmd.run Bos.Cmd.(v "ip" % "link" % "show" % nam) with
let err = Bos.OS.Cmd.err_null in
match Bos.OS.Cmd.run ~err Bos.Cmd.(v "ip" % "link" % "show" % nam) with
| Error _ -> nam
| Ok _ -> find_n (succ x)
in