From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wi0-f178.google.com ([209.85.212.178]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1SYzIG-00089k-IS for ptxdist@pengutronix.de; Mon, 28 May 2012 14:43:57 +0200 Received: by wibhn6 with SMTP id hn6so1222244wib.7 for ; Mon, 28 May 2012 05:43:22 -0700 (PDT) From: "Bart vdr. Meulen" Date: Mon, 28 May 2012 14:42:29 +0200 Message-Id: <1338208981-8681-3-git-send-email-bartvdrmeulen@gmail.com> Subject: [ptxdist] [PATCH] oprofile: Add patch to use busybox icm opcontrol Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de From: "Bart vdr. Meulen" When using busybox wc the '-m' (count chars) option is not supported, use the '-c' (count bytes) option which gives the same count result, in this case because non-unicode characters are counted Signed-off-by: Bart vdr. Meulen --- .../001-make-opcontrol-busybox-compatible.patch | 24 ++++++++++++++++++++ patches/oprofile-0.9.6/series | 1 + 2 files changed, 25 insertions(+) create mode 100644 patches/oprofile-0.9.6/001-make-opcontrol-busybox-compatible.patch create mode 100644 patches/oprofile-0.9.6/series diff --git a/patches/oprofile-0.9.6/001-make-opcontrol-busybox-compatible.patch b/patches/oprofile-0.9.6/001-make-opcontrol-busybox-compatible.patch new file mode 100644 index 0000000..43f9bd5 --- /dev/null +++ b/patches/oprofile-0.9.6/001-make-opcontrol-busybox-compatible.patch @@ -0,0 +1,24 @@ +Use -c to count characters instead of -m + +When using busybox wc the '-m' (count chars) option is not supported, +use the '-c' (count bytes) option which gives the same count result +in this case because the count is done over non-unicode characters. + +Signed-off-by: Bart vdr. Meulen +--- + utils/opcontrol | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: oprofile-0.9.6/utils/opcontrol +=================================================================== +--- oprofile-0.9.6.orig/utils/opcontrol ++++ oprofile-0.9.6/utils/opcontrol +@@ -1240,7 +1240,7 @@ check_event_mapping_data() + fi + fi + fi +- len=`echo -n $event_num | wc -m` ++ len=`echo -n $event_num | wc -c` + num_chars_in_grpid=`expr $len - 2` + GRP_NUM_VAL=`echo | awk '{print substr("'"${event_num}"'",1,"'"${num_chars_in_grpid}"'")}'` + if [ "$GRP_NUM_CK_VAL" = "" ] ; then diff --git a/patches/oprofile-0.9.6/series b/patches/oprofile-0.9.6/series new file mode 100644 index 0000000..1dbb427 --- /dev/null +++ b/patches/oprofile-0.9.6/series @@ -0,0 +1 @@ +001-make-opcontrol-busybox-compatible.patch -- 1.7.9.5 -- ptxdist mailing list ptxdist@pengutronix.de