From 0f65fb1ea268a7268ab97a92d172d26d960a5d92 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 22 Jan 2016 18:26:23 -0800 Subject: [PATCH] greybus: lsgb: Minor tweaks Make it executable on an Android system Change layout to be show heirachy a bit better. Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/lsgb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/staging/greybus/lsgb b/drivers/staging/greybus/lsgb index 4fb30d2..2d84169 100755 --- a/drivers/staging/greybus/lsgb +++ b/drivers/staging/greybus/lsgb @@ -1,4 +1,4 @@ -#!/bin/sh +#!/system/bin/sh # # 'ls greybus' # @@ -44,8 +44,8 @@ print_interface() { local serial=`cat serial_number` local vs=`cat vendor_string` local ps=`cat product_string` - printf "Interface: %s %s:%s ver:%s \"%s\" \"%s\"\n"\ - ${iid} ${vid} ${pid} ${version} "${vs}" "${ps}" + printf " Intf %02d %s:%s %s %s v%s\n" \ + ${iid} ${vid} ${pid} "${vs}" "${ps}" ${version} } print_bundle() { @@ -101,17 +101,19 @@ print_bundle() { "0xff" ) class_type="Vendor" ;; esac - printf " Bundle: %s %s (%s)\n" ${id} ${class_type} ${class} + printf " Bundle %02d Class %s (%s)\n" ${id} ${class} ${class_type} } print_svc() { local devname=$1 - printf " SVC: ${devname}\n" + local bus=`cat uevent | grep BUS | cut -f 2 -d '='` + printf " SVC %02d\n" ${bus} } print_host_device() { local devname=$1 - printf " Host: ${devname}\n" + local bus=`cat uevent | grep BUS | cut -f 2 -d '='` + printf "Bus %02d\n" ${bus} } print_unknown() { -- 2.7.4