bbfdm/test/files/usr/libexec/rpcd/proxd
Amin Ben Ramdhane 080f7b4f85 Ticket refs #7333: fix warnings, code analysis and clean up the code
- Fix all errors catched by cppcheck threadsafety (cppcheck --error-exitcode=0 --addon=threadsafety bbf)
 - Fix some errors catched by cppcheck cert (cppcheck --error-exitcode=0 --addon=cert bbf)
 - Add new str-protected macros instead of using str functions directly to avoid crashes
2022-02-16 10:33:59 +00:00

25 lines
582 B
Bash
Executable file

#!/bin/sh
. /usr/share/libubox/jshn.sh
case "$1" in
list)
echo '{ "list" : {}, "get": {"path":"str"}}'
;;
call)
case "$2" in
list)
cat /tmp/proxd.data 2>/dev/null
;;
get)
read input;
json_load "$input"
json_get_var path path
json_init
json_add_string "Description" "$path"
json_dump >/dev/console
json_dump
;;
esac
;;
esac