ec: Create lockfile in /run/lock/power_override.

Create a lockfile at
/run/lock/power_override/battery_tool.lock rather than
/run/lock/battery_tool_powerd.lock so that powerd doesn't
need to special-case the file's path.

BUG=chromium:784651
BRANCH=None
TEST=None

Change-Id: I151cf26d635dc969d113e9d80c93177985a7ab2f
Signed-off-by: Daniel Erat <derat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/809921
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
Daniel Erat 2017-12-05 15:04:42 -08:00 committed by chrome-bot
parent e2a9ede352
commit 131afcd81a
1 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,8 @@
* Path to a file containing flashrom's PID. While present, powerd avoids
* suspending or shutting down the system.
*/
static const char lock_file_path[] = "/run/lock/battery_tool_powerd.lock";
static const char lock_file_path[] =
"/run/lock/power_override/battery_tool.lock";
int disable_power_management()
{