[lxc-devel] [PATCH 3/5] Move declarations of some constants to where they are needed.

Serge Hallyn serge.hallyn at ubuntu.com
Mon May 20 18:32:33 UTC 2013


Quoting Christian Seiler (christian at iwakd.de):
> Signed-off-by: Christian Seiler <christian at iwakd.de>

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

> ---
>  src/lxc/bdev.h |   26 ++++++++++++++++++++++++++
>  src/lxc/conf.c |   24 ------------------------
>  2 files changed, 26 insertions(+), 24 deletions(-)
> 
> diff --git a/src/lxc/bdev.h b/src/lxc/bdev.h
> index cc03592..d69efd8 100644
> --- a/src/lxc/bdev.h
> +++ b/src/lxc/bdev.h
> @@ -54,4 +54,30 @@ struct bdev *bdev_copy(const char *src, const char *oldname, const char *cname,
>  			const char *oldpath, const char *lxcpath, const char *bdevtype,
>  			int snap, const char *bdevdata, unsigned long newsize);
>  void bdev_put(struct bdev *bdev);
> +
> +/* define constants if the kernel/glibc headers don't define them */
> +#ifndef MS_DIRSYNC
> +#define MS_DIRSYNC  128
> +#endif
> +
> +#ifndef MS_REC
> +#define MS_REC 16384
> +#endif
> +
> +#ifndef MNT_DETACH
> +#define MNT_DETACH 2
> +#endif
> +
> +#ifndef MS_SLAVE
> +#define MS_SLAVE (1<<19)
> +#endif
> +
> +#ifndef MS_RELATIME
> +#define MS_RELATIME (1 << 21)
> +#endif
> +
> +#ifndef MS_STRICTATIME
> +#define MS_STRICTATIME (1 << 24)
> +#endif
> +
>  #endif
> diff --git a/src/lxc/conf.c b/src/lxc/conf.c
> index a38015d..a1aee14 100644
> --- a/src/lxc/conf.c
> +++ b/src/lxc/conf.c
> @@ -93,30 +93,6 @@ lxc_log_define(lxc_conf, lxc);
>  #define MAXMTULEN   16
>  #define MAXLINELEN  128
>  
> -#ifndef MS_DIRSYNC
> -#define MS_DIRSYNC  128
> -#endif
> -
> -#ifndef MS_REC
> -#define MS_REC 16384
> -#endif
> -
> -#ifndef MNT_DETACH
> -#define MNT_DETACH 2
> -#endif
> -
> -#ifndef MS_SLAVE
> -#define MS_SLAVE (1<<19)
> -#endif
> -
> -#ifndef MS_RELATIME
> -#define MS_RELATIME (1 << 21)
> -#endif
> -
> -#ifndef MS_STRICTATIME
> -#define MS_STRICTATIME (1 << 24)
> -#endif
> -
>  #if HAVE_SYS_CAPABILITY_H
>  #ifndef CAP_SETFCAP
>  #define CAP_SETFCAP 31
> -- 
> 1.7.8.6
> 
> 
> ------------------------------------------------------------------------------
> AlienVault Unified Security Management (USM) platform delivers complete
> security visibility with the essential security capabilities. Easily and
> efficiently configure, manage, and operate all of your security controls
> from a single console and one unified framework. Download a free trial.
> http://p.sf.net/sfu/alienvault_d2d
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel




More information about the lxc-devel mailing list