打印调用API错误信息

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);
}

原文地址:https://www.cnblogs.com/simonshi/p/1701154.html