Skip to content

Commit

Permalink
[CP-18781] Add device information in VIF.state (#288)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcello Seri <[email protected]>
  • Loading branch information
Marcello Seri authored and robhoes committed Sep 13, 2016
1 parent 467271d commit f66dd32
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/xenops_utils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ let unplugged_vif = {
plugged = false;
kthread_pid = 0;
media_present = false;
device = None;
}

let unplugged_vgpu = {
Expand Down
5 changes: 4 additions & 1 deletion xc/xenops_server_xen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2590,11 +2590,14 @@ module VIF = struct
from xenstore. The corrolary is that: only when the device
is finally deleted from xenstore, can we remove bridges or
switch configuration. *)
let domid = d.Device_common.frontend.Device_common.domid in
let device = "vif" ^ (string_of_int domid) ^ "." ^ (string_of_int vif.position) in
{
Vif.active = true;
plugged = true;
media_present = true;
kthread_pid = kthread_pid
kthread_pid = kthread_pid;
device = Some device
}
with
| (Does_not_exist(_,_))
Expand Down
5 changes: 4 additions & 1 deletion xl/xenops_server_xenlight.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1651,11 +1651,14 @@ module VIF = struct
from xenstore. The corrolary is that: only when the device
is finally deleted from xenstore, can we remove bridges or
switch configuration. *)
let domid = d.Device_common.frontend.Device_common.domid in
let device = "vif" ^ (string_of_int domid) ^ "." ^ (string_of_int vif.position) in
{
Vif.active = true;
plugged = true;
media_present = true;
kthread_pid = kthread_pid
kthread_pid = kthread_pid;
device = Some device
}
with
| (Does_not_exist(_,_))
Expand Down

0 comments on commit f66dd32

Please sign in to comment.