
khdapsmonitor
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
KHDAPSMonitor is a system tray monitor for laptops with the Hard Drive Active Proctection System.
This is my first KDE application, and also fills my need of a KDE HDAPS monitor. Written as the existing one here (khdapsmon) has several outstanding issues and is being re-written in python. I don't like python here is khdapsmonitor in C++, and it's here to stay.
Gentoo users simply need to emerge khdapsmonitor as I also maintain it in the Gentoo Portage tree.
Please send all comments to my homepage, http://bugs.gentoo.org or uberlord@gentoo.org as I don't check here much. Thanks!
centic
12 years ago
--- sysfs.cpp.orig 2008-11-26 10:49:27.000000000 +0100
+++ sysfs.cpp 2008-11-26 10:53:06.000000000 +0100
@@ -62,14 +62,22 @@
while (i < deviceList.count())
{
if(QFile("/sys/block/" + deviceList[i] + "/queue/protect").exists())
- i++;
+ i++;
+ // newer kernels provide a different interface
+ else if (QFile("/sys/block/" + deviceList[i] + "/device/unload_heads").exists())
+ i++;
else
deviceList.remove(deviceList.at(i));
}
+
return deviceList;
}
bool SysFS::queueProtected(QString device)
{
- return fileBool("/sys/block/" + device + "/queue/protect");
+ // newer kernels provide a different interface
+ if (QFile("/sys/block/" + device + "/device/unload_heads").exists())
+ return fileBool("/sys/block/" + device + "/device/unload_heads");
+ else
+ return fileBool("/sys/block/" + device + "/queue/protect");
}
Report
bitcrazy
12 years ago
because of some changes in sysfs in Kernel 2.6.27 khdapsmonitor stopped working. So I patched it; just substitute every appearance of '/queue/protect' with '/device/unload_heads' in src/sysfs.cpp.
Greetings
m0nk
Report
Lenz
14 years ago
first of all, I want to tell you how nice your app is. I really like it, works very well.
Since the default icons don't fit very well into the Nuvola icon set, I created a icon set based on it. You can find it here:
http://www.kde-look.org/content/show.php?content=44481
Have fun,
Lenz.
Report