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
db3da180
Commit
db3da180
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: ia64
parent
0c1821db
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
43 deletions
+10
-43
arch/ia64/ia32/sys_ia32.c
arch/ia64/ia32/sys_ia32.c
+2
-34
include/asm-ia64/compat.h
include/asm-ia64/compat.h
+8
-0
include/asm-ia64/ia32.h
include/asm-ia64/ia32.h
+0
-9
No files found.
arch/ia64/ia32/sys_ia32.c
View file @
db3da180
...
...
@@ -3017,38 +3017,6 @@ sys32_ptrace (int request, pid_t pid, unsigned int addr, unsigned int data,
return
ret
;
}
static
inline
int
get_flock32
(
struct
flock
*
kfl
,
struct
flock32
*
ufl
)
{
int
err
;
if
(
!
access_ok
(
VERIFY_READ
,
ufl
,
sizeof
(
*
ufl
)))
return
-
EFAULT
;
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_flock32
(
struct
flock
*
kfl
,
struct
flock32
*
ufl
)
{
int
err
;
if
(
!
access_ok
(
VERIFY_WRITE
,
ufl
,
sizeof
(
*
ufl
)))
return
-
EFAULT
;
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
...
...
@@ -3062,13 +3030,13 @@ sys32_fcntl (unsigned int fd, unsigned int cmd, unsigned int arg)
case
F_GETLK
:
case
F_SETLK
:
case
F_SETLKW
:
if
(
get_
flock32
(
&
f
,
(
struct
flock32
*
)
A
(
arg
)))
if
(
get_
compat_flock
(
&
f
,
(
struct
compat_flock
*
)
A
(
arg
)))
return
-
EFAULT
;
old_fs
=
get_fs
();
set_fs
(
KERNEL_DS
);
ret
=
sys_fcntl
(
fd
,
cmd
,
(
unsigned
long
)
&
f
);
set_fs
(
old_fs
);
if
(
cmd
==
F_GETLK
&&
put_
flock32
(
&
f
,
(
struct
flock32
*
)
A
(
arg
)))
if
(
cmd
==
F_GETLK
&&
put_
compat_flock
(
&
f
,
(
struct
compat_flock
*
)
A
(
arg
)))
return
-
EFAULT
;
return
ret
;
...
...
include/asm-ia64/compat.h
View file @
db3da180
...
...
@@ -53,4 +53,12 @@ struct compat_stat {
u32
__unused5
;
};
struct
compat_flock
{
short
l_type
;
short
l_whence
;
compat_off_t
l_start
;
compat_off_t
l_len
;
compat_pid_t
l_pid
;
};
#endif
/* _ASM_IA64_COMPAT_H */
include/asm-ia64/ia32.h
View file @
db3da180
...
...
@@ -29,15 +29,6 @@ typedef __kernel_fsid_t __kernel_fsid_t32;
#define IA32_PAGE_ALIGN(addr) (((addr) + IA32_PAGE_SIZE - 1) & IA32_PAGE_MASK)
#define IA32_CLOCKS_PER_SEC 100
/* Cast in stone for IA32 Linux */
/* fcntl.h */
struct
flock32
{
short
l_type
;
short
l_whence
;
compat_off_t
l_start
;
compat_off_t
l_len
;
compat_pid_t
l_pid
;
};
#define F_GETLK64 12
#define F_SETLK64 13
#define F_SETLKW64 14
...
...
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