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
b1401e3f
Unverified
Commit
b1401e3f
authored
Aug 25, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
confile: s/LXC_NUMSTRLEN64/INTTYPE_TO_STRLEN()/
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
660c9191
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
confile.c
src/lxc/confile.c
+7
-9
No files found.
src/lxc/confile.c
View file @
b1401e3f
...
@@ -3052,19 +3052,19 @@ static int get_config_idmaps(const char *key, char *retv, int inlen,
...
@@ -3052,19 +3052,19 @@ static int get_config_idmaps(const char *key, char *retv, int inlen,
* +
* +
* sizeof(" ")
* sizeof(" ")
* +
* +
* sizeof(uint
64
_t)
* sizeof(uint
32
_t)
* +
* +
* sizeof(" ")
* sizeof(" ")
* +
* +
* sizeof(uint
64
_t)
* sizeof(uint
32
_t)
* +
* +
* sizeof(" ")
* sizeof(" ")
* +
* +
* sizeof(uint
64
_t)
* sizeof(uint
32
_t)
* +
* +
* \0
* \0
*/
*/
#define __LXC_IDMAP_STR_BUF (3 *
LXC_NUMSTRLEN64
+ 3 + 1 + 1)
#define __LXC_IDMAP_STR_BUF (3 *
INTTYPE_TO_STRLEN(uint32_t)
+ 3 + 1 + 1)
char
buf
[
__LXC_IDMAP_STR_BUF
];
char
buf
[
__LXC_IDMAP_STR_BUF
];
if
(
!
retv
)
if
(
!
retv
)
...
@@ -3073,8 +3073,7 @@ static int get_config_idmaps(const char *key, char *retv, int inlen,
...
@@ -3073,8 +3073,7 @@ static int get_config_idmaps(const char *key, char *retv, int inlen,
memset
(
retv
,
0
,
inlen
);
memset
(
retv
,
0
,
inlen
);
listlen
=
lxc_list_len
(
&
c
->
id_map
);
listlen
=
lxc_list_len
(
&
c
->
id_map
);
lxc_list_for_each
(
it
,
&
c
->
id_map
)
lxc_list_for_each
(
it
,
&
c
->
id_map
)
{
{
struct
id_map
*
map
=
it
->
elem
;
struct
id_map
*
map
=
it
->
elem
;
ret
=
snprintf
(
buf
,
__LXC_IDMAP_STR_BUF
,
"%c %lu %lu %lu"
,
ret
=
snprintf
(
buf
,
__LXC_IDMAP_STR_BUF
,
"%c %lu %lu %lu"
,
(
map
->
idtype
==
ID_TYPE_UID
)
?
'u'
:
'g'
,
(
map
->
idtype
==
ID_TYPE_UID
)
?
'u'
:
'g'
,
...
@@ -3515,9 +3514,8 @@ static int get_config_prlimit(const char *key, char *retv, int inlen,
...
@@ -3515,9 +3514,8 @@ static int get_config_prlimit(const char *key, char *retv, int inlen,
return
-
1
;
return
-
1
;
lxc_list_for_each
(
it
,
&
c
->
limits
)
{
lxc_list_for_each
(
it
,
&
c
->
limits
)
{
char
buf
[
LXC_NUMSTRLEN64
*
2
+
2
];
/* 2 colon separated 64 bit
/* 2 colon separated 64 bit integers or the word 'unlimited' */
integers or the word
char
buf
[
INTTYPE_TO_STRLEN
(
uint64_t
)
*
2
+
2
];
'unlimited' */
int
partlen
;
int
partlen
;
struct
lxc_limit
*
lim
=
it
->
elem
;
struct
lxc_limit
*
lim
=
it
->
elem
;
...
...
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