char *dev = "/dev/hda "; /* open it */ fd = open(dev, O_RDONLY); if (fd == -1){ LOGD( "open %s failed %s\n ", dev, strerror(errno)); return (-1); }