Skip to contentSkip to conversation

ocaml/xc: correct shutdown_reason enumeration

PATCH Applied Simon Rowe 3 participants 3 messages Nov 5, 2015 – Nov 16, 2015 1 message not in the archive

lore
Share & tools
lore

Simon Rowe

author
#0 lore raw

PATCH 1/1 ocaml/xc: correct shutdown_reason enumeration

As defined by the Xen public header the fifth value of shutdown_reason is watchdog.

---
 tools/ocaml/libs/xc/xenctrl.ml  |    2 +-
 tools/ocaml/libs/xc/xenctrl.mli |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tools/ocaml/libs/xc/xenctrl.ml +1 -1
index b7ba8b7..beb95b8 100644
@@ -89,7 +89,7 @@ type compile_info =
 	compile_date : string;
 }
 
-type shutdown_reason = Poweroff | Reboot | Suspend | Crash | Halt
+type shutdown_reason = Poweroff | Reboot | Suspend | Crash | Watchdog
 
 type domain_create_flag = CDF_HVM | CDF_HAP
 
tools/ocaml/libs/xc/xenctrl.mli +1 -1
index bc4af56..8928a2e 100644
@@ -61,7 +61,7 @@ type compile_info = {
   compile_domain : string;
   compile_date : string;
 }
-type shutdown_reason = Poweroff | Reboot | Suspend | Crash | Halt
+type shutdown_reason = Poweroff | Reboot | Suspend | Crash | Watchdog
 
 type domain_create_flag = CDF_HVM | CDF_HAP
 
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Simon Rowe

As defined by the Xen public header the fifth value of shutdown_reason is watchdog.

I’ve always been a bit suspicious about having both “Poweroff” and “Halt” there. Perhaps there was some confusion between what could be written to ‘control/shutdown’ in xenstore and legal arguments to xc_domain_shutdown and SCHEDOP_shutdown?

Anyway you’re clearly right, Watchdog is the 5th value. So I think this is fine.

I happen to notice there’s a type with the same name in “xenopsd”[1], so I’ve cc:d xen-api@lists as a heads-up.

Thanks,
Dave

[1] https://github.com/xapi-project/xenopsd/blob/7818ab896d9969c5f5462a2f0d0ae62703b104b6/xc/domain.ml#L268

Quoted 31 lines

---

tools/ocaml/libs/xc/xenctrl.ml  |    2 +-
tools/ocaml/libs/xc/xenctrl.mli |    2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
tools/ocaml/libs/xc/xenctrl.ml +1 -1
index b7ba8b7..beb95b8 100644
@@ -89,7 +89,7 @@ type compile_info =
 	compile_date : string;
 }
 
-type shutdown_reason = Poweroff | Reboot | Suspend | Crash | Halt
+type shutdown_reason = Poweroff | Reboot | Suspend | Crash | Watchdog
 

type domain_create_flag = CDF_HVM | CDF_HAP

tools/ocaml/libs/xc/xenctrl.mli +1 -1
index bc4af56..8928a2e 100644
@@ -61,7 +61,7 @@ type compile_info = {
  compile_domain : string;
  compile_date : string;
 }
-type shutdown_reason = Poweroff | Reboot | Suspend | Crash | Halt
+type shutdown_reason = Poweroff | Reboot | Suspend | Crash | Watchdog
 
Quoted 5 lines

type domain_create_flag = CDF_HVM | CDF_HAP

Signature · 1 line
1.7.10.4

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Applied
#3 lore raw
In reply to a message not in the archive
Quoted 10 lines · David Scott
Quoted 4 lines · Simon Rowe

As defined by the Xen public header the fifth value of shutdown_reason is watchdog.

I’ve always been a bit suspicious about having both “Poweroff” and “Halt” there. Perhaps there was some confusion between what could be written to ‘control/shutdown’ in xenstore and legal arguments to xc_domain_shutdown and SCHEDOP_shutdown?

Quoted 4 lines

Anyway you’re clearly right, Watchdog is the 5th value. So I think this is fine.

Applied.

Quoted 43 lines

I happen to notice there’s a type with the same name in “xenopsd”[1], so I’ve cc:d xen-api@lists as a heads-up.

Thanks,
Dave

[1] https://github.com/xapi-project/xenopsd/blob/7818ab896d9969c5f5462a2f
0d0ae62703b104b6/xc/domain.ml#L268

Quoted 33 lines

---
tools/ocaml/libs/xc/xenctrl.ml  |    2 +-
tools/ocaml/libs/xc/xenctrl.mli |    2 +-

2 files changed, 2 insertions(+), 2 deletions(-)
tools/ocaml/libs/xc/xenctrl.ml +1 -1
index b7ba8b7..beb95b8 100644
@@ -89,7 +89,7 @@ type compile_info =
 	compile_date : string;
 }
 
-type shutdown_reason = Poweroff | Reboot | Suspend | Crash | Halt
+type shutdown_reason = Poweroff | Reboot | Suspend | Crash | Watchdog
 

type domain_create_flag = CDF_HVM | CDF_HAP

tools/ocaml/libs/xc/xenctrl.mli +1 -1
index bc4af56..8928a2e 100644
@@ -61,7 +61,7 @@ type compile_info = {
   compile_domain : string;
   compile_date : string;
 }
-type shutdown_reason = Poweroff | Reboot | Suspend | Crash | Halt
+type shutdown_reason = Poweroff | Reboot | Suspend | Crash | Watchdog
 
Quoted 2 lines
Quoted 2 lines

type domain_create_flag = CDF_HVM | CDF_HAP

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel