Skip to content
Commit bd6af278 authored by Peter Bigot's avatar Peter Bigot Committed by Carles Cufi
Browse files

subsys/fs/shell: avoid warning about output format truncation

The previous way of creating an absolute path relied on snprintf(), and
when used with newlib gcc warned that the output could be truncated
before the last format character.  Rework to use code that doesn't rely
on snprintf.

See discussion at https://bugzilla.redhat.com/show_bug.cgi?id=1431678



Also ensure that cwd is always NUL-terminated, and use the utility
function to create the absolute path in cmd_trunc.

Signed-off-by: default avatarPeter A. Bigot <pab@pabigot.com>
parent 5fe25910
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment