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
7eb20e7d
Commit
7eb20e7d
authored
Oct 15, 2013
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fsnotify: Move decoding handle into function
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
7bb5ba1f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
fsnotify.c
fsnotify.c
+13
-8
No files found.
fsnotify.c
View file @
7eb20e7d
...
@@ -175,6 +175,18 @@ const struct fdtype_ops fanotify_dump_ops = {
...
@@ -175,6 +175,18 @@ const struct fdtype_ops fanotify_dump_ops = {
.
dump
=
dump_one_fanotify
,
.
dump
=
dump_one_fanotify
,
};
};
static
void
decode_handle
(
fh_t
*
handle
,
FhEntry
*
img
)
{
memzero
(
handle
,
sizeof
(
*
handle
));
handle
->
type
=
img
->
type
;
handle
->
bytes
=
img
->
bytes
;
memcpy
(
handle
->
__handle
,
img
->
handle
,
min
(
pb_repeated_size
(
img
,
handle
),
sizeof
(
handle
->
__handle
)));
}
static
char
*
get_mark_path
(
const
char
*
who
,
struct
file_remap
*
remap
,
static
char
*
get_mark_path
(
const
char
*
who
,
struct
file_remap
*
remap
,
FhEntry
*
f_handle
,
unsigned
long
i_ino
,
FhEntry
*
f_handle
,
unsigned
long
i_ino
,
unsigned
int
s_dev
,
char
*
buf
,
size_t
size
,
unsigned
int
s_dev
,
char
*
buf
,
size_t
size
,
...
@@ -190,14 +202,7 @@ static char *get_mark_path(const char *who, struct file_remap *remap,
...
@@ -190,14 +202,7 @@ static char *get_mark_path(const char *who, struct file_remap *remap,
return
remap
->
path
;
return
remap
->
path
;
}
}
memzero
(
&
handle
,
sizeof
(
handle
));
decode_handle
(
&
handle
,
f_handle
);
handle
.
type
=
f_handle
->
type
;
handle
.
bytes
=
f_handle
->
bytes
;
memcpy
(
handle
.
__handle
,
f_handle
->
handle
,
min
(
pb_repeated_size
(
f_handle
,
handle
),
sizeof
(
handle
.
__handle
)));
mntfd
=
open_mount
(
s_dev
);
mntfd
=
open_mount
(
s_dev
);
if
(
mntfd
<
0
)
{
if
(
mntfd
<
0
)
{
...
...
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