| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
The latter is more compatible with older GCC versions like 4.9. Additionally, initializing with { 0 } produces a warning that only the first field was initialized.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
|
|
| |
fixes false positive warning from "-Wconditional-uninitialized in clang"
Signed-off by: Rosen Penev <rosenp@gmail.com>
|
|
|
|
|
|
| |
Avoids leaking memory when exiting early.
Signed-off by: Rosen <rosenp@gmail.com>
|
|
|
|
|
|
|
|
| |
Properly handle the datatype of default values when the corresponding uci
value is unset. Also consolidate the three default value code branches into
a single one.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
|
|
|
|
|
|
|
| |
In the procd script (/lib/functions/procd.sh) uci_validate_section is in charge
of validating the uci config files. The uci_validate_section function checks
return code of validate_data tool; without this change in case of invalid
config values the function is not able to catch errors.
Signed-off-by: Luka Perkov <luka@openwrt.org>
|
|
|
|
| |
Signed-off-by: Luka Perkov <luka@openwrt.org>
|
|
|
|
|
|
|
| |
They are already supported in config_get_bool function found in OpenWrt
base-package.
Signed-off-by: Luka Perkov <luka@openwrt.org>
|
|
|
|
| |
Signed-off-by: Luka Perkov <luka@openwrt.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
regexp and uci
- make uinteger and integer types more strict, they will not accept
leading spaces or plus signs anymore
- add optional base argument to uinteger and integer data types, e.g.
integer(16) will accept -af or 0xaf, a base of 0 (the default) will
use the underlying heuristics of strtol() / strtoul()
- add optional min and max options to string() datatype, e.g.
string(3) only accepts strings longer than 3 chars, string(8, 63)
will accept strings between 8 and 63 characters in length
- add hexstring([minlen [, maxlen]]) type which will accept
long hex encoded strings whose length must be a multiple of 2
- add regexp(pattern) type which applies an extended POSIX regular
expression on the value to test. The given pattern is implicitely
anchored, e.g. regexp("[a-z]+") will match /^[a-z]+$/
- add uci(package, {@type|name}[, option]) type which tests the input
against selected uci values, e.g.
* uci("network", "@interface") would allow values that match
the name of any section of type "interface" in /e/c/network
* uci("network", "@interface", "ifname") would allow any value
that matches one of the ifnames in any section of type
interface in /e/c/network
* uci("system", "ntp", "server") would allow any value that
matches on of the servers in the "server" option of the "ntp"
section in /e/c/system
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
|
| |
|
|
|
|
| |
literal comparisations
|
| |
|
|
|
|
| |
decide whether an option should be handled as bool
|
|
|
|
| |
that was matched (bool, number, string)
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
Signed-off-by: John Crispin <blogic@openwrt.org>
|