diff options
Diffstat (limited to 'sysdeps/unix')
-rw-r--r-- | sysdeps/unix/getlogin.c | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/ioperm.c | 17 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/syscalls.list | 2 |
3 files changed, 10 insertions, 13 deletions
diff --git a/sysdeps/unix/getlogin.c b/sysdeps/unix/getlogin.c index 7446f25786..246b488f51 100644 --- a/sysdeps/unix/getlogin.c +++ b/sysdeps/unix/getlogin.c @@ -35,7 +35,7 @@ DEFUN_VOID(getlogin) char tty_pathname[2 + 2 * NAME_MAX]; char *real_tty_path = tty_pathname; char *result = NULL; - static struct utmp_data utmp_data; + static struct utmp_data utmp_data = { ut_fd: -1 }; struct utmp *ut, line; { @@ -48,7 +48,7 @@ DEFUN_VOID(getlogin) err = errno; (void) close (d); - if (errno != 0) + if (err != 0) { errno = err; return NULL; diff --git a/sysdeps/unix/sysv/linux/alpha/ioperm.c b/sysdeps/unix/sysv/linux/alpha/ioperm.c index b9630a8273..cee5f482bb 100644 --- a/sysdeps/unix/sysv/linux/alpha/ioperm.c +++ b/sysdeps/unix/sysv/linux/alpha/ioperm.c @@ -116,13 +116,9 @@ static inline unsigned long port_to_cpu_addr (unsigned long port, int iosys, int size) { if (iosys == IOSYS_JENSEN) - { - return (port << 7) + ((size - 1) << 4) + io.base; - } + return (port << 7) + ((size - 1) << 5) + io.base; else - { - return (port << 5) + ((size - 1) << 3) + io.base; - } + return (port << 5) + ((size - 1) << 3) + io.base; } @@ -303,17 +299,18 @@ init_iosys (void) } else { - char name[256]; FILE * fp; fp = fopen (PATH_CPUINFO, "r"); if (!fp) return -1; - while ((n = fscanf (fp, "%256[^:]: %256[^\n]\n", name, systype)) != EOF) + while ((n = fscanf (fp, "system type : %256[^\n]\n", systype)) + != EOF) { - if (n == 2 && strncmp (name, "system type", 11) == 0) { + if (n == 1) break; - } + else + fgets (systype, 256, fp); } fclose(fp); diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index d29577ff6c..73b5de9b98 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -1,7 +1,7 @@ # File name Caller Syscall name # args Strong name Weak names adjtimex adjtime adjtimex 1 __adjtimex -bdflush - bdflush 2 bdflush +bdflush EXTRA bdflush 2 bdflush create_module EXTRA create_module 3 create_module delete_module EXTRA delete_module 3 delete_module fdatasync - fdatasync 1 fdatasync |