]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
utils: add LXC_PROC_PID_FD_LEN
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 4 May 2018 09:59:11 +0000 (11:59 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 4 May 2018 09:59:11 +0000 (11:59 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/utils.h

index b15076cbd5abf3f68c65a87081725e5af34afdca..62f087311ccfa3b2f747bffe9fe87be3e2c80eb7 100644 (file)
 #define LXC_LINELEN 4096
 #define LXC_IDMAPLEN 4096
 #define LXC_MAX_BUFFER 4096
+/* /proc/       =    6
+ *                +
+ * <pid-as-str> =   LXC_NUMSTRLEN64
+ *                +
+ * /fd/         =    4
+ *                +
+ * <fd-as-str>  =   LXC_NUMSTRLEN64
+ *                +
+ * \0           =    1
+ */
+#define LXC_PROC_PID_FD_LEN (6 + LXC_NUMSTRLEN64 + 4 + LXC_NUMSTRLEN64 + 1)
 
 /* returns 1 on success, 0 if there were any failures */
 extern int lxc_rmdir_onedev(const char *path, const char *exclude);