4.104.114.84.95
Last change
on this file since 21bfd93 was
edbb81d0,
checked in by Joel Sherrill <joel.sherrill@…>, on 04/27/98 at 14:39:51
|
Removed redundant implementation of tcgetattr and tcsetattr.
|
-
Property mode set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 | |
---|
2 | /* |
---|
3 | * This file contains the glue which maps newlib system calls onto their |
---|
4 | * RTEMS implementations. This formerly was in the file |
---|
5 | * libgloss/rtems/iface.c which was installed as rtems.o. Merging this |
---|
6 | * into the RTEMS source tree minimizes the files which must be linked |
---|
7 | * to build an rtems application. |
---|
8 | * |
---|
9 | * $Id$ |
---|
10 | * |
---|
11 | */ |
---|
12 | |
---|
13 | #include <rtems.h> |
---|
14 | #if defined(RTEMS_NEWLIB) |
---|
15 | |
---|
16 | #include <sys/types.h> |
---|
17 | #include <sys/stat.h> |
---|
18 | #include <errno.h> |
---|
19 | #include <reent.h> |
---|
20 | |
---|
21 | #include <termios.h> |
---|
22 | |
---|
23 | #include "internal.h" |
---|
24 | #include "libio.h" |
---|
25 | |
---|
26 | int |
---|
27 | read(int fd, |
---|
28 | char *buf, |
---|
29 | int nbytes) |
---|
30 | { |
---|
31 | return __rtems_read(fd, buf, nbytes); |
---|
32 | } |
---|
33 | |
---|
34 | int |
---|
35 | write(int fd, |
---|
36 | char *buf, |
---|
37 | int nbytes) |
---|
38 | { |
---|
39 | return __rtems_write(fd, buf, nbytes); |
---|
40 | } |
---|
41 | |
---|
42 | int |
---|
43 | open(char *buf, |
---|
44 | int flags, |
---|
45 | int mode) |
---|
46 | { |
---|
47 | return __rtems_open(buf, flags, mode); |
---|
48 | } |
---|
49 | |
---|
50 | int |
---|
51 | close(int fd) |
---|
52 | { |
---|
53 | return __rtems_close(fd); |
---|
54 | } |
---|
55 | |
---|
56 | /* |
---|
57 | * lseek -- move read/write pointer. Since a serial port |
---|
58 | * is non-seekable, we return an error. |
---|
59 | */ |
---|
60 | off_t |
---|
61 | lseek(int fd, |
---|
62 | off_t offset, |
---|
63 | int whence) |
---|
64 | { |
---|
65 | return __rtems_lseek(fd, offset, whence); |
---|
66 | } |
---|
67 | |
---|
68 | /* |
---|
69 | * fstat -- get status of a file. Since we have no file |
---|
70 | * system, we just return an error. |
---|
71 | */ |
---|
72 | int |
---|
73 | fstat(int fd, |
---|
74 | struct stat *buf) |
---|
75 | { |
---|
76 | return __rtems_fstat(fd, buf); |
---|
77 | } |
---|
78 | |
---|
79 | /* |
---|
80 | * getpid and kill are provided directly by rtems |
---|
81 | */ |
---|
82 | |
---|
83 | /* |
---|
84 | * ioctl -- IO control |
---|
85 | */ |
---|
86 | |
---|
87 | int |
---|
88 | ioctl(int fd, int request, void *argp) |
---|
89 | { |
---|
90 | return __rtems_ioctl(fd,request,argp); |
---|
91 | } |
---|
92 | |
---|
93 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.