1 diff -Naur khdapsmonitor-0.1.orig/src/sysfs.cpp khdapsmonitor-0.1/src/sysfs.cpp
2 --- khdapsmonitor-0.1.orig/src/sysfs.cpp 2009-02-26 00:33:07.054620129 +0100
3 +++ khdapsmonitor-0.1/src/sysfs.cpp 2009-02-26 00:37:59.585252020 +0100
5 while (i < deviceList.count())
7 if(QFile("/sys/block/" + deviceList[i] + "/queue/protect").exists())
11 + else if (QFile("/sys/block/" + deviceList[i] + "/device/unload_heads").exists())
14 deviceList.remove(deviceList.at(i));
19 bool SysFS::queueProtected(QString device)
21 - return fileBool("/sys/block/" + device + "/queue/protect");
22 + if (QFile("/sys/block/" + device + "/device/unload_heads").exists())
23 + return fileBool("/sys/block/" + device + "/device/unload_heads");
25 + return fileBool("/sys/block/" + device + "/queue/protect");