4.104.114.84.95
Last change
on this file since 4154b62 was
9c49db4,
checked in by Joel Sherrill <joel.sherrill@…>, on 01/08/01 at 18:26:44
|
2001-01-08 Ralf Corsepius <corsepiu@…>
- configure.in: Add libc/config.h
- libc/Makefile.am: Add INCLUDES += -I. to pickup config.h
- libc/.cvsignore: Add config.h and stamp-h
- libc/*.c: Add config.h support.
|
-
Property mode set to
100644
|
File size:
935 bytes
|
Line | |
---|
1 | /* |
---|
2 | * fchmod() - POSIX 1003.1b 5.6.4 - Change File Modes |
---|
3 | * |
---|
4 | * COPYRIGHT (c) 1989-1999. |
---|
5 | * On-Line Applications Research Corporation (OAR). |
---|
6 | * |
---|
7 | * The license and distribution terms for this file may be |
---|
8 | * found in the file LICENSE in this distribution or at |
---|
9 | * http://www.OARcorp.com/rtems/license.html. |
---|
10 | * |
---|
11 | * $Id$ |
---|
12 | */ |
---|
13 | |
---|
14 | #if HAVE_CONFIG_H |
---|
15 | #include "config.h" |
---|
16 | #endif |
---|
17 | |
---|
18 | #include <unistd.h> |
---|
19 | #include <sys/stat.h> |
---|
20 | #include <errno.h> |
---|
21 | |
---|
22 | #include <rtems.h> |
---|
23 | #include <rtems/libio.h> |
---|
24 | #include <rtems/libio_.h> |
---|
25 | |
---|
26 | int fchmod( |
---|
27 | int fd, |
---|
28 | mode_t mode |
---|
29 | ) |
---|
30 | { |
---|
31 | rtems_libio_t *iop; |
---|
32 | |
---|
33 | rtems_libio_check_fd( fd ); |
---|
34 | iop = rtems_libio_iop( fd ); |
---|
35 | rtems_libio_check_is_open(iop); |
---|
36 | |
---|
37 | /* |
---|
38 | * Now process the fchmod(). |
---|
39 | */ |
---|
40 | |
---|
41 | rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); |
---|
42 | |
---|
43 | if ( !iop->handlers->fchmod_h ) |
---|
44 | set_errno_and_return_minus_one( ENOTSUP ); |
---|
45 | |
---|
46 | return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); |
---|
47 | } |
---|
48 | |
---|
Note: See
TracBrowser
for help on using the repository browser.