[PATCH] kioslave/media/mediamanager misdetecting CD/DVD drives for harddisks
Thiago Macieira
thiago at kde.org
Tue Oct 25 11:40:43 BST 2005
Bernhard Rosenkraenzer wrote:
> + int device=open(devNode.latin1(),
> O_RDONLY|O_NONBLOCK);
QFile::encodeName(devNode)
Also note that the user may not have permissions to read from the device
node. In this case, it will fail.
>+ } else if(devname.startsWith("hd")) {
>+ // IDE device -- we can't tell if this is a
>+ // CD/DVD drive or harddisk by just looking at
> the + // filename
>+ QFile m(QString("/proc/ide/") + devname +
> "/media");
This will misdetect devfs systems like mine.
In both cases, it will just fall back to the old code, which is Ok, I
think.
One final thing: your C++ style doesn't match that of the file you're
modifying.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
5. Swa he géanhwearf tó timbran, and hwonne he cóm, lá! Unix cwæð "Hello,
World". Ǽfre ǽghwilc wæs glæd and seo woruld wæs fréo.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20051025/acd210f1/attachment.sig>
More information about the kde-core-devel
mailing list