Merge ~sylvain-pineau/plainbox-provider-resource:fix-rtc-resource into plainbox-provider-resource:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 26faa6f2faeece20287a231f87781e436a9d5518
Merged at revision: fa2cb7c856510254453907c79026c23e82daa5e8
Proposed branch: ~sylvain-pineau/plainbox-provider-resource:fix-rtc-resource
Merge into: plainbox-provider-resource:master
Diff against target: 13 lines (+1/-1)
1 file modified
jobs/resource.pxu (+1/-1)
Reviewer Review Type Date Requested Status
Maciej Kisielewski Approve
Review via email: mp+362965@code.launchpad.net

Description of the change

Fix the resource job currently returning false positive info about RTC support.

Rather than checking sysfs, switch to /proc/driver/rtc.

Source: https://www.kernel.org/doc/Documentation/rtc.txt

Tested on amd64 and a pi2.

To post a comment you must log in.
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

Looks good and TIL :), +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/jobs/resource.pxu b/jobs/resource.pxu
2index 69ce130..bf34899 100644
3--- a/jobs/resource.pxu
4+++ b/jobs/resource.pxu
5@@ -283,7 +283,7 @@ id: rtc
6 estimated_duration: 0.02
7 plugin: resource
8 command:
9- if [ -e /sys/class/rtc ]
10+ if [ -e /proc/driver/rtc ]
11 then
12 echo "state: supported"
13 else

Subscribers

People subscribed via source and target branches