diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2005-11-03 20:47:50 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2005-11-03 20:47:50 +0000 |
commit | 15eaca1c3fadd40d41d0f61cb656923be443c577 (patch) | |
tree | fbf4c19ebb71cf021569dbc294e146162dc664d6 /newlib/libc/unix/getut.c | |
parent | d31a862312eebff8f99e28f30d245248408b538b (diff) | |
download | newlib-15eaca1c3fadd40d41d0f61cb656923be443c577.zip newlib-15eaca1c3fadd40d41d0f61cb656923be443c577.tar.gz newlib-15eaca1c3fadd40d41d0f61cb656923be443c577.tar.bz2 |
2005-11-03 Jeff Johnston <jjohnstn@redhat.com>
* libc/unix/getcwd.c: Don't use non-reentrant syscall names.
* libc/unix/getlogin.c: Ditto.
* libc/unix/getpass.c: Ditto.
* libc/unix/getut.c: Ditto.
* libc/unix/ttyname.c: Ditto.
Diffstat (limited to 'newlib/libc/unix/getut.c')
-rw-r--r-- | newlib/libc/unix/getut.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/newlib/libc/unix/getut.c b/newlib/libc/unix/getut.c index 1e2b755..554ed3c 100644 --- a/newlib/libc/unix/getut.c +++ b/newlib/libc/unix/getut.c @@ -16,15 +16,15 @@ setutent () { if (utmp_fd == -2) { - utmp_fd = _open (utmp_file, O_RDONLY); + utmp_fd = open (utmp_file, O_RDONLY); } - _lseek (utmp_fd, 0, SEEK_SET); + lseek (utmp_fd, 0, SEEK_SET); } void endutent () { - _close (utmp_fd); + close (utmp_fd); utmp_fd = -2; } @@ -39,7 +39,7 @@ getutent () { if (utmp_fd == -2) setutent (); - if (_read (utmp_fd, &utmp_data, sizeof (utmp_data)) < sizeof (utmp_data)) + if (read (utmp_fd, &utmp_data, sizeof (utmp_data)) < sizeof (utmp_data)) return 0; return &utmp_data; } @@ -47,7 +47,7 @@ getutent () struct utmp * getutid (struct utmp *id) { - while (_read (utmp_fd, &utmp_data, sizeof (utmp_data)) == sizeof (utmp_data)) + while (read (utmp_fd, &utmp_data, sizeof (utmp_data)) == sizeof (utmp_data)) { switch (id->ut_type) { @@ -73,7 +73,7 @@ getutid (struct utmp *id) struct utmp * getutline (struct utmp *line) { - while (_read (utmp_fd, &utmp_data, sizeof (utmp_data)) == sizeof (utmp_data)) + while (read (utmp_fd, &utmp_data, sizeof (utmp_data)) == sizeof (utmp_data)) { if ((utmp_data.ut_type == LOGIN_PROCESS || utmp_data.ut_type == USER_PROCESS) && |