mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
- 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
25 lines
596 B
Bash
Executable file
25 lines
596 B
Bash
Executable file
#!/bin/sh
|
|
|
|
UCI_GET="uci -q get"
|
|
UCI_SET="uci -q set"
|
|
UCI_ADD="uci -q add"
|
|
UCI_DELETE="uci -q delete"
|
|
UCI_COMMIT="uci -q commit"
|
|
UCI_SHOW="uci -q show"
|
|
|
|
UCI_GET_BBF_DMMAP="uci -q -c /etc/bbfdm/dmmap get"
|
|
UCI_SET_BBF_DMMAP="uci -q -c /etc/bbfdm/dmmap set"
|
|
UCI_ADD_BBF_DMMAP="uci -q -c /etc/bbfdm/dmmap add"
|
|
UCI_DELETE_BBF_DMMAP="uci -q -c /etc/bbfdm/dmmap delete"
|
|
UCI_COMMIT_BBF_DMMAP="uci -q -c /etc/bbfdm/dmmap commit"
|
|
UCI_SHOW_BBF_DMMAP="uci -q -c /etc/bbfdm/dmmap show"
|
|
|
|
uci_get() {
|
|
val=$($UCI_GET $1)
|
|
echo ${val:-$2}
|
|
}
|
|
|
|
uci_get_bbf_dmmap() {
|
|
val=$($UCI_GET_BBF_DMMAP $1)
|
|
echo ${val:-$2}
|
|
}
|