]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
macro: add LXC_PROC_SELF_FD_LEN
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 11 Feb 2021 13:41:02 +0000 (14:41 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 11 Feb 2021 13:44:52 +0000 (14:44 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/macro.h

index 41873dd9a87b07e6d51c9836e026085a3e118e3b..fac4983ee095b9f2ad8f7b9f48eb7a1b5d7d9eef 100644 (file)
 #define LXC_PROC_PID_FD_LEN \
        (6 + INTTYPE_TO_STRLEN(pid_t) + 4 + INTTYPE_TO_STRLEN(int) + 1)
 
+/* /proc/self/fd/ =    14
+ *                   +
+ * <fd-as-str>    =    INTTYPE_TO_STRLEN(int)
+ *                   +
+ * \0           =      1
+ */
+#define LXC_PROC_SELF_FD_LEN (14 + INTTYPE_TO_STRLEN(int) + 1)
+
 /* /proc/        = 6
  *               +
  * <pid-as-str>  = INTTYPE_TO_STRLEN(pid_t)