| To: | bugzilla-daemon@xxxxxxxxxxx |
|---|---|
| Subject: | Re: [Bug 245] New: Cannot get type of dirent |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Sun, 18 May 2003 17:01:21 +0100 |
| Cc: | xfs-master@xxxxxxxxxxx |
| In-reply-to: | <200305181509.h4IF9Haf011294@xxxxxxxxxxx>; from bugzilla-daemon@xxxxxxxxxxx on Sun, May 18, 2003 at 08:09:17AM -0700 |
| References: | <200305181509.h4IF9Haf011294@xxxxxxxxxxx> |
| Sender: | linux-xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.2.5.1i |
On Sun, May 18, 2003 at 08:09:17AM -0700, bugzilla-daemon@xxxxxxxxxxx wrote:
> 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..
Which is what all filesystems that don't support 4.4BSD-style dirents return.
d_type is an optional extension and XFS can't support it without changes in
the ondisk layout.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [Bug 245] Cannot get type of dirent, bugzilla-daemon |
|---|---|
| Next by Date: | Re: OT: spamcop.net Was: can you remove this guy? [Fwd: Zennith Bank Ltd], Tony Gale |
| Previous by Thread: | [Bug 245] New: Cannot get type of dirent, bugzilla-daemon |
| Next by Thread: | [Bug 245] Cannot get type of dirent, bugzilla-daemon |
| Indexes: | [Date] [Thread] [Top] [All Lists] |