Skip to content

Commit

Permalink
Merge pull request #39 from rossphilipson/lid_misery
Browse files Browse the repository at this point in the history
STABLE-6: [acpi] Lid state in XS should be 0/1 not closed/open.
  • Loading branch information
eric-ch authored Mar 17, 2017
2 parents 12893b2 + 12d578e commit f5450e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xcpmd/src/acpi-events.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,10 @@ static void handle_lid_event(int status) {

xcpmd_log(LOG_INFO, "Lid change event: %s\n", lid_status_string);

xenstore_write(lid_status == LID_CLOSED ? "closed" : "open", XS_LID_STATE_PATH);
xenstore_write("1", XS_LID_EVENT_PATH);
/* This is wrong - the QEMU code processing this does not know about "open"/"closed"
xenstore_write(lid_status == LID_CLOSED ? "closed" : "open", XS_LID_STATE_PATH);*/
xenstore_write_int(lid_status == LID_CLOSED ? 0 : 1, XS_LID_STATE_PATH);
xenstore_write_int(1, XS_LID_EVENT_PATH);
//notify_com_citrix_xenclient_xcpmd_lid_changed(xcdbus_conn, XCPMD_SERVICE, XCPMD_PATH);

e->value.i = lid_status;
Expand Down

0 comments on commit f5450e6

Please sign in to comment.