From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753990Ab3JRMah (ORCPT ); Fri, 18 Oct 2013 08:30:37 -0400 Received: from mga02.intel.com ([134.134.136.20]:27758 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753902Ab3JRMaf (ORCPT ); Fri, 18 Oct 2013 08:30:35 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.93,522,1378882800"; d="scan'208";a="394936390" From: Adrian Hunter To: Arnaldo Carvalho de Melo Cc: Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, David Ahern , Frederic Weisbecker , Jiri Olsa , Mike Galbraith , Namhyung Kim , Paul Mackerras , Stephane Eranian Subject: [PATCH 03/19] perf record: Improve write_output error message Date: Fri, 18 Oct 2013 15:29:00 +0300 Message-Id: <1382099356-4918-4-git-send-email-adrian.hunter@intel.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1382099356-4918-1-git-send-email-adrian.hunter@intel.com> References: <1382099356-4918-1-git-send-email-adrian.hunter@intel.com> Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Improve the error message from write_output() to say what failed to write and give the error number. Signed-off-by: Adrian Hunter --- tools/perf/builtin-record.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 92ca541..d269dfa 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@ -88,7 +88,7 @@ static int write_output(struct perf_record *rec, void *buf, size_t size) int ret = write(rec->output, buf, size); if (ret < 0) { - pr_err("failed to write\n"); + pr_err("failed to write perf data, error: %m\n"); return -1; } -- 1.7.11.7