diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2008-02-04 22:30:35 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-05 09:44:24 -0800 |
commit | c9a3072d13e4b8a6549ecc1db6390a55c7ee2ddf (patch) | |
tree | 7b3eee2e8b71d844b27ed6a1c8d852915934e7f9 /arch/um/os-Linux/file.c | |
parent | 4d18de45fa921600e1b3770c3a7cb106ab48cd9d (diff) | |
download | kernel-common-c9a3072d13e4b8a6549ecc1db6390a55c7ee2ddf.tar.gz kernel-common-c9a3072d13e4b8a6549ecc1db6390a55c7ee2ddf.tar.bz2 kernel-common-c9a3072d13e4b8a6549ecc1db6390a55c7ee2ddf.zip |
uml: code tidying under arch/um/os-Linux
This patch contains varied fixes and improvements for some files under
arch/um/os-Linux/, such as a typo fix in a perror message, a missing
argument fix for a printf, some constifying for pointers and so on.
[ jdike - made sigprocmask failure return -errno instead of -1 ]
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/os-Linux/file.c')
-rw-r--r-- | arch/um/os-Linux/file.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c index f83462758627..c3bb5ce70c95 100644 --- a/arch/um/os-Linux/file.c +++ b/arch/um/os-Linux/file.c @@ -19,7 +19,7 @@ #include "user.h" #include "kern_util.h" -static void copy_stat(struct uml_stat *dst, struct stat64 *src) +static void copy_stat(struct uml_stat *dst, const struct stat64 *src) { *dst = ((struct uml_stat) { .ust_dev = src->st_dev, /* device */ @@ -168,7 +168,7 @@ int os_file_type(char *file) else return OS_TYPE_FILE; } -int os_file_mode(char *file, struct openflags *mode_out) +int os_file_mode(const char *file, struct openflags *mode_out) { int err; @@ -189,7 +189,7 @@ int os_file_mode(char *file, struct openflags *mode_out) return err; } -int os_open_file(char *file, struct openflags flags, int mode) +int os_open_file(const char *file, struct openflags flags, int mode) { int fd, err, f = 0; @@ -216,7 +216,7 @@ int os_open_file(char *file, struct openflags flags, int mode) return fd; } -int os_connect_socket(char *name) +int os_connect_socket(const char *name) { struct sockaddr_un sock; int fd, err; @@ -277,7 +277,7 @@ int os_write_file(int fd, const void *buf, int len) return n; } -int os_file_size(char *file, unsigned long long *size_out) +int os_file_size(const char *file, unsigned long long *size_out) { struct uml_stat buf; int err; @@ -314,7 +314,7 @@ int os_file_size(char *file, unsigned long long *size_out) return 0; } -int os_file_modtime(char *file, unsigned long *modtime) +int os_file_modtime(const char *file, unsigned long *modtime) { struct uml_stat buf; int err; @@ -514,7 +514,7 @@ int os_rcv_fd(int fd, int *helper_pid_out) return new; } -int os_create_unix_socket(char *file, int len, int close_on_exec) +int os_create_unix_socket(const char *file, int len, int close_on_exec) { struct sockaddr_un addr; int sock, err; |