Just return a status word containing INPUT_WOULDBLOCK, OUTPUT_WOULDBLOCK,
INPUT_ERROR and OUTPUT_ERROR flags and passing a pointer where to store
number of bytes copied or errno.
> Update to my previous posting. I think the prototype should be:
>
> ssize_t copy (int from_fd, int to_fd, size_t *nbytes);
>
> so the kernel can return the number of bytes actually
> copied in the event of an error. I'll try and implement
> this some time and see if it's workable.
It would be better to allow selecting offsets in both source and destination
files.
Have a nice fortnight
-- Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth "while (*p++ = *q++);" -- Dennis M. Ritchie- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu