[lug] Linux syscall 19 lseek() produces unexpected output

Lori Reed lorireed at lightning-rose.com
Mon Oct 29 13:59:35 MDT 2007


I was about to hypothesize the following, then I found the documentation.

"creat() is equivalent to open() with flags equal to 
O_CREAT|O_WRONLY|O_TRUNC"

Your file is being truncated to a length of 0 (zero).

http://linux.die.net/man/2/open

L.

Carl Hamlin wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Lori Reed wrote:
>> Why assembly rather than C?
>> L.
> 
> I contract to do custom programming. Sometimes it's on older embedded
> platforms. My background is in X86 and it's what I do best. I'm trying
> to get a grasp on the Linux kernel syscall convention.
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> 
> iD8DBQFHJi3rhnZ133XoNC8RAmirAJ9CV3mvWuzPxUoSIRVXOfLU/o8JwwCfbY8r
> 5Sy6FYTQ8BECQTCObPyyRZo=
> =zfsX
> -----END PGP SIGNATURE-----
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
> 
> 
> 



More information about the LUG mailing list