]> git.proxmox.com Git - mirror_lxcfs.git/commitdiff
src: rely on config.h for fuse version
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 2 Sep 2021 14:48:53 +0000 (16:48 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 2 Sep 2021 15:03:17 +0000 (17:03 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
19 files changed:
src/bindings.c
src/bindings.h
src/cgroup_fuse.c
src/cgroup_fuse.h
src/cgroups/cgfsng.c
src/cgroups/cgroup.c
src/cgroups/cgroup2_devices.c
src/cgroups/cgroup_utils.c
src/lxcfs.c
src/proc_cpuview.c
src/proc_cpuview.h
src/proc_fuse.c
src/proc_fuse.h
src/proc_loadavg.c
src/proc_loadavg.h
src/sysfs_fuse.c
src/sysfs_fuse.h
src/utils.c
src/utils.h

index ccf52e2d5a33ed32c4a301fc23194c1c981b9068..ca08589ab97589953a760bef3f2b6af093b77149 100644 (file)
@@ -6,18 +6,6 @@
 
 #include "config.h"
 
-#ifdef HAVE_FUSE3
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 30
-#endif
-#else
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-#endif
-
-#define _FILE_OFFSET_BITS 64
-
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
index 686df0c2d05d47a7dbf3168d656c76b93104f2f2..e6b12b8a813e9ff73dc44381a4d7b63726b09636 100644 (file)
@@ -3,15 +3,7 @@
 #ifndef __LXCFS_BINDINGS_H
 #define __LXCFS_BINDINGS_H
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-
-#define _FILE_OFFSET_BITS 64
+#include "config.h"
 
 #include <fuse.h>
 #include <linux/types.h>
@@ -24,7 +16,6 @@
 #include <unistd.h>
 
 #include "cgroup_fuse.h"
-#include "config.h"
 #include "macro.h"
 #include "proc_cpuview.h"
 #include "proc_fuse.h"
index 98ef236fe2431e426bc4b5a7f4f1e6e994a1fb50..e29e19de593e3294723e154eda938e853b56140d 100644 (file)
@@ -6,18 +6,6 @@
 
 #include "config.h"
 
-#ifdef HAVE_FUSE3
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 30
-#endif
-#else
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-#endif
-
-#define _FILE_OFFSET_BITS 64
-
 #define __STDC_FORMAT_MACROS
 #include <dirent.h>
 #include <errno.h>
index 4f3d21df6b777791c56db72a23185676ee0df299..f7b82f7d59524b1f06cca01414a5a591bcbc74cc 100644 (file)
@@ -3,15 +3,7 @@
 #ifndef __LXCFS_CGROUP_FUSE_H
 #define __LXCFS_CGROUP_FUSE_H
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-
-#define _FILE_OFFSET_BITS 64
+#include "config.h"
 
 #include <fuse.h>
 #include <stdio.h>
@@ -20,7 +12,6 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "config.h"
 #include "macro.h"
 
 __visible extern int cg_getattr(const char *path, struct stat *sb);
index f80785f9848f400347390be40182661467550a56..eb951b40c6839d08150be0fc95fb70b8982bb751 100644 (file)
 #define _GNU_SOURCE
 #endif
 
-#include "../config.h"
-
-#ifdef HAVE_FUSE3
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 30
-#endif
-#else
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-#endif
-
-#define _FILE_OFFSET_BITS 64
+#include "config.h"
 
 #include <ctype.h>
 #include <dirent.h>
index 26c87aeb063648286c2f06cd4d3c7d5ada1b955d..7aec7aed6a290179dba4fa89a79bd6bb43047a4a 100644 (file)
@@ -4,19 +4,7 @@
 #define _GNU_SOURCE
 #endif
 
-#include "../config.h"
-
-#ifdef HAVE_FUSE3
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 30
-#endif
-#else
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-#endif
-
-#define _FILE_OFFSET_BITS 64
+#include "config.h"
 
 #include <dirent.h>
 #include <errno.h>
index c40b087d130f9559d453db4c6247c3e304d3f5e7..06d258fa15eb32fdae226add2867b11a7f993be7 100644 (file)
@@ -6,19 +6,7 @@
 #define _GNU_SOURCE
 #endif
 
-#include "../config.h"
-
-#ifdef HAVE_FUSE3
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 30
-#endif
-#else
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-#endif
-
-#define _FILE_OFFSET_BITS 64
+#include "config.h"
 
 #include <errno.h>
 #include <fcntl.h>
index 5165a0900f0b382efc7e7a435a1b17ec8edb1d97..82e5250c40f88abc950d85e9fa8fa518985fe6e9 100644 (file)
@@ -4,19 +4,7 @@
 #define _GNU_SOURCE
 #endif
 
-#include "../config.h"
-
-#ifdef HAVE_FUSE3
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 30
-#endif
-#else
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-#endif
-
-#define _FILE_OFFSET_BITS 64
+#include "config.h"
 
 #include <fcntl.h>
 #include <stdarg.h>
index 7861398370f7d5db24a00c5d411686a21a58b5c8..57d139c8537c75047c68336e6f67b5151d5460fa 100644 (file)
@@ -6,18 +6,6 @@
 
 #include "config.h"
 
-#ifdef HAVE_FUSE3
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 30
-#endif
-#else
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-#endif
-
-#define _FILE_OFFSET_BITS 64
-
 #include <alloca.h>
 #include <dirent.h>
 #include <dlfcn.h>
index cbb03757379d14d198d034b046e0bd977603082c..710fb3c2c96e092efd78b4ff414894610f1c56bf 100644 (file)
@@ -6,18 +6,6 @@
 
 #include "config.h"
 
-#ifdef HAVE_FUSE3
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 30
-#endif
-#else
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-#endif
-
-#define _FILE_OFFSET_BITS 64
-
 #define __STDC_FORMAT_MACROS
 #include <dirent.h>
 #include <errno.h>
index 6935d957410abe8fb45abae0365f5c4518843903..2e067b5e8496e99fc9d93bf8dd50f614ebe1720c 100644 (file)
@@ -3,22 +3,13 @@
 #ifndef __LXCFS_PROC_CPUVIEW_FUSE_H
 #define __LXCFS_PROC_CPUVIEW_FUSE_H
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-
-#define _FILE_OFFSET_BITS 64
+#include "config.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "config.h"
 #include "macro.h"
 
 struct cpuacct_usage {
index bb7be96afae29d1700adc98d9c257a8993822a1a..1f44e1028d646a760b2a75d41f4b47a08ca7d145 100644 (file)
@@ -6,18 +6,6 @@
 
 #include "config.h"
 
-#ifdef HAVE_FUSE3
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 30
-#endif
-#else
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-#endif
-
-#define _FILE_OFFSET_BITS 64
-
 #define __STDC_FORMAT_MACROS
 #include <dirent.h>
 #include <errno.h>
index f6960853fa534312f7ead5fc0dd2c887c66b4b2e..72615b6c36ba26c318d4b886bd5f0bb1bed70bb8 100644 (file)
@@ -3,15 +3,8 @@
 #ifndef __LXCFS_PROC_FUSE_H
 #define __LXCFS_PROC_FUSE_H
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
+#include "config.h"
 
-#define _FILE_OFFSET_BITS 64
 
 #include <fuse.h>
 #include <stdio.h>
@@ -20,7 +13,6 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "config.h"
 #include "macro.h"
 
 __visible extern int proc_getattr(const char *path, struct stat *sb);
index ca90b06a1aad0eb1b9e73c6d6c440793a6af38b2..54ccbb7177c54291e98caf2e073a51863f9905d7 100644 (file)
@@ -6,18 +6,6 @@
 
 #include "config.h"
 
-#ifdef HAVE_FUSE3
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 30
-#endif
-#else
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-#endif
-
-#define _FILE_OFFSET_BITS 64
-
 #define __STDC_FORMAT_MACROS
 #include <dirent.h>
 #include <errno.h>
index 34b61babd98299ba35ce6bc8e8a86691f0dd61bc..db87ca89a1002002360584943a49db30f520ebee 100644 (file)
@@ -3,15 +3,7 @@
 #ifndef __LXCFS_PROC_LOADAVG_FUSE_H
 #define __LXCFS_PROC_LOADAVG_FUSE_H
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-
-#define _FILE_OFFSET_BITS 64
+#include "config.h"
 
 #include <fuse.h>
 #include <stdio.h>
@@ -20,7 +12,6 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "config.h"
 #include "macro.h"
 
 __visible extern pthread_t load_daemon(int load_use);
index 4c74db7444670955e80cb950abc93d9098585b80..9da456f1e0f76d6408675638a53b18d7bb098cdc 100644 (file)
@@ -6,23 +6,11 @@
 
 #include "config.h"
 
-#ifdef HAVE_FUSE3
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 30
-#endif
-#else
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-#endif
-
 /* Taken over modified from the kernel sources. */
 #define NBITS 32 /* bits in uint32_t */
 #define DIV_ROUND_UP(n, d) (((n) + (d)-1) / (d))
 #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, NBITS)
 
-#define _FILE_OFFSET_BITS 64
-
 #define __STDC_FORMAT_MACROS
 #include <ctype.h>
 #include <dirent.h>
index 592e8ecb7be1de9912efc8723a42b998b7723150..a4908fe517a7d53896cb1e8a259b49aaa5b7517f 100644 (file)
@@ -3,24 +3,14 @@
 #ifndef __LXCFS_SYSFS_FUSE_H
 #define __LXCFS_SYSFS_FUSE_H
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-
-#define _FILE_OFFSET_BITS 64
+#include "config.h"
 
-#include <fuse.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
 
-#include "config.h"
 #include "macro.h"
 
 __visible extern int sys_getattr(const char *path, struct stat *sb);
index 65629eb6850c35118b66e338e103508bf952fa9d..0e23bbba07da41674f215fc663ff27b87cf00697 100644 (file)
@@ -6,18 +6,7 @@
 
 #include "config.h"
 
-#ifdef HAVE_FUSE3
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 30
-#endif
-#else
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-#endif
-
 #define _FILE_OFFSET_BITS 64
-
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
index c8f31e9caabda25805ed6f70bf8e1038e49d3702..04eedbe73e0915b0d1b9010d2927e9e855f7a52d 100644 (file)
@@ -3,15 +3,7 @@
 #ifndef __LXCFS_UTILS_H
 #define __LXCFS_UTILS_H
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#ifndef FUSE_USE_VERSION
-#define FUSE_USE_VERSION 26
-#endif
-
-#define _FILE_OFFSET_BITS 64
+#include "config.h"
 
 #include <fuse.h>
 #include <signal.h>
@@ -22,7 +14,6 @@
 #include <sys/syscall.h>
 #include <unistd.h>
 
-#include "config.h"
 #include "macro.h"
 #include "syscall_numbers.h"