forked from Imagelibrary/rtems
Added _stat_r and changed spacing.
This commit is contained in:
@@ -23,17 +23,18 @@
|
|||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "libio.h"
|
#include "libio.h"
|
||||||
|
|
||||||
_ssize_t
|
_ssize_t _read_r(
|
||||||
_read_r(struct _reent *ptr,
|
struct _reent *ptr,
|
||||||
int fd,
|
int fd,
|
||||||
void *buf,
|
void *buf,
|
||||||
size_t nbytes)
|
size_t nbytes
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return __rtems_read(fd, buf, nbytes);
|
return __rtems_read(fd, buf, nbytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
long
|
long _write_r(
|
||||||
_write_r(struct _reent *ptr,
|
struct _reent *ptr,
|
||||||
int fd,
|
int fd,
|
||||||
const void *buf,
|
const void *buf,
|
||||||
size_t nbytes
|
size_t nbytes
|
||||||
@@ -42,35 +43,48 @@ _write_r(struct _reent *ptr,
|
|||||||
return __rtems_write(fd, buf, nbytes);
|
return __rtems_write(fd, buf, nbytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int _open_r(
|
||||||
_open_r(struct _reent *ptr,
|
struct _reent *ptr,
|
||||||
const char *buf,
|
const char *buf,
|
||||||
int flags,
|
int flags,
|
||||||
int mode)
|
int mode
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return __rtems_open(buf, flags, mode);
|
return __rtems_open(buf, flags, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int _close_r(
|
||||||
_close_r(struct _reent *ptr,
|
struct _reent *ptr,
|
||||||
int fd)
|
int fd
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return __rtems_close(fd);
|
return __rtems_close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
off_t
|
off_t _lseek_r(
|
||||||
_lseek_r(struct _reent *ptr,
|
struct _reent *ptr,
|
||||||
int fd,
|
int fd,
|
||||||
off_t offset,
|
off_t offset,
|
||||||
int whence)
|
int whence
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return __rtems_lseek(fd, offset, whence);
|
return __rtems_lseek(fd, offset, whence);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int _stat_r(
|
||||||
_fstat_r(struct _reent *ptr,
|
struct _reent *ptr,
|
||||||
|
const char *path,
|
||||||
|
struct stat *buf
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return stat(path, buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
int _fstat_r(
|
||||||
|
struct _reent *ptr,
|
||||||
int fd,
|
int fd,
|
||||||
struct stat *buf)
|
struct stat *buf
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return __rtems_fstat(fd, buf);
|
return __rtems_fstat(fd, buf);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user