From df01b1937a142c311327da065de90d6574e99000 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Fri, 12 Nov 2021 13:46:03 +0100 Subject: libusbgx: prevent warning Prevents a warning in 'systemctl status usbg'. Strings in device tree properties are null terminated. sh[354]: /bin/sh: warning: command substitution: ignored null byte in input Signed-off-by: Max Krummenacher --- recipes-support/libusbgx/files/usbg.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-support/libusbgx/files/usbg.service b/recipes-support/libusbgx/files/usbg.service index c9ed582..e6eff12 100644 --- a/recipes-support/libusbgx/files/usbg.service +++ b/recipes-support/libusbgx/files/usbg.service @@ -6,7 +6,7 @@ Before=systemd-networkd.service [Service] Type=oneshot ExecStart=/usr/bin/gadget-import g1 /etc/usbg/g1.schema -ExecStartPost=/bin/sh -c '/bin/echo $((0x4000+$(expr $(cat /proc/device-tree/toradex,product-id) + 0))) > \ +ExecStartPost=/bin/sh -c '/bin/echo $((0x4000+$(expr $(tr -d "\0" < /proc/device-tree/toradex,product-id) + 0))) > \ /sys/kernel/config/usb_gadget/g1/idProduct' ExecStartPost=/bin/sh -c '/bin/cat /proc/device-tree/serial-number > \ /sys/kernel/config/usb_gadget/g1/strings/0x409/serialnumber' -- cgit v1.2.3