Commit eb85374e authored by Tomasz Bursztyka's avatar Tomasz Bursztyka Committed by Fabio Baltieri
Browse files

shell: Fix device name lookup buffer size



It is actually easy to have device name going beyond 20 characters.
There is a maximum defined internally, better using it.

Signed-off-by: default avatarTomasz Bursztyka <tobu@bang-olufsen.dk>
parent e7d59641
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ static int cmd_device_list(const struct shell *sh,
	shell_fprintf(sh, SHELL_NORMAL, "devices:\n");

	for (dev = devlist; dev < devlist_end; dev++) {
		char buf[20];
		char buf[Z_DEVICE_MAX_NAME_LEN];
		const char *name = get_device_name(dev, buf, sizeof(buf));
		const char *state = "READY";
		int usage;