Ignore:
Timestamp:
May 14, 2009, 3:10:51 AM (15 years ago)
Author:
Bruno Cornec
Message:
  • Cleanups
  • Fix test on return value for open (-1 is the right value to test not 0)
  • Improve asprintf usage for mountlist
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/src/common/libmondo-devices.c

    r2202 r2205  
    992992#if linux
    993993        fileid = open(drive, O_RDONLY);
    994         if (fileid) {
     994        if (fileid != -1) {
    995995            if (ioctl(fileid, HDIO_GETGEO, &hdgeo) != -1) {
    996996                if (hdgeo.cylinders && hdgeo.heads && hdgeo.sectors) {
Note: See TracChangeset for help on using the changeset viewer.