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
2ea479c9
Unverified
Commit
2ea479c9
authored
Oct 18, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
confile_utils: add lxc_get_conf_uint64()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
6222c3f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
confile_utils.c
src/lxc/confile_utils.c
+10
-0
confile_utils.h
src/lxc/confile_utils.h
+2
-0
No files found.
src/lxc/confile_utils.c
View file @
2ea479c9
...
@@ -672,6 +672,16 @@ int lxc_get_conf_int(struct lxc_conf *c, char *retv, int inlen, int v)
...
@@ -672,6 +672,16 @@ int lxc_get_conf_int(struct lxc_conf *c, char *retv, int inlen, int v)
return
snprintf
(
retv
,
inlen
,
"%d"
,
v
);
return
snprintf
(
retv
,
inlen
,
"%d"
,
v
);
}
}
int
lxc_get_conf_uint64
(
struct
lxc_conf
*
c
,
char
*
retv
,
int
inlen
,
uint64_t
v
)
{
if
(
!
retv
)
inlen
=
0
;
else
memset
(
retv
,
0
,
inlen
);
return
snprintf
(
retv
,
inlen
,
"%"
PRIu64
,
v
);
}
bool
parse_limit_value
(
const
char
**
value
,
rlim_t
*
res
)
bool
parse_limit_value
(
const
char
**
value
,
rlim_t
*
res
)
{
{
char
*
endptr
=
NULL
;
char
*
endptr
=
NULL
;
...
...
src/lxc/confile_utils.h
View file @
2ea479c9
...
@@ -84,5 +84,7 @@ extern void update_hwaddr(const char *line);
...
@@ -84,5 +84,7 @@ extern void update_hwaddr(const char *line);
extern
bool
new_hwaddr
(
char
*
hwaddr
);
extern
bool
new_hwaddr
(
char
*
hwaddr
);
extern
int
lxc_get_conf_str
(
char
*
retv
,
int
inlen
,
const
char
*
value
);
extern
int
lxc_get_conf_str
(
char
*
retv
,
int
inlen
,
const
char
*
value
);
extern
int
lxc_get_conf_int
(
struct
lxc_conf
*
c
,
char
*
retv
,
int
inlen
,
int
v
);
extern
int
lxc_get_conf_int
(
struct
lxc_conf
*
c
,
char
*
retv
,
int
inlen
,
int
v
);
extern
int
lxc_get_conf_uint64
(
struct
lxc_conf
*
c
,
char
*
retv
,
int
inlen
,
uint64_t
v
);
extern
bool
parse_limit_value
(
const
char
**
value
,
rlim_t
*
res
);
extern
bool
parse_limit_value
(
const
char
**
value
,
rlim_t
*
res
);
#endif
/* __LXC_CONFILE_UTILS_H */
#endif
/* __LXC_CONFILE_UTILS_H */
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