From: RJoco <rj...@ma...> - 2004-08-24 07:45:04
|
Hello, explaining detailed: ..... while((dir = readdir(fd1)) { debug("Searching for dir %s dir info: %X", dir->name, dir->d_type); /*Skip non-directories and '.' and '..' */ if(( dir->d_type!=DT_DIR && ..... .... when running have: Searching for dir sensors dir info: 0 Searching for dir lm87-i2c-1-2e dir info: 0 lm87-i2c-1-2e is a dir!!! So resolved in this mode: ....... while((dir = readdir(fd1)) { struct stat info; if (strcmp ( dir->s_name, "." )==0 || strcmp(dir->s_name,"..")==0) continue; strcpy(dname,base); strcat(dname,dir->d_name); lstat(dname,&info); if( !(info.st_mode&S_IFDIR) && !(info.st_mode&S_IFLNK)) continue; strcat(dname,"/"); ..... Best regards, Joco. > Hello joco > > >Somebody know why readdir not set DT_-s?, i'm usning uClibc. > >Added debug("%X",dir->d_type) and i have always 0 , maybe uclibc bug, or > >not implemented feature? > > > > > I'm the developper of the i2c_sensors plugins, but I really don't > understand. I think this is a bug in uClibc. > Can you elaborate a little more so that I can understand ? > > Bye ! > --- > Xavier VELLO (xav...@fr...) > |