From c9a3072d13e4b8a6549ecc1db6390a55c7ee2ddf Mon Sep 17 00:00:00 2001 From: WANG Cong Date: Mon, 4 Feb 2008 22:30:35 -0800 Subject: 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 Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/os-Linux/file.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'arch/um/os-Linux/file.c') diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c index f8346275862..c3bb5ce70c9 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; -- cgit v1.2.3