-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 05/14/2014 11:25 AM, Martin Pitt wrote: > Already answered on IRC, but for the record: the private struct > _UDisksLinuxDriveAta in src/udiskslinuxdriveata.c seems quite > appropriate for this. In there you most probably won't even need > new internal API as all the SMART stuff shoudl be contained in > that object. > > Thanks for looking into this!
So I prepared a patch to address this by using g_udev_device_get_sysfs_attr() to read the io stats counters and store them in that struct and behave as if the disk is sleeping if there has been no change. The problem is that it seems to cache the value and not read it from sysfs again on subsequent calls, so it always thinks the disk has seen no IO. How can you make it stop caching and actually re-read the sysfs file? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCgAGBQJTgq0iAAoJEI5FoCIzSKrwz/0IAJ/QpjoiFKpJa8q1r5H1jXQK ILP7oJ9ord87VgW4+0bINtIHreBbcpir8Zu7n4KSsPSC4ySZwniB3gLkkvkHT3Yp ByKJ9jyXUPh44izjtFn3oRkPjJrPDXBQG7863VqyWFmQ9y7aOT7+CEAP8l7xHcmv rmgwY3+40e9u64ygPfVOEiSRx45Uw0a16t5oAzWNkKRfM/08bKf8/ULsvkxpxeAZ PsxiY8WzWpbeOThsRhWJFql+nClRL7/IMIdMa+7W1lOzZ8rg3WTlkfxJXprQjQdh lhGp0JSF2UtNhVLnFbiH5zomBNve2t5Ua11cnBgfP3eSEARlgVunHV8dC37kFzk= =xuq3 -----END PGP SIGNATURE----- _______________________________________________ devkit-devel mailing list devkit-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/devkit-devel