Mail Archives: cygwin/2006/04/13/04:30:15
Eric, thanks for forwarding that to me...
I tried compiling that program, but got the error message:
C:\tmp>gcc -o stest samba.test.c
samba.test.c: In function `main':
samba.test.c:32: error: structure has no member named `d_ino'
C:\tmp>gcc --version
gcc (GCC) 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
Copyright (C) 2004 Free Software Foundation, Inc.
When I look at sys/dirent.h, instead of having a d_ino member, the dirent
structure's got an "__invalid_d_ino" member.... (?) with the note /* DO
NOT USE: No longer available since cygwin 1.5.19 */
Corrinna, if you can tell me how you'd like me to change your program so I
can compile it, I can run it on my older Samba share.
If you can cc your response to rowol at mysticind dot com, I will get it
faster.
Thanks,
Ross
=================================
>
> On Apr 12 11:48, Corinna Vinschen wrote:
>> On Apr 11 15:45, Stefan Vorkoetter wrote:
>> > And here's one from a Samba 2.2.3a share, repeated twice. Notice the
>> inodes
>> > are different each time.
>> >
>> > ~/sandboxes/main/internal/src [920] $ ls -i
>> > v:/internal_html/2006-04-10/*.jpg
>> > 3796172808 v:/internal_html/2006-04-10/17-50-56.jpg
>> > [...]
>>
>> I have a vague hope. It really looks like the inode numbers sent by
>> older Samba versions are 32 bit values, which would allow to distinguish
>> between old and new versions.
>>
>> Would you or anybody with an older Samba version mind to look into
>> more directories on the share and try to figure out if the inode number
>> is always smaller than UINT_MAX (4294967295)? I just need a feedback
>> of yes or no.
>
> Btw., I have hacked together a tiny testcase which lists a directory and
> evaluates the inode numbers using readdir and lstat. I would be
> interested to see the output for some smaller directories on shares
> using pre-3.0 Samba versions. This should also simplify testing in
> general.
>
>
> Corinna
>
>
> ======================== SNIP =====================
> #include <stdlib.h>
> #include <dirent.h>
> #include <unistd.h>
> #include <sys/stat.h>
> #include <stdio.h>
>
> int
> main(int argc, char **argv)
> {
> DIR *dirp;
> int fd;
> struct stat sb;
> struct dirent *d;
>
> if (argc > 1)
> {
> dirp = opendir(argv[1]);
> if (dirp)
> {
> while (d = readdir (dirp))
> {
> char buf[256];
> struct stat st;
>
> strcpy (buf, argv[1]);
> if (buf[strlen (buf) - 1] != '/')
> strcat (buf, "/");
> strcat (buf, d->d_name);
> lstat (buf, &st);
> printf ("%24s d: %18.18llu, st: %18.18llu\n",
> d->d_name, d->d_ino, st.st_ino);
> }
> closedir (dirp);
> }
> else
> printf("dirp = NULL\n");
> }
> return 0;
> }
> ======================== SNAP =====================
>
>
> --
> Corinna Vinschen Please, send mails regarding Cygwin to
> Cygwin Project Co-Leader cygwin AT cygwin DOT com
> Red Hat
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -