]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
perf namespaces: Move the conditional setns() prototype to namespaces.h
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 5 Jul 2019 16:59:06 +0000 (13:59 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 9 Jul 2019 13:13:26 +0000 (10:13 -0300)
Out of util.h, to reduce its scope, and since we have a namespaces.h
header, much better to have it there, where it is related to.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-zlu81bbtccuzygh7m8nmgybc@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/namespaces.h
tools/perf/util/setns.c
tools/perf/util/util.h

index 15a5a276c478951af8a9f1ac63d73b0b3fcf6360..004430c0de938b8ae334a90ed12046870bac7f97 100644 (file)
 #include <linux/refcount.h>
 #include <linux/types.h>
 
+#ifndef HAVE_SETNS_SUPPORT
+int setns(int fd, int nstype);
+#endif
+
 struct namespaces_event;
 
 struct namespaces {
index ce8fc290fce8783f6e3a24beac8e3f0dcd7d2a79..48f9c0af63b213722bf746e5a3afdb2799a4b27a 100644 (file)
@@ -1,4 +1,6 @@
-#include "util.h"
+// SPDX-License-Identifier: LGPL-2.1
+
+#include "namespaces.h"
 #include <unistd.h>
 #include <sys/syscall.h>
 
index 125e215dd3d80fb2fb5b6c77e8879cc45a15ce39..59fe337080903cb53abb19af722d28068a8078b8 100644 (file)
@@ -67,10 +67,6 @@ char *get_current_dir_name(void);
 int sched_getcpu(void);
 #endif
 
-#ifndef HAVE_SETNS_SUPPORT
-int setns(int fd, int nstype);
-#endif
-
 extern bool perf_singlethreaded;
 
 void perf_set_singlethreaded(void);