2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
5 POSIX.1-2008 function write().
10 #include <dos/dosextens.h>
11 #include <proto/exec.h>
12 #include <proto/dos.h>
15 /*****************************************************************************
28 Write an amount of characters to the specified file descriptor.
31 fd - The file descriptor to write to
32 buf - Write these bytes into the file descriptor
33 count - Write that many bytes
36 The number of characters written or -1 on error.
48 ******************************************************************************/
52 fdesc
*fdesc
= __getfdesc(fd
);
59 cnt
= Write ((BPTR
)fdesc
->fcb
->fh
, (void *)buf
, count
);
62 errno
= __arosc_ioerr2errno (IoErr ());