macro: move LXC_CMD_DATA_MAX from commands.h

parent c05ad008
...@@ -25,17 +25,15 @@ ...@@ -25,17 +25,15 @@
#define __LXC_COMMANDS_H #define __LXC_COMMANDS_H
#include <stdio.h> #include <stdio.h>
#include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h>
#include "state.h"
#include "lxccontainer.h" #include "lxccontainer.h"
#define LXC_CMD_DATA_MAX (MAXPATHLEN * 2)
/* https://developer.gnome.org/glib/2.28/glib-Type-Conversion-Macros.html */ /* https://developer.gnome.org/glib/2.28/glib-Type-Conversion-Macros.html */
#define INT_TO_PTR(n) ((void *)(long)(n)) #define INT_TO_PTR(n) ((void *)(long)(n))
#define PTR_TO_INT(p) ((int)(long)(p)) #define PTR_TO_INT(p) ((int)(long)(p))
#include "macro.h"
#include "state.h"
typedef enum { typedef enum {
LXC_CMD_CONSOLE, LXC_CMD_CONSOLE,
......
...@@ -122,6 +122,7 @@ ...@@ -122,6 +122,7 @@
#define LXC_PROC_PID_FD_LEN (6 + LXC_NUMSTRLEN64 + 4 + LXC_NUMSTRLEN64 + 1) #define LXC_PROC_PID_FD_LEN (6 + LXC_NUMSTRLEN64 + 4 + LXC_NUMSTRLEN64 + 1)
/* /proc/pid-to-str/status\0 = (5 + 21 + 7 + 1) */ /* /proc/pid-to-str/status\0 = (5 + 21 + 7 + 1) */
#define LXC_PROC_STATUS_LEN (5 + (LXC_NUMSTRLEN64) + 7 + 1) #define LXC_PROC_STATUS_LEN (5 + (LXC_NUMSTRLEN64) + 7 + 1)
#define LXC_CMD_DATA_MAX (MAXPATHLEN * 2)
/* loop devices */ /* loop devices */
#ifndef LO_FLAGS_AUTOCLEAR #ifndef LO_FLAGS_AUTOCLEAR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment