[uClibc-cvs] uClibc/libc/sysdeps/linux/common syscalls.c, 1.124, 1.125
Manuel Novoa III
mjn3 at uclibc.org
Fri Jan 2 08:47:25 UTC 2004
- Previous message: [uClibc-cvs] uClibc/libc/unistd exec.c, NONE, 1.1 Makefile, 1.35, 1.36 execl.c, 1.4, NONE execlp.c, 1.5, NONE execv.c, 1.2, NONE execvep.c, 1.2, NONE execvp.c, 1.3, NONE execle.c, 1.2, NONE
- Next message: [uClibc-cvs] uClibc/libc/stdio popen.c,1.9,1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/cvs/uClibc/libc/sysdeps/linux/common
In directory nail:/tmp/cvs-serv25160
Modified Files:
syscalls.c
Log Message:
The checking Erik added seems to be unnecessary. Without it, I am not
seeing any LTP failures.
Index: syscalls.c
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/common/syscalls.c,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -d -r1.124 -r1.125
--- syscalls.c 31 Dec 2003 12:13:27 -0000 1.124
+++ syscalls.c 2 Jan 2004 08:47:22 -0000 1.125
@@ -88,14 +88,6 @@
int __libc_open (const char * file, int flags, ...)
{
mode_t mode;
- if (unlikely(file==NULL || *file=='\0')) {
- __set_errno(ENOENT);
- return -1;
- }
- if (unlikely(((strlen(file)+1) > NAME_MAX))) {
- __set_errno(ENAMETOOLONG);
- return -1;
- }
if (flags & O_CREAT) {
va_list ap;
va_start(ap, flags);
@@ -147,18 +139,7 @@
static inline
_syscall3(int, __syscall_execve, const char *, filename,
char *const *, argv, char *const *, envp);
-int execve(const char *filename, char *const *argv, char *const *envp)
-{
- if (unlikely(filename==NULL || *filename=='\0')) {
- __set_errno(ENOENT);
- return -1;
- }
- if (unlikely(((strlen(filename)+1) > NAME_MAX))) {
- __set_errno(ENAMETOOLONG);
- return -1;
- }
- return __syscall_execve(filename, argv, envp);
-}
+weak_alias(__syscall_execve, execve)
#endif
//#define __NR_chdir 12
@@ -168,18 +149,7 @@
#include <sys/param.h>
static inline
_syscall1(int, __syscall_chdir, const char *, path);
-int chdir(const char *path)
-{
- if (unlikely(path==NULL || *path=='\0')) {
- __set_errno(ENOENT);
- return -1;
- }
- if (unlikely(((strlen(path)+1) > NAME_MAX))) {
- __set_errno(ENAMETOOLONG);
- return -1;
- }
- return __syscall_chdir(path);
-}
+weak_alias(__syscall_chdir, chdir)
#endif
//#define __NR_time 13
@@ -509,22 +479,7 @@
#include <stdio.h>
static inline
_syscall2(int, __syscall_rename, const char *, oldpath, const char *, newpath);
-int rename(const char *oldpath, const char *newpath)
-{
- if (unlikely((oldpath==NULL || newpath==NULL ||
- *oldpath=='\0' || *newpath=='\0')))
- {
- __set_errno(ENOENT);
- return -1;
- }
- if (unlikely(((strlen(oldpath)+1) >= NAME_MAX) ||
- ((strlen(newpath)+1) >= NAME_MAX)))
- {
- __set_errno(ENAMETOOLONG);
- return -1;
- }
- return __syscall_rename(oldpath, newpath);
-}
+weak_alias(__syscall_rename, rename)
#endif
//#define __NR_mkdir 39
@@ -743,18 +698,7 @@
#include <sys/param.h>
static inline
_syscall1(int, __syscall_chroot, const char *, path);
-int chroot(const char *path)
-{
- if (unlikely(path==NULL || *path=='\0')) {
- __set_errno(ENOENT);
- return -1;
- }
- if (unlikely(((strlen(path)+1) > NAME_MAX))) {
- __set_errno(ENAMETOOLONG);
- return -1;
- }
- return __syscall_chroot(path);
-}
+weak_alias(__syscall_chroot, chroot)
#endif
//#define __NR_ustat 62
@@ -1176,18 +1120,7 @@
#include <sys/vfs.h>
static inline
_syscall2(int, __syscall_statfs, const char *, path, struct statfs *, buf);
-int statfs(const char *path, struct statfs *buf)
-{
- if (unlikely(path==NULL || *path=='\0')) {
- __set_errno(ENOENT);
- return -1;
- }
- if (unlikely(((strlen(path)+1) > NAME_MAX))) {
- __set_errno(ENAMETOOLONG);
- return -1;
- }
- return __syscall_statfs(path, buf);
-}
+weak_alias(__syscall_statfs, statfs)
#endif
//#define __NR_fstatfs 100
- Previous message: [uClibc-cvs] uClibc/libc/unistd exec.c, NONE, 1.1 Makefile, 1.35, 1.36 execl.c, 1.4, NONE execlp.c, 1.5, NONE execv.c, 1.2, NONE execvep.c, 1.2, NONE execvp.c, 1.3, NONE execle.c, 1.2, NONE
- Next message: [uClibc-cvs] uClibc/libc/stdio popen.c,1.9,1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the uClibc-cvs
mailing list