Re: proc file system - write function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 23, 2001 at 08:40:11AM +0200, Tinga Shilo wrote:
> My observations are as follows:
> - The return code of foo_write affects the original "write" that wrote to
> the file
> - If foo_write returns a positive X, the "write" returns with X, and errno
> is 0
> - If foo_write returns a negative X, the "write" returns -1, and errno is
> set to -X (i.e. a positive value)
> - If foo_write returns a zero... I am not sure.

returnvalue < 0:
   error
return value >= 0:
  number of bytes which were succesfully written


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux