[AVFS] Empty output with virt_readdir()
"Pablo" <[email protected]> Sat, 30 Jul 2005 19:23:49 -0300
| Newsgroups | gmane.comp.file-systems.avfs.user |
|---|---|
| Message-ID | <[email protected]> |
Hello, this is my first post to the list.
I am train to run this little program but it dos not show me the name of the
directories in the archive "/tmp/avfs-0.9.6.tar.gz#"
If a run it, I get this:
--------- output ------------
sizeof(dirent) = 268
2 ->
2 ->
3 ->
----------End of Output ----
I dont know why ?!! Any ideas ??
Thanks in advance.
Pablo.
Note: I am using avfs 0.9.6 compiled with:
$
./configure --disable-preload --disable-avfscoda --enable-library --prefix=/
usr/local --enable-debug
$ make
# make install
--------------------- cut ----------------------------------
/* Created by Anjuta version 1.2.2 */
/* This file will not be overwritten */
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
// Para AVFS
#include <virtual.h>
int main()
{
DIR *dir = NULL;
struct dirent* dent = NULL;
printf("sizeof(dirent) = %d\n", sizeof(struct dirent));
dir = virt_opendir("/tmp/avfs-0.9.6.tar.gz#");
dent = virt_readdir(dir);
while( dent != NULL )
{
printf("%d ", (int)dent->d_ino);
printf("-> %s\n", dent->d_name); // THIS SHOW NOTHING
!!???
dent = (struct dirent*) virt_readdir(dir);
}
virt_closedir(dir);
return (0);
}
--------------------- EOF ---------------------------------
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click