perf header: Ensure read/write finished successfully
authorNamhyung Kim <namhyung.kim@lge.com>
Mon, 17 Dec 2012 06:38:54 +0000 (15:38 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 24 Jan 2013 19:40:11 +0000 (16:40 -0300)
commit5323f60c7578e9ddc92d1ca8a2d7b08284624cd1
tree90e1f5e48c55dec263502ca5707ad6dbb80a7541
parent000ae33fdb5ff7bc7ae985b43e6278024a4985c2
perf header: Ensure read/write finished successfully

Use readn instead of read and check return value of do_write.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Suggested-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1355726345-29553-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/header.c