http://oss.sgi.com/bugzilla/show_bug.cgi?id=245
Summary: Cannot get type of dirent
Product: Linux XFS
Version: 1.2.x
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: Medium
Component: xfsprogs
AssignedTo: xfs-master@xxxxxxxxxxx
ReportedBy: super@xxxxxxxxxxxxxx
XFS cannot find dirent type so cannot get directory type.
code is as blow..
#include <stdio.h>
#include <dirent.h>
#include <unistd.h>
#include <stdlib.h>
int main(void)
{
DIR *dp;
struct dirent *ep;
char filename[BUFSIZ+1];
struct statfs buf;
dp = opendir("/");
if( dp != NULL ) {
while( ep = readdir(dp) ) {
sprintf(filename,"/%s", ep->d_name);
printf("%s type is %d\n", filename, ep->d_type);
}
(void) closedir(dp);
}
return 0;
}
that result is 0 that is, UNKOWN type..
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
|