Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
c8e9f940
Commit
c8e9f940
authored
Jan 02, 2003
by
Stephen Rothwell
Committed by
David S. Miller
Jan 02, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] compat_flock: ppc64
parent
8baa2cda
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
35 deletions
+11
-35
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+2
-26
include/asm-ppc64/compat.h
include/asm-ppc64/compat.h
+9
-0
include/asm-ppc64/ppc32.h
include/asm-ppc64/ppc32.h
+0
-9
No files found.
arch/ppc64/kernel/sys_ppc32.c
View file @
c8e9f940
...
...
@@ -247,30 +247,6 @@ asmlinkage long sys32_writev(int fd, struct iovec32 *vector, u32 count)
return
ret
;
}
static
inline
int
get_flock
(
struct
flock
*
kfl
,
struct
flock32
*
ufl
)
{
int
err
;
err
=
get_user
(
kfl
->
l_type
,
&
ufl
->
l_type
);
err
|=
__get_user
(
kfl
->
l_whence
,
&
ufl
->
l_whence
);
err
|=
__get_user
(
kfl
->
l_start
,
&
ufl
->
l_start
);
err
|=
__get_user
(
kfl
->
l_len
,
&
ufl
->
l_len
);
err
|=
__get_user
(
kfl
->
l_pid
,
&
ufl
->
l_pid
);
return
err
;
}
static
inline
int
put_flock
(
struct
flock
*
kfl
,
struct
flock32
*
ufl
)
{
int
err
;
err
=
__put_user
(
kfl
->
l_type
,
&
ufl
->
l_type
);
err
|=
__put_user
(
kfl
->
l_whence
,
&
ufl
->
l_whence
);
err
|=
__put_user
(
kfl
->
l_start
,
&
ufl
->
l_start
);
err
|=
__put_user
(
kfl
->
l_len
,
&
ufl
->
l_len
);
err
|=
__put_user
(
kfl
->
l_pid
,
&
ufl
->
l_pid
);
return
err
;
}
extern
asmlinkage
long
sys_fcntl
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
);
asmlinkage
long
sys32_fcntl
(
unsigned
int
fd
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
...
...
@@ -283,12 +259,12 @@ asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg
mm_segment_t
old_fs
;
long
ret
;
if
(
get_
flock
(
&
f
,
(
struct
flock32
*
)
arg
))
if
(
get_
compat_flock
(
&
f
,
(
struct
compat_flock
*
)
arg
))
return
-
EFAULT
;
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
ret
=
sys_fcntl
(
fd
,
cmd
,
(
unsigned
long
)
&
f
);
set_fs
(
old_fs
);
if
(
put_
flock
(
&
f
,
(
struct
flock32
*
)
arg
))
if
(
put_
compat_flock
(
&
f
,
(
struct
compat_flock
*
)
arg
))
return
-
EFAULT
;
return
ret
;
}
...
...
include/asm-ppc64/compat.h
View file @
c8e9f940
...
...
@@ -55,4 +55,13 @@ struct compat_stat {
u32
__unused4
[
2
];
};
struct
compat_flock
{
short
l_type
;
short
l_whence
;
compat_off_t
l_start
;
compat_off_t
l_len
;
compat_pid_t
l_pid
;
short
__unused
;
};
#endif
/* _ASM_PPC64_COMPAT_H */
include/asm-ppc64/ppc32.h
View file @
c8e9f940
...
...
@@ -141,15 +141,6 @@ typedef struct sigaltstack_32 {
compat_size_t
ss_size
;
}
stack_32_t
;
struct
flock32
{
short
l_type
;
short
l_whence
;
compat_off_t
l_start
;
compat_off_t
l_len
;
compat_pid_t
l_pid
;
short
__unused
;
};
struct
sigcontext32
{
unsigned
int
_unused
[
4
];
int
signal
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment