2 Copyright © 1995-2002, The AROS Development Team. All rights reserved.
5 ANSI C function fchmod().
10 #include <aros/debug.h>
11 #include <proto/exec.h>
12 #include <proto/dos.h>
13 #include <sys/types.h>
21 ULONG
prot_u2a(mode_t protect
);
23 /*****************************************************************************
26 #include <sys/types.h>
53 ******************************************************************************/
60 if (!(fdesc
= __getfdesc(filedes
)))
66 /* Get the full path of the stated filesystem object and use it to
70 if(!(buffer
= AllocVec(buffersize
, MEMF_ANY
)))
72 errno
= IoErr2errno(IoErr());
76 if(NameFromLock(fdesc
->fh
, buffer
, buffersize
))
78 else if(IoErr() != ERROR_LINE_TOO_LONG
)
80 errno
= IoErr2errno(IoErr());
89 if (!SetProtection(buffer
, prot_u2a(mode
)))
92 errno
= IoErr2errno(IoErr());