4.104.114.84.95
Last change
on this file since 6693a68 was
73f6236,
checked in by Joel Sherrill <joel.sherrill@…>, on 03/01/99 at 22:40:08
|
Patch from Eric Norum <eric@…> to eliminate external
IO handlers scheme that was implemented originally just to support
sockets. The file system IO switch is more general and works fine.
|
-
Property mode set to
100644
|
File size:
928 bytes
|
Line | |
---|
1 | /* |
---|
2 | * fchmod() - POSIX 1003.1b 5.6.4 - Change File Modes |
---|
3 | * |
---|
4 | * COPYRIGHT (c) 1989-1998. |
---|
5 | * On-Line Applications Research Corporation (OAR). |
---|
6 | * Copyright assigned to U.S. Government, 1994. |
---|
7 | * |
---|
8 | * The license and distribution terms for this file may be |
---|
9 | * found in the file LICENSE in this distribution or at |
---|
10 | * http://www.OARcorp.com/rtems/license.html. |
---|
11 | * |
---|
12 | * $Id$ |
---|
13 | */ |
---|
14 | |
---|
15 | #include <unistd.h> |
---|
16 | #include <sys/stat.h> |
---|
17 | #include <errno.h> |
---|
18 | |
---|
19 | #include <rtems.h> |
---|
20 | #include <rtems/libio.h> |
---|
21 | #include "libio_.h" |
---|
22 | |
---|
23 | int fchmod( |
---|
24 | int fd, |
---|
25 | mode_t mode |
---|
26 | ) |
---|
27 | { |
---|
28 | rtems_libio_t *iop; |
---|
29 | |
---|
30 | rtems_libio_check_fd( fd ); |
---|
31 | iop = rtems_libio_iop( fd ); |
---|
32 | rtems_libio_check_is_open(iop); |
---|
33 | |
---|
34 | /* |
---|
35 | * Now process the fchmod(). |
---|
36 | */ |
---|
37 | |
---|
38 | rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); |
---|
39 | |
---|
40 | if ( !iop->handlers->fchmod ) |
---|
41 | set_errno_and_return_minus_one( ENOTSUP ); |
---|
42 | |
---|
43 | return (*iop->pathinfo.handlers->fchmod)( &iop->pathinfo, mode ); |
---|
44 | } |
---|
45 | |
---|
Note: See
TracBrowser
for help on using the repository browser.