diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-09-06 18:18:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-07 19:57:43 -0400 |
commit | e922efc342d565a38eed3af377ff403f52148864 (patch) | |
tree | b9996a96ed1bbb6e387f7ba8216f8e43ca640398 /arch/ppc64/kernel/sys_ppc32.c | |
parent | ab8d11beb46f0bd0617e04205c01f5c1fe845b61 (diff) |
[PATCH] remove duplicated sys_open32() code from 64bit archs
64 bit architectures all implement their own compatibility sys_open(),
when in fact the difference is simply not forcing the O_LARGEFILE
flag. So use the a common function instead.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/ppc64/kernel/sys_ppc32.c')
-rw-r--r-- | arch/ppc64/kernel/sys_ppc32.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c index 206619080e66..214914a95a50 100644 --- a/arch/ppc64/kernel/sys_ppc32.c +++ b/arch/ppc64/kernel/sys_ppc32.c | |||
@@ -867,37 +867,6 @@ off_t ppc32_lseek(unsigned int fd, u32 offset, unsigned int origin) | |||
867 | return sys_lseek(fd, (int)offset, origin); | 867 | return sys_lseek(fd, (int)offset, origin); |
868 | } | 868 | } |
869 | 869 | ||
870 | /* | ||
871 | * This is just a version for 32-bit applications which does | ||
872 | * not force O_LARGEFILE on. | ||
873 | */ | ||
874 | asmlinkage long sys32_open(const char __user * filename, int flags, int mode) | ||
875 | { | ||
876 | char * tmp; | ||
877 | int fd, error; | ||
878 | |||
879 | tmp = getname(filename); | ||
880 | fd = PTR_ERR(tmp); | ||
881 | if (!IS_ERR(tmp)) { | ||
882 | fd = get_unused_fd(); | ||
883 | if (fd >= 0) { | ||
884 | struct file * f = filp_open(tmp, flags, mode); | ||
885 | error = PTR_ERR(f); | ||
886 | if (IS_ERR(f)) | ||
887 | goto out_error; | ||
888 | fd_install(fd, f); | ||
889 | } | ||
890 | out: | ||
891 | putname(tmp); | ||
892 | } | ||
893 | return fd; | ||
894 | |||
895 | out_error: | ||
896 | put_unused_fd(fd); | ||
897 | fd = error; | ||
898 | goto out; | ||
899 | } | ||
900 | |||
901 | /* Note: it is necessary to treat bufsiz as an unsigned int, | 870 | /* Note: it is necessary to treat bufsiz as an unsigned int, |
902 | * with the corresponding cast to a signed int to insure that the | 871 | * with the corresponding cast to a signed int to insure that the |
903 | * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) | 872 | * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) |