Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
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
Chen Yisong
lxc
Commits
d2e61e59
Unverified
Commit
d2e61e59
authored
Aug 25, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
utils: s/LXC_NUMSTRLEN64/INTTYPE_TO_STRLEN()/
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
70025c17
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
utils.c
src/lxc/utils.c
+4
-4
No files found.
src/lxc/utils.c
View file @
d2e61e59
...
@@ -1150,7 +1150,7 @@ int lxc_mount_proc_if_needed(const char *rootfs)
...
@@ -1150,7 +1150,7 @@ int lxc_mount_proc_if_needed(const char *rootfs)
{
{
char
path
[
MAXPATHLEN
];
char
path
[
MAXPATHLEN
];
int
link_to_pid
,
linklen
,
mypid
,
ret
;
int
link_to_pid
,
linklen
,
mypid
,
ret
;
char
link
[
LXC_NUMSTRLEN64
]
=
{
0
};
char
link
[
INTTYPE_TO_STRLEN
(
pid_t
)
]
=
{
0
};
ret
=
snprintf
(
path
,
MAXPATHLEN
,
"%s/proc/self"
,
rootfs
);
ret
=
snprintf
(
path
,
MAXPATHLEN
,
"%s/proc/self"
,
rootfs
);
if
(
ret
<
0
||
ret
>=
MAXPATHLEN
)
{
if
(
ret
<
0
||
ret
>=
MAXPATHLEN
)
{
...
@@ -1158,7 +1158,7 @@ int lxc_mount_proc_if_needed(const char *rootfs)
...
@@ -1158,7 +1158,7 @@ int lxc_mount_proc_if_needed(const char *rootfs)
return
-
1
;
return
-
1
;
}
}
linklen
=
readlink
(
path
,
link
,
LXC_NUMSTRLEN64
);
linklen
=
readlink
(
path
,
link
,
INTTYPE_TO_STRLEN
(
pid_t
)
);
ret
=
snprintf
(
path
,
MAXPATHLEN
,
"%s/proc"
,
rootfs
);
ret
=
snprintf
(
path
,
MAXPATHLEN
,
"%s/proc"
,
rootfs
);
if
(
ret
<
0
||
ret
>=
MAXPATHLEN
)
{
if
(
ret
<
0
||
ret
>=
MAXPATHLEN
)
{
...
@@ -1172,7 +1172,7 @@ int lxc_mount_proc_if_needed(const char *rootfs)
...
@@ -1172,7 +1172,7 @@ int lxc_mount_proc_if_needed(const char *rootfs)
return
-
1
;
return
-
1
;
goto
domount
;
goto
domount
;
}
else
if
(
linklen
>=
LXC_NUMSTRLEN64
)
{
}
else
if
(
linklen
>=
INTTYPE_TO_STRLEN
(
pid_t
)
)
{
link
[
linklen
-
1
]
=
'\0'
;
link
[
linklen
-
1
]
=
'\0'
;
ERROR
(
"readlink returned truncated content:
\"
%s
\"
"
,
link
);
ERROR
(
"readlink returned truncated content:
\"
%s
\"
"
,
link
);
return
-
1
;
return
-
1
;
...
@@ -1253,7 +1253,7 @@ int null_stdfds(void)
...
@@ -1253,7 +1253,7 @@ int null_stdfds(void)
/* Check whether a signal is blocked by a process. */
/* Check whether a signal is blocked by a process. */
/* /proc/pid-to-str/status\0 = (5 + 21 + 7 + 1) */
/* /proc/pid-to-str/status\0 = (5 + 21 + 7 + 1) */
#define __PROC_STATUS_LEN (6 +
(LXC_NUMSTRLEN64
) + 7 + 1)
#define __PROC_STATUS_LEN (6 +
INTTYPE_TO_STRLEN(pid_t
) + 7 + 1)
bool
task_blocks_signal
(
pid_t
pid
,
int
signal
)
bool
task_blocks_signal
(
pid_t
pid
,
int
signal
)
{
{
int
ret
;
int
ret
;
...
...
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