Ticket #3077: mediamonitor-scd-fix.diff
File mediamonitor-scd-fix.diff, 1.2 KB (added by , 17 years ago) |
---|
-
mythtv/libs/libmyth/mediamonitor-unix.cpp
238 238 if (devpath.isSymLink()) 239 239 devname = devpath.readLink(); 240 240 241 // Given something like /dev/hda1, extract hda1 242 devname = devname.mid(5,5); 241 243 242 // Given something like /dev/sdb1, extract sdb243 devname = devname.mid(5,3);244 245 246 244 #ifdef linux 247 245 if (devname.startsWith("hd")) // IDE drive 248 246 { 247 devname = devname.left(3); // Given hda1, extract hda 248 249 249 QFile file("/proc/ide/" + devname + "/model"); 250 250 if (file.open(IO_ReadOnly)) 251 251 { … … 256 256 } 257 257 } 258 258 259 if (devname.startsWith("sd")) // SATA/USB/FireWire259 else if ((devname.startsWith("sd"))||(devname.startsWith("sr"))||(devname.startsWith("scd"))) // SATA/USB/FireWire 260 260 { 261 QString path = devname.prepend("/sys/block/"); 261 262 if (devname.startsWith("scd")) // scd0 doesn't appear in /sys/block, use sr0 instead 263 devname="sr" + devname.mid(3); 264 265 QString path = devname.prepend("/sys/block/"); 262 266 path.append("/device/"); 263 267 264 268 QFile file(path + "vendor");