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
692e5796
Commit
692e5796
authored
Jan 03, 2003
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: flock compat changes
parent
54303f1e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
37 deletions
+11
-37
arch/sparc64/kernel/sys_sparc32.c
arch/sparc64/kernel/sys_sparc32.c
+2
-26
include/asm-sparc64/compat.h
include/asm-sparc64/compat.h
+9
-0
include/asm-sparc64/fcntl.h
include/asm-sparc64/fcntl.h
+0
-11
No files found.
arch/sparc64/kernel/sys_sparc32.c
View file @
692e5796
...
...
@@ -804,30 +804,6 @@ asmlinkage int sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u
return
err
;
}
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
)
...
...
@@ -841,13 +817,13 @@ 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
(
ret
)
return
ret
;
if
(
put_
flock
(
&
f
,
(
struct
flock32
*
)
arg
))
if
(
put_
compat_flock
(
&
f
,
(
struct
compat_flock
*
)
arg
))
return
-
EFAULT
;
return
0
;
}
...
...
include/asm-sparc64/compat.h
View file @
692e5796
...
...
@@ -42,4 +42,13 @@ struct compat_timeval {
s32
tv_usec
;
};
struct
compat_flock
{
short
l_type
;
short
l_whence
;
__kernel_off_t32
l_start
;
__kernel_off_t32
l_len
;
__kernel_pid_t32
l_pid
;
short
__unused
;
};
#endif
/* _ASM_SPARC64_COMPAT_H */
include/asm-sparc64/fcntl.h
View file @
692e5796
...
...
@@ -78,17 +78,6 @@ struct flock {
short
__unused
;
};
#ifdef __KERNEL__
struct
flock32
{
short
l_type
;
short
l_whence
;
__kernel_off_t32
l_start
;
__kernel_off_t32
l_len
;
__kernel_pid_t32
l_pid
;
short
__unused
;
};
#endif
#ifdef __KERNEL__
#define flock64 flock
#endif
...
...
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