1 Star 0 Fork 44

gaohuatao/lxc

forked from src-openEuler/lxc 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0031-head-file-remove-macro-HAVE_ISULAD-in-installed-head.patch 3.95 KB
一键复制 编辑 原始数据 按行查看 历史
lifeng_isula 提交于 2020-04-23 11:50 . lxc: update lxc to 4.0.1
From 5065f006a775e345fa80c1250442ff0f5c05383f Mon Sep 17 00:00:00 2001
From: LiFeng <[email protected]>
Date: Wed, 15 Apr 2020 17:46:54 +0800
Subject: [PATCH 31/49] head file: remove macro HAVE_ISULAD in installed head
file
Signed-off-by: LiFeng <[email protected]>
---
src/lxc/attach_options.h | 25 ++-----------------------
src/lxc/lxccontainer.h | 6 ------
2 files changed, 2 insertions(+), 29 deletions(-)
diff --git a/src/lxc/attach_options.h b/src/lxc/attach_options.h
index 7b0ea5e..5f01739 100644
--- a/src/lxc/attach_options.h
+++ b/src/lxc/attach_options.h
@@ -113,15 +113,12 @@ typedef struct lxc_attach_options_t {
/*! File descriptor to log output. */
int log_fd;
-#ifdef HAVE_ISULAD
+
char *init_fifo[3]; /* isulad: default fifos for the start */
int64_t timeout;/* isulad: Seconds for waiting on a container to attach/exec before it is killed*/
const char *suffix;
-#endif
-
} lxc_attach_options_t;
-#ifdef HAVE_ISULAD
/*! Default attach options to use */
#define LXC_ATTACH_OPTIONS_DEFAULT \
{ \
@@ -140,25 +137,7 @@ typedef struct lxc_attach_options_t {
/* .log_fd = */ -EBADF, \
/* .init_fifo = */ {NULL, NULL, NULL}, \
}
-#else
-/*! Default attach options to use */
-#define LXC_ATTACH_OPTIONS_DEFAULT \
- { \
- /* .attach_flags = */ LXC_ATTACH_DEFAULT, \
- /* .namespaces = */ -1, \
- /* .personality = */ -1, \
- /* .initial_cwd = */ NULL, \
- /* .uid = */ (uid_t)-1, \
- /* .gid = */ (gid_t)-1, \
- /* .env_policy = */ LXC_ATTACH_KEEP_ENV, \
- /* .extra_env_vars = */ NULL, \
- /* .extra_keep_env = */ NULL, \
- /* .stdin_fd = */ 0, \
- /* .stdout_fd = */ 1, \
- /* .stderr_fd = */ 2, \
- /* .log_fd = */ -EBADF, \
- }
-#endif
+
/*!
* Representation of a command to run in a container.
*/
diff --git a/src/lxc/lxccontainer.h b/src/lxc/lxccontainer.h
index e69be8f..6ede70c 100644
--- a/src/lxc/lxccontainer.h
+++ b/src/lxc/lxccontainer.h
@@ -107,7 +107,6 @@ struct lxc_container {
/*! Full path to configuration file */
char *config_path;
-#ifdef HAVE_ISULAD
/*! isulad:
* \private
* exit FIFO File to open used monitor the state of lxc monitor process.
@@ -125,7 +124,6 @@ struct lxc_container {
* full path of json file
* */
char *ocihookfile;
-#endif
/*!
* \brief Determine if \c /var/lib/lxc/$name/config exists.
@@ -886,7 +884,6 @@ struct lxc_container {
*/
int (*init_pidfd)(struct lxc_container *c);
-#ifdef HAVE_ISULAD
/*! isulad add
* \brief An API call to set the path of info file
*
@@ -963,7 +960,6 @@ struct lxc_container {
* \return \c true on success, else \c false.
*/
bool (*get_container_pids)(struct lxc_container *c,pid_t **pids,size_t *pids_len);
-#endif
};
/*!
@@ -1097,7 +1093,6 @@ struct lxc_console_log {
*/
struct lxc_container *lxc_container_new(const char *name, const char *configpath);
-#ifdef HAVE_ISULAD
/*!
* \brief Create a new container without loading config.
*
@@ -1109,7 +1104,6 @@ struct lxc_container *lxc_container_new(const char *name, const char *configpath
* \note This function can only used for listing container.
*/
struct lxc_container *lxc_container_without_config_new(const char *name, const char *configpath);
-#endif
/*!
* \brief Add a reference to the specified container.
--
1.8.3.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gaohuatao/lxc.git
[email protected]:gaohuatao/lxc.git
gaohuatao
lxc
lxc
master

搜索帮助