From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1428454AbdDXVLv (ORCPT ); Mon, 24 Apr 2017 17:11:51 -0400 Received: from terminus.zytor.com ([65.50.211.136]:52803 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938747AbdDXVLn (ORCPT ); Mon, 24 Apr 2017 17:11:43 -0400 Date: Mon, 24 Apr 2017 14:10:33 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, acme@redhat.com, mingo@kernel.org, hpa@zytor.com Reply-To: tglx@linutronix.de, linux-kernel@vger.kernel.org, acme@redhat.com, mingo@kernel.org, hpa@zytor.com To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf tools: Add compress.h for the *_decompress_to_file() headers Git-Commit-ID: 611f0afee0e87eb6d184e7f58aa20d18d291d169 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 611f0afee0e87eb6d184e7f58aa20d18d291d169 Gitweb: http://git.kernel.org/tip/611f0afee0e87eb6d184e7f58aa20d18d291d169 Author: Arnaldo Carvalho de Melo AuthorDate: Wed, 19 Apr 2017 16:29:38 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 24 Apr 2017 12:33:33 -0300 perf tools: Add compress.h for the *_decompress_to_file() headers Out of util.h, the implementations were already in separate files, that are built conditionally. Link: http://lkml.kernel.org/n/tip-0ur7szxsb59f8758kfe63prb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/compress.h | 12 ++++++++++++ tools/perf/util/dso.c | 1 + tools/perf/util/lzma.c | 1 + tools/perf/util/util.h | 8 -------- tools/perf/util/zlib.c | 1 + 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/tools/perf/util/compress.h b/tools/perf/util/compress.h new file mode 100644 index 0000000..67fd1bb --- /dev/null +++ b/tools/perf/util/compress.h @@ -0,0 +1,12 @@ +#ifndef PERF_COMPRESS_H +#define PERF_COMPRESS_H + +#ifdef HAVE_ZLIB_SUPPORT +int gzip_decompress_to_file(const char *input, int output_fd); +#endif + +#ifdef HAVE_LZMA_SUPPORT +int lzma_decompress_to_file(const char *input, int output_fd); +#endif + +#endif /* PERF_COMPRESS_H */ diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index cbfe17f..3339ab7 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c @@ -3,6 +3,7 @@ #include #include #include +#include "compress.h" #include "path.h" #include "symbol.h" #include "dso.h" diff --git a/tools/perf/util/lzma.c b/tools/perf/util/lzma.c index 5b73b26..4ca7c5c 100644 --- a/tools/perf/util/lzma.c +++ b/tools/perf/util/lzma.c @@ -2,6 +2,7 @@ #include #include #include +#include "compress.h" #include "util.h" #include "debug.h" diff --git a/tools/perf/util/util.h b/tools/perf/util/util.h index 07c4293..5dea8a9 100644 --- a/tools/perf/util/util.h +++ b/tools/perf/util/util.h @@ -99,14 +99,6 @@ void mem_bswap_32(void *src, int byte_size); bool find_process(const char *name); -#ifdef HAVE_ZLIB_SUPPORT -int gzip_decompress_to_file(const char *input, int output_fd); -#endif - -#ifdef HAVE_LZMA_SUPPORT -int lzma_decompress_to_file(const char *input, int output_fd); -#endif - int get_stack_size(const char *str, unsigned long *_size); int fetch_kernel_version(unsigned int *puint, diff --git a/tools/perf/util/zlib.c b/tools/perf/util/zlib.c index 495a449..1329d84 100644 --- a/tools/perf/util/zlib.c +++ b/tools/perf/util/zlib.c @@ -4,6 +4,7 @@ #include #include +#include "util/compress.h" #include "util/util.h" #include "util/debug.h"