diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2017-07-24 12:49:43 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2017-07-24 12:49:43 +1000 |
commit | ee0feeed38405aa7d5c231709a3712345b9aaca9 (patch) | |
tree | 7e361d08f35c49ce80049074d66e342c518f2e6c /tools/perf/util/util.h | |
parent | 2670f12406e73e07a889c6167cb59c19664a53ab (diff) | |
parent | 6602ec8ef2244e2d75d2a3b2e10f09469b9e319f (diff) |
Merge remote-tracking branch 'tip/auto-latest'
Diffstat (limited to 'tools/perf/util/util.h')
-rw-r--r-- | tools/perf/util/util.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 2c9e58a45310..b136c271125f 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -12,6 +12,7 @@ #include <stdarg.h> #include <linux/compiler.h> #include <linux/types.h> +#include "namespaces.h" /* General helper functions */ void usage(const char *err) __noreturn; @@ -33,10 +34,11 @@ struct strlist *lsdir(const char *name, bool (*filter)(const char *, struct dire bool lsdir_no_dot_filter(const char *name, struct dirent *d); int copyfile(const char *from, const char *to); int copyfile_mode(const char *from, const char *to, mode_t mode); +int copyfile_ns(const char *from, const char *to, struct nsinfo *nsi); int copyfile_offset(int fromfd, loff_t from_ofs, int tofd, loff_t to_ofs, u64 size); ssize_t readn(int fd, void *buf, size_t n); -ssize_t writen(int fd, void *buf, size_t n); +ssize_t writen(int fd, const void *buf, size_t n); size_t hex_width(u64 v); int hex2u64(const char *ptr, u64 *val); @@ -58,4 +60,8 @@ const char *perf_tip(const char *dirpath); int sched_getcpu(void); #endif +#ifndef HAVE_SETNS_SUPPORT +int setns(int fd, int nstype); +#endif + #endif /* GIT_COMPAT_UTIL_H */ |