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
0c5ea884
Unverified
Commit
0c5ea884
authored
Aug 25, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macro: final INTTYPE_TO_STRLEN() related cleanups
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
84226232
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
macro.h
src/lxc/macro.h
+10
-7
No files found.
src/lxc/macro.h
View file @
0c5ea884
...
@@ -121,26 +121,29 @@
...
@@ -121,26 +121,29 @@
: sizeof(int[-2 * (sizeof(type) > 8)])))
: sizeof(int[-2 * (sizeof(type) > 8)])))
/* Useful macros */
/* Useful macros */
/* Maximum number for 64 bit integer is a string with 21 digits: 2^64 - 1 = 21 */
#define LXC_NUMSTRLEN64 INTTYPE_TO_STRLEN(int64_t)
#define LXC_LINELEN 4096
#define LXC_LINELEN 4096
#define LXC_IDMAPLEN 4096
#define LXC_IDMAPLEN 4096
#define LXC_MAX_BUFFER 4096
#define LXC_MAX_BUFFER 4096
/* /proc/ = 6
/* /proc/ = 6
* +
* +
* <pid-as-str> =
LXC_NUMSTRLEN64
* <pid-as-str> =
INTTYPE_TO_STRLEN(pid_t)
* +
* +
* /fd/ = 4
* /fd/ = 4
* +
* +
* <fd-as-str> =
LXC_NUMSTRLEN64
* <fd-as-str> =
INTTYPE_TO_STRLEN(int)
* +
* +
* \0 = 1
* \0 = 1
*/
*/
#define LXC_PROC_PID_FD_LEN (6 + INTTYPE_TO_STRLEN(pid_t) + 4 + INTTYPE_TO_STRLEN(int) + 1)
#define LXC_PROC_PID_FD_LEN (6 + INTTYPE_TO_STRLEN(pid_t) + 4 + INTTYPE_TO_STRLEN(int) + 1)
/* /proc/pid-to-str/status\0 = (5 + 21 + 7 + 1) */
#define LXC_PROC_STATUS_LEN (5 + (INTTYPE_TO_STRLEN(pid_t)) + 7 + 1)
/* /proc/pid-to-str/status\0 = (5 + INTTYPE_TO_STRLEN(pid_t) + 7 + 1) */
#define LXC_PROC_STATUS_LEN (5 + INTTYPE_TO_STRLEN(pid_t) + 7 + 1)
/* /proc/pid-to-str/attr/current = (5 + INTTYPE_TO_STRLEN(pid_t) + 7 + 1) */
#define LXC_LSMATTRLEN (5 + INTTYPE_TO_STRLEN(pid_t) + 7 + 1)
#define LXC_CMD_DATA_MAX (MAXPATHLEN * 2)
#define LXC_CMD_DATA_MAX (MAXPATHLEN * 2)
#define LXC_LSMATTRLEN (5 + (INTTYPE_TO_STRLEN(pid_t)) + 7 + 1)
/* loop devices */
/* loop devices */
#ifndef LO_FLAGS_AUTOCLEAR
#ifndef LO_FLAGS_AUTOCLEAR
...
...
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