Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
d01899e1
Commit
d01899e1
authored
Nov 01, 2018
by
Andrei Vagin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test/file_locks: use F_GETLK instead of F_GETLK64
F_GETLK64 has to be used with flock64 Reported-by: Mr Jenkins
parent
54daec18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
file_locks00.c
test/zdtm/static/file_locks00.c
+4
-4
No files found.
test/zdtm/static/file_locks00.c
View file @
d01899e1
...
...
@@ -34,9 +34,9 @@ static int lock_reg(int fd, int cmd, int type, int whence,
}
#define set_read_lock(fd, whence, offset, len) \
lock_reg(fd, F_SETLK
64
, F_RDLCK, whence, offset, len)
lock_reg(fd, F_SETLK, F_RDLCK, whence, offset, len)
#define set_write_lock(fd, whence, offset, len) \
lock_reg(fd, F_SETLK
64
, F_WRLCK, whence, offset, len)
lock_reg(fd, F_SETLK, F_WRLCK, whence, offset, len)
static
int
check_read_lock
(
int
fd
,
int
whence
,
off_t
offset
,
off_t
len
)
{
...
...
@@ -50,7 +50,7 @@ static int check_read_lock(int fd, int whence, off_t offset, off_t len)
lock
.
l_pid
=
-
1
;
errno
=
0
;
ret
=
fcntl
(
fd
,
F_GETLK
64
,
&
lock
);
ret
=
fcntl
(
fd
,
F_GETLK
,
&
lock
);
if
(
ret
==
-
1
)
{
pr_perror
(
"F_GETLK failed."
);
return
-
1
;
...
...
@@ -79,7 +79,7 @@ static int check_write_lock(int fd, int whence, off_t offset, off_t len)
lock
.
l_pid
=
-
1
;
errno
=
0
;
ret
=
fcntl
(
fd
,
F_GETLK
64
,
&
lock
);
ret
=
fcntl
(
fd
,
F_GETLK
,
&
lock
);
if
(
ret
==
-
1
)
{
pr_perror
(
"F_GETLK failed."
);
return
-
1
;
...
...
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