Bug#680418: examples

Nicolas Anonyme pathogenyx at gmail.com
Tue Nov 22 22:54:35 UTC 2016


I rewrote a custom demo soft for this (see attachments).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20161122/bb9e08f4/attachment-0001.html>
-------------- next part --------------
# When trying to write data into a file on local filesystem
# All data are writen onto the disk

./write_into /tmp/file.txt 3
[fnFileSave] Will try to write 3 byte(s) into [/tmp/file.txt]
[fnFileSave] Opening first stream pointer on file [/tmp/file.txt]
[fnFileSave] Wanted to write 3 byte(s), and 3 were written
[fnFileSave] All data were written, but MAYBE not flushed yet (len <4k)
[fnCheckFileWritable?] Opening 2nd stream pointer on file [/tmp/file.txt] in APPEND mode.
[fnCheckFileWritable?] Closing 2nd stream pointer on file [/tmp/file.txt].
[fnFileSave] The flushing succeeded
[fnFileSave] The closing succeeded
[fnFileSave] stat() says that [/tmp/file.txt] size is : 3 byte(s)

./write_into /tmp/file.txt 5000
[fnFileSave] Will try to write 5000 byte(s) into [/tmp/file.txt]
[fnFileSave] Opening first stream pointer on file [/tmp/file.txt]
[fnFileSave] Wanted to write 5000 byte(s), and 5000 were written
[fnFileSave] All data were written, but probably only partially flushed (len > 4k but not multiple of 4k)
[fnCheckFileWritable?] Opening 2nd stream pointer on file [/tmp/file.txt] in APPEND mode.
[fnCheckFileWritable?] Closing 2nd stream pointer on file [/tmp/file.txt].
[fnFileSave] The flushing succeeded
[fnFileSave] The closing succeeded
[fnFileSave] stat() says that [/tmp/file.txt] size is : 5000 byte(s)


# When using gvfs + sftp over the same location, only the data automatically
# flushed on write (each full block of 4kb) before the opening of the second
# file pointer succeed, the remainging data are lost

./write_into /run/user/1000/gvfs/sftp\:host\=localhost\,user\=nicolas/tmp/file.txt 3
[fnFileSave] Will try to write 3 byte(s) into [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt]
[fnFileSave] Opening first stream pointer on file [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt]
[fnFileSave] Wanted to write 3 byte(s), and 3 were written
[fnFileSave] All data were written, but MAYBE not flushed yet (len <4k)
[fnCheckFileWritable?] Opening 2nd stream pointer on file [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt] in APPEND mode.
[fnCheckFileWritable?] Closing 2nd stream pointer on file [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt].
[fnFileSave] The flushing failed, file is probably truncated
[fnFileSave] 	-> fflush: Operation not supported
[fnFileSave] The closing succeeded
[fnFileSave] stat() says that [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt] size is : 0 byte(s)

./write_into /run/user/1000/gvfs/sftp\:host\=localhost\,user\=nicolas/tmp/file.txt 4096
[fnFileSave] Will try to write 4096 byte(s) into [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt]
[fnFileSave] Opening first stream pointer on file [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt]
[fnFileSave] Wanted to write 4096 byte(s), and 4096 were written
[fnFileSave] All data were written, and probably flushed (len is multiple of 4k)
[fnCheckFileWritable?] Opening 2nd stream pointer on file [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt] in APPEND mode.
[fnCheckFileWritable?] Closing 2nd stream pointer on file [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt].
[fnFileSave] The flushing succeeded
[fnFileSave] The closing succeeded
[fnFileSave] stat() says that [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt] size is : 4096 byte(s)

./write_into /run/user/1000/gvfs/sftp\:host\=localhost\,user\=nicolas/tmp/file.txt 5000
[fnFileSave] Will try to write 5000 byte(s) into [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt]
[fnFileSave] Opening first stream pointer on file [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt]
[fnFileSave] Wanted to write 5000 byte(s), and 5000 were written
[fnFileSave] All data were written, but probably only partially flushed (len > 4k but not multiple of 4k)
[fnCheckFileWritable?] Opening 2nd stream pointer on file [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt] in APPEND mode.
[fnCheckFileWritable?] Closing 2nd stream pointer on file [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt].
[fnFileSave] The flushing failed, file is probably truncated
[fnFileSave] 	-> fflush: Operation not supported
[fnFileSave] The closing succeeded
[fnFileSave] stat() says that [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt] size is : 4096 byte(s)

./write_into /run/user/1000/gvfs/sftp\:host\=localhost\,user\=nicolas/tmp/file.txt 10000
[fnFileSave] Will try to write 10000 byte(s) into [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt]
[fnFileSave] Opening first stream pointer on file [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt]
[fnFileSave] Wanted to write 10000 byte(s), and 10000 were written
[fnFileSave] All data were written, but probably only partially flushed (len > 4k but not multiple of 4k)
[fnCheckFileWritable?] Opening 2nd stream pointer on file [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt] in APPEND mode.
[fnCheckFileWritable?] Closing 2nd stream pointer on file [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt].
[fnFileSave] The flushing failed, file is probably truncated
[fnFileSave] 	-> fflush: Operation not supported
[fnFileSave] The closing succeeded
[fnFileSave] stat() says that [/run/user/1000/gvfs/sftp:host=localhost,user=nicolas/tmp/file.txt] size is : 8192 byte(s)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: write_into.c
Type: text/x-csrc
Size: 3302 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20161122/bb9e08f4/attachment-0001.c>


More information about the pkg-gnome-maintainers mailing list