Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f65fb1e authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

greybus: lsgb: Minor tweaks



Make it executable on an Android system
Change layout to be show heirachy a bit better.

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 7c154711
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
#!/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() {