File 0001-utils-add-LXC_PROC_PID_FD_LEN.patch of Package lxc.8553
From aa769a272f24d34d9190e04b7c6e93a6b8418376 Mon Sep 17 00:00:00 2001 From: Christian Brauner <christian.brauner@ubuntu.com> Date: Fri, 4 May 2018 11:59:11 +0200 Subject: [PATCH] utils: add LXC_PROC_PID_FD_LEN Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> --- src/lxc/utils.h | 11 +++++++++++ 1 file changed, 11 insertions(+) Index: lxc-2.0.9/src/lxc/utils.h =================================================================== --- lxc-2.0.9.orig/src/lxc/utils.h +++ lxc-2.0.9/src/lxc/utils.h @@ -52,6 +52,18 @@ #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); extern int get_u16(unsigned short *val, const char *arg, int base);