We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2738b79 commit aab72b5Copy full SHA for aab72b5
lib/network_utils.ml
@@ -459,10 +459,8 @@ module Linux_bonding = struct
459
let master_symlink = Sysfs.getpath slave "master" in
460
let master_path = Unix.readlink master_symlink in
461
let slaves_path = Filename.concat master_symlink "bonding/slaves" in
462
- let slaves = Sysfs.read_one_line slaves_path |> String.split ' ' in
463
- if List.mem slave slaves
464
- then Some (List.hd (List.rev (String.split '/' master_path)))
465
- else None
+ Unix.access slaves_path [ Unix.F_OK ];
+ Some (List.hd (List.rev (String.split '/' master_path)))
466
with _ -> None
467
end
468
0 commit comments