Hi Richard

Bingo !

Szaka will sure answer he has found yesterday
the solution to your problem.

Regards

Jean-Pierre


> Message du 16/11/07 15:06
> De : "Richard Nyberg" <[EMAIL PROTECTED]>
> A : [EMAIL PROTECTED]
> Copie à : 
> Objet : [ntfs-3g-devel] write returns ENOENT
> 
> Hi ntfs-3f-devel,
> 
> I've encountered a problem with the following configuration:
> FreeBSD 6.3-PRERELEASE (i386 SMP on Athlon64 X2)
> fuse4bsd: version 0.3.9-pre1, FUSE ABI 7.8
> ntfs-3g 1.1004
> libublio-20070103
> 
> The program below reliably reproduces my problem. It creates
> a file called "WTF" in "/home/arkiv" where ntfs is mounted.
> It then closes the file and opens it again, seeks to a certain
> offset and tries to write 16kB. Interestingly the write operation
> fails with ENOENT. This program is of course stupid, but it's only
> written to exhibit the problem.
> 
> I'm not on the list so plese CC me on replies.
> 
> Regards,
>         -Richard
> 
> #include <err.h>
> #include <stdio.h>
> #include <fcntl.h>
> #include <unistd.h>
> 
> int
> main(void)
> {
>     off_t off;
>     char buf[1<<14];
>     char path[] = "/home/arkiv/WTF";
>     int fd;
>     fd = open(path, O_CREAT|O_RDWR, 0666);
>     if (fd < 0)
>         err(1, "creat");
>     if (close(fd) == -1)
>         err(1, "close");
>     fd = open(path, O_RDWR);
>     if (fd < 0)
>         err(1, "open");
>     off = lseek(fd, 0x1377800, SEEK_SET);
>     if (off < 0)
>         err(1, "lseek");
>     off = write(fd, buf, sizeof(buf)); // write fails with ENOENT
>     if (off < 0)
>         err(1, "write");
>     printf("Wrote %d of %d bytes.\n", (int)off, (int)sizeof(buf));
>     if (close(fd) == -1)
>         err(1, "close");
>     return 0;
> }
> 
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> ntfs-3g-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel
> 
> 



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to