diff options
author | Chris Ball <cjb@laptop.org> | 2009-02-15 15:30:09 -0500 |
---|---|---|
committer | Chris Ball <cjb@learn.laptop.org> | 2009-02-15 17:57:50 -0500 |
commit | 990ff710c6220cc3d1ba6b9e8fb972bd168b4472 (patch) | |
tree | 35372fc3ace2a4fc15200e8b4b5c8f872e4c9472 /src/geode_dcon.c | |
parent | e33dc807bf4504ba242cb19ce8024cdb32e10f4d (diff) |
Change OLPC detection heuristic to one that works on upstream kernels
We've been checking whether we have a DCON/are on an OLPC by looking for
files from the "olpc_dcon" kernel module. This module isn't upstream yet,
so this only works for the OLPC custom kernel. We might as well check for
an OLPC kernel module that *is* upstream, so that we can run on unmodified
distributions. This patch moves us to checking for "olpc-ac" instead.
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'src/geode_dcon.c')
-rw-r--r-- | src/geode_dcon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/geode_dcon.c b/src/geode_dcon.c index 13e5fd2..11df94b 100644 --- a/src/geode_dcon.c +++ b/src/geode_dcon.c @@ -45,7 +45,7 @@ dcon_present(void) static int _dval = -1; if (_dval == -1) - _dval = (access("/sys/devices/platform/dcon", F_OK) == 0); + _dval = (access("/sys/class/power_supply/olpc-ac", F_OK) == 0); return (Bool) _dval; } |