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
31a20bb7
Commit
31a20bb7
authored
Sep 26, 2016
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unix: Fix external unix inode type
Signed-off-by:
Pavel Emelyanov
<
xemul@virtuozzo.com
>
parent
26529414
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
cr-service.c
criu/cr-service.c
+1
-1
sockets.h
criu/include/sockets.h
+1
-1
sk-unix.c
criu/sk-unix.c
+5
-5
No files found.
criu/cr-service.c
View file @
31a20bb7
...
@@ -304,7 +304,7 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
...
@@ -304,7 +304,7 @@ static int setup_opts_from_req(int sk, CriuOpts *req)
if
(
req
->
has_ext_unix_sk
)
{
if
(
req
->
has_ext_unix_sk
)
{
opts
.
ext_unix_sk
=
req
->
ext_unix_sk
;
opts
.
ext_unix_sk
=
req
->
ext_unix_sk
;
for
(
i
=
0
;
i
<
req
->
n_unix_sk_ino
;
i
++
)
{
for
(
i
=
0
;
i
<
req
->
n_unix_sk_ino
;
i
++
)
{
if
(
unix_sk_id_add
(
req
->
unix_sk_ino
[
i
]
->
inode
)
<
0
)
if
(
unix_sk_id_add
(
(
unsigned
int
)
req
->
unix_sk_ino
[
i
]
->
inode
)
<
0
)
goto
err
;
goto
err
;
}
}
}
}
...
...
criu/include/sockets.h
View file @
31a20bb7
...
@@ -51,7 +51,7 @@ extern int inet_collect_one(struct nlmsghdr *h, int family, int type);
...
@@ -51,7 +51,7 @@ extern int inet_collect_one(struct nlmsghdr *h, int family, int type);
extern
int
unix_receive_one
(
struct
nlmsghdr
*
h
,
void
*
);
extern
int
unix_receive_one
(
struct
nlmsghdr
*
h
,
void
*
);
extern
int
netlink_receive_one
(
struct
nlmsghdr
*
hdr
,
void
*
arg
);
extern
int
netlink_receive_one
(
struct
nlmsghdr
*
hdr
,
void
*
arg
);
extern
int
unix_sk_id_add
(
ino_
t
ino
);
extern
int
unix_sk_id_add
(
unsigned
in
t
ino
);
extern
int
unix_sk_ids_parse
(
char
*
optarg
);
extern
int
unix_sk_ids_parse
(
char
*
optarg
);
extern
int
do_dump_opt
(
int
sk
,
int
level
,
int
name
,
void
*
val
,
int
len
);
extern
int
do_dump_opt
(
int
sk
,
int
level
,
int
name
,
void
*
val
,
int
len
);
...
...
criu/sk-unix.c
View file @
31a20bb7
...
@@ -159,11 +159,11 @@ static int can_dump_unix_sk(const struct unix_sk_desc *sk)
...
@@ -159,11 +159,11 @@ static int can_dump_unix_sk(const struct unix_sk_desc *sk)
return
1
;
return
1
;
}
}
static
bool
unix_sk_exception_lookup_id
(
ino_
t
ino
)
static
bool
unix_sk_exception_lookup_id
(
unsigned
in
t
ino
)
{
{
char
id
[
20
];
char
id
[
20
];
snprintf
(
id
,
sizeof
(
id
),
"unix[%
l
u]"
,
ino
);
snprintf
(
id
,
sizeof
(
id
),
"unix[%u]"
,
ino
);
if
(
external_lookup_id
(
id
))
{
if
(
external_lookup_id
(
id
))
{
pr_debug
(
"Found ino %u in exception unix sk list
\n
"
,
(
unsigned
int
)
ino
);
pr_debug
(
"Found ino %u in exception unix sk list
\n
"
,
(
unsigned
int
)
ino
);
return
true
;
return
true
;
...
@@ -1438,14 +1438,14 @@ static int resolve_unix_peers(void *unused)
...
@@ -1438,14 +1438,14 @@ static int resolve_unix_peers(void *unused)
return
0
;
return
0
;
}
}
int
unix_sk_id_add
(
ino_
t
ino
)
int
unix_sk_id_add
(
unsigned
in
t
ino
)
{
{
char
*
e_str
;
char
*
e_str
;
e_str
=
xmalloc
(
20
);
e_str
=
xmalloc
(
20
);
if
(
!
e_str
)
if
(
!
e_str
)
return
-
1
;
return
-
1
;
snprintf
(
e_str
,
20
,
"unix[%
l
u]"
,
ino
);
snprintf
(
e_str
,
20
,
"unix[%u]"
,
ino
);
return
add_external
(
e_str
);
return
add_external
(
e_str
);
}
}
...
@@ -1462,7 +1462,7 @@ int unix_sk_ids_parse(char *optarg)
...
@@ -1462,7 +1462,7 @@ int unix_sk_ids_parse(char *optarg)
if
(
*
iter
==
','
)
if
(
*
iter
==
','
)
iter
++
;
iter
++
;
else
{
else
{
ino_t
ino
=
(
ino_t
)
strtoul
(
iter
,
&
iter
,
10
);
unsigned
int
ino
=
strtoul
(
iter
,
&
iter
,
10
);
if
(
0
==
ino
)
{
if
(
0
==
ino
)
{
pr_err
(
"Can't parse unix socket inode from optarg: %s
\n
"
,
optarg
);
pr_err
(
"Can't parse unix socket inode from optarg: %s
\n
"
,
optarg
);
...
...
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