]> 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>
Sun, 5 Aug 2018 15:42:02 +0000 (17:42 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/utils.h

index a2bad89dbea58b849d2249b68bfd0bb2b387e567..e4d8519dbefc30c4383b79d4042f217e26e39f90 100644 (file)
 #define LXC_NUMSTRLEN64 21
 #define LXC_LINELEN 4096
 #define LXC_IDMAPLEN 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(char *path, const char *exclude);