project/ubox.git
7 years agocmake: fix typo
Felix Fietkau [Tue, 21 Feb 2017 13:11:03 +0000 (14:11 +0100)]
cmake: fix typo

Fixes: fce9382b4b99 ("cmake: Check for getrandom system call")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years agokmodloader: fix not being able to find some modules
Nathan Hintz [Tue, 21 Feb 2017 05:14:24 +0000 (05:14 +0000)]
kmodloader: fix not being able to find some modules

kmodloader is using slightly different criteria for ordering the AVL tree
versus what it uses to traverse it.  This sometimes results in not being
able to find some modules.

Reference: https://bugs.lede-project.org/index.php?do=details&task_id=443

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
7 years agocmake: Check for getrandom system call
Florian Fainelli [Sun, 5 Feb 2017 02:41:34 +0000 (18:41 -0800)]
cmake: Check for getrandom system call

In case we are building against a kernel that is too old and does not
support SYS_getrandom, error out with a message indicating so.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years agokmodloader: support '-q' quiet option
Kevin Darbyshire-Bryant [Sun, 29 Jan 2017 09:23:15 +0000 (09:23 +0000)]
kmodloader: support '-q' quiet option

The kernel opportunistically attempts to load modules in advanced with
'predicted' module names.  Often these modules don't exist and hence
kmodloader produces lots of logfile noise.  The kernel commandline to
modprobe from kworker proceses is '-q -- modulename' where '-q' means
quiet. Support suppressing that noise.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
7 years agoubox: Add an option for more accurate timestamps in log
Wojciech Dubowik [Mon, 23 Jan 2017 10:30:14 +0000 (11:30 +0100)]
ubox: Add an option for more accurate timestamps in log

Systemwide timestamps for syslog messages with ms accuracy are usefull
for debugging timing problems.

Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
7 years agokmodloader: make insert_module() idempotent
Yousong Zhou [Fri, 13 Jan 2017 17:00:35 +0000 (01:00 +0800)]
kmodloader: make insert_module() idempotent

To fix spurious error messages in the following situation

 1. scan loaded modules
 2. load wireguard.ko and the module itself will request xt_hashlimit to
    be loaded
 3. xt_hashlimit is still in PROBE state here so we also try to load it,
    but init_module() returns EEXIST

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years agokmodloader: add module alias awareness
Yousong Zhou [Fri, 13 Jan 2017 17:00:34 +0000 (01:00 +0800)]
kmodloader: add module alias awareness

To achieve this, the following changes are made

 - scan module folders before scaning loaded modules
 - struct module was splited into struct module_node for the avl tree
   and struct module for storing actual info about modules

The other minor fix is that module.opts is now freed in free_modules()
when appliable

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years agokmodloader: fix out-of-bound access when parsing .modinfo
Yousong Zhou [Fri, 13 Jan 2017 17:00:33 +0000 (01:00 +0800)]
kmodloader: fix out-of-bound access when parsing .modinfo

Fixes output of "modinfo nf_conntrack_ipv4"

    module:         /lib/modules/4.4.40/nf_conntrack_ipv4.ko
    license:        GPL
    alias:          ip_conntrack
    alias:          nf_conntrack-2
    depends:        nf_conntrack,nf_defrag_ipv4
    src:            %pI4 dst=%pI4

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years agokmodloader: modprobe: skip possible command line arguments
Yousong Zhou [Fri, 13 Jan 2017 17:00:32 +0000 (01:00 +0800)]
kmodloader: modprobe: skip possible command line arguments

The kernel may invocate user mode modprobe with the following scheme

    modprobe -q -- <module_name>

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years agokmodloader: log to kmsg when loading directories of modules
Yousong Zhou [Fri, 13 Jan 2017 17:00:31 +0000 (01:00 +0800)]
kmodloader: log to kmsg when loading directories of modules

syslog may not be ready yet before PREINIT

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
7 years agokmodloader: remove redundant glob wildcard char
Yousong Zhou [Fri, 13 Jan 2017 17:00:30 +0000 (01:00 +0800)]
kmodloader: remove redundant glob wildcard char

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
8 years agoubox: Initialize conditionally uninitialized variabled
Rosen Penev [Sun, 18 Dec 2016 00:48:47 +0000 (16:48 -0800)]
ubox: Initialize conditionally uninitialized variabled

fixes false positive warning from "-Wconditional-uninitialized in clang"

Signed-off by: Rosen Penev <rosenp@gmail.com>

8 years agoubox: Fix some memory leaks
Rosen Penev [Sun, 18 Dec 2016 01:12:28 +0000 (17:12 -0800)]
ubox: Fix some memory leaks

Avoids leaking memory when exiting early.

Signed-off by: Rosen <rosenp@gmail.com>

8 years agokmodloader: Fix typo in error message
Florian Fainelli [Sun, 4 Dec 2016 02:09:39 +0000 (18:09 -0800)]
kmodloader: Fix typo in error message

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
8 years agologd: put non-streamed log entries into one result message
Felix Fietkau [Mon, 26 Sep 2016 14:28:52 +0000 (16:28 +0200)]
logd: put non-streamed log entries into one result message

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years agoubox/logd: free ubus context on exit
Alexandru Ardelean [Sat, 24 Sep 2016 08:03:13 +0000 (11:03 +0300)]
ubox/logd: free ubus context on exit

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
8 years agoubox/logd: free regex's on log_shutdown() call
Alexandru Ardelean [Sat, 24 Sep 2016 08:03:12 +0000 (11:03 +0300)]
ubox/logd: free regex's on log_shutdown() call

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
8 years agologd: fix default initialization of line count
Felix Fietkau [Thu, 22 Sep 2016 18:20:29 +0000 (20:20 +0200)]
logd: fix default initialization of line count

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years agologd: add support for sending log messages as replies
Felix Fietkau [Thu, 22 Sep 2016 14:55:28 +0000 (16:55 +0200)]
logd: add support for sending log messages as replies

Useful for JSON-RPC access via uhttpd

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years agoadd getrandom to .gitignore
Felix Fietkau [Thu, 22 Sep 2016 14:39:49 +0000 (16:39 +0200)]
add getrandom to .gitignore

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years agogetrandom: fix indentation, add missing return statement
Felix Fietkau [Fri, 5 Aug 2016 11:08:53 +0000 (13:08 +0200)]
getrandom: fix indentation, add missing return statement

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years agofix segfault in kmodloader when no modules path was present
John Crispin [Wed, 17 Aug 2016 02:32:43 +0000 (04:32 +0200)]
fix segfault in kmodloader when no modules path was present

Signed-off-by: John Crispin <john@phrozen.org>
8 years agovalidate: fix datatype handling of default values
Jo-Philipp Wich [Sat, 16 Jul 2016 12:52:36 +0000 (14:52 +0200)]
validate: fix datatype handling of default values

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>
8 years agokmodloader: fix lsmod depends output
Hauke Mehrtens [Wed, 13 Jul 2016 14:55:20 +0000 (16:55 +0200)]
kmodloader: fix lsmod depends output

Without this patch only the first dependency is shown, with this patch
all module dependencies are show.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
8 years agocmake: Find uci header file
Florian Fainelli [Fri, 1 Jul 2016 23:05:23 +0000 (16:05 -0700)]
cmake: Find uci header file

Add a CMake FIND_PATH and INCLUDE_DIRECTORIES searching for uci.h. Some
external toolchains which do not include standard locations would fail
to find the header otherwise.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
8 years agogetrandom: add helper for getrandom() syscall
Etienne CHAMPETIER [Thu, 9 Jun 2016 13:03:00 +0000 (13:03 +0000)]
getrandom: add helper for getrandom() syscall

getrandom() was introduced in version 3.17 of the Linux kernel.
By default getrandom() block until /dev/urandom pool has been initialized
and then read from it.
Read buffer is 256 bytes so getrandom() calls always succeed.

First usage will be to save a seed for /dev/urandom.

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
8 years agokmodloader: fix NULL pointer deref in case m->depends is missing
Felix Fietkau [Mon, 7 Mar 2016 16:34:31 +0000 (17:34 +0100)]
kmodloader: fix NULL pointer deref in case m->depends is missing

Observed on an invalid module

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
8 years agokmodloader: clean up memory mapping and fix fd leaks in error handling
Jo-Philipp Wich [Tue, 9 Feb 2016 12:49:55 +0000 (13:49 +0100)]
kmodloader: clean up memory mapping and fix fd leaks in error handling

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
8 years agokmodloader: fix open() error handling
Jo-Philipp Wich [Tue, 9 Feb 2016 07:53:28 +0000 (08:53 +0100)]
kmodloader: fix open() error handling

Fixes kmodloader on systems without stdio and prevents fd leaks in case
descriptor zero is opened.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
8 years agologread: ensure that the len < sizeof(struct blob_attr) check runs before trying...
Felix Fietkau [Sun, 24 Jan 2016 08:19:53 +0000 (09:19 +0100)]
logread: ensure that the len < sizeof(struct blob_attr) check runs before trying to access the data

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
9 years agofix gcc format security error
Hauke Mehrtens [Sun, 22 Nov 2015 14:45:27 +0000 (15:45 +0100)]
fix gcc format security error

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
9 years agolog: allow filtering messages with a regexp pattern
Rafał Miłecki [Tue, 14 Jul 2015 06:43:55 +0000 (08:43 +0200)]
log: allow filtering messages with a regexp pattern

This allows printing/streaming/writing messages matching a specified
basic regular expression only.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
9 years agologd: optimize notify function
Luka Perkov [Tue, 21 Apr 2015 17:04:46 +0000 (19:04 +0200)]
logd: optimize notify function

No need to construct every time the same blob_buf for each client in the list.

Signed-off-by: Luka Perkov <luka@openwrt.org>
9 years agolog: make valgrind less complain by freeing allocated memory
Luka Perkov [Tue, 21 Apr 2015 17:04:45 +0000 (19:04 +0200)]
log: make valgrind less complain by freeing allocated memory

Signed-off-by: Luka Perkov <luka@openwrt.org>
9 years agolog: fix whitespaces
Luka Perkov [Tue, 21 Apr 2015 17:04:44 +0000 (19:04 +0200)]
log: fix whitespaces

Signed-off-by: Luka Perkov <luka@openwrt.org>
9 years agolog: remove unused callbacks
Luka Perkov [Tue, 21 Apr 2015 17:04:43 +0000 (19:04 +0200)]
log: remove unused callbacks

Signed-off-by: Luka Perkov <luka@openwrt.org>
9 years agologread: add support for non-transparent-framing for Syslog over TCP
Etienne CHAMPETIER [Wed, 1 Apr 2015 23:14:01 +0000 (01:14 +0200)]
logread: add support for non-transparent-framing for Syslog over TCP

https://tools.ietf.org/html/rfc6587#section-3.4.2
the idea is to add \n or \0 as message trailer so it's easier
to find message end

v2: simplify, use \n by default, with optional \0

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
9 years agoproperly handle return codes
John Crispin [Sat, 28 Mar 2015 14:38:09 +0000 (15:38 +0100)]
properly handle return codes

Signed-off-by: John Crispin <blogic@openwrt.org>
9 years agoproperly handle return code of pipe() syscall
John Crispin [Sat, 28 Mar 2015 06:59:38 +0000 (07:59 +0100)]
properly handle return code of pipe() syscall

Signed-off-by: John Crispin <blogic@openwrt.org>
9 years agosyslog: use appropriate levels for logging
Christian Mehlis [Thu, 26 Mar 2015 13:51:21 +0000 (14:51 +0100)]
syslog: use appropriate levels for logging

Signed-off-by: Christian Mehlis <christian@m3hlis.de>
9 years agokmodloader: initialize module folders in insmod
Jo-Philipp Wich [Thu, 26 Feb 2015 21:17:31 +0000 (22:17 +0100)]
kmodloader: initialize module folders in insmod

Fixes a segmentation fault in 'insmod' operation mode, due to uninitialized
path list.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
9 years agokmodloader: convert to ulog() api
Jo-Philipp Wich [Wed, 25 Feb 2015 20:48:05 +0000 (21:48 +0100)]
kmodloader: convert to ulog() api

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
9 years agokmodloader: search kmods relative to LD_LIBRARY_PATH
Jo-Philipp Wich [Tue, 24 Feb 2015 22:55:09 +0000 (23:55 +0100)]
kmodloader: search kmods relative to LD_LIBRARY_PATH

When LD_LIBRARY_PATH is set, then scan for kmods in each directory pointed to
by it. This is mainly useful for early boot invocations of kmodloader, e.g.
during the extroot setup phase.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
10 years agohw_detect replaces this old code
John Crispin [Fri, 3 Oct 2014 15:54:19 +0000 (17:54 +0200)]
hw_detect replaces this old code

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoUse different loglevels
Michel Stam [Thu, 2 Oct 2014 11:42:45 +0000 (11:42 +0000)]
Use different loglevels

Ubox logs various messages during OpenWRT boot which are not
very interesting, such as the number of iterations made. This
fix implements several loglevels for debug/info/error so that
more useful messages are shown.

Signed-off-by: Michel Stam <m.stam@fugro.nl>
10 years agoRFC 3164 compliant remote logging
John Crispin [Tue, 16 Sep 2014 12:20:30 +0000 (14:20 +0200)]
RFC 3164 compliant remote logging

When logread daemon send a syslog message to another host, time, severity and facility are cut off.

The message contains only text. This patch adds time, severity and facility in the message as described in the RFC 3164.

Signed-off-by: Belkov Max <belkov-max@mail.ru>
10 years agoubox: exit(1) in logd if registering log object with ubus fails
Alexandru Ardelean [Fri, 8 Aug 2014 07:48:52 +0000 (07:48 +0000)]
ubox: exit(1) in logd if registering log object with ubus fails

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
10 years agovalidate: return error on failed validation
Luka Perkov [Fri, 27 Jun 2014 14:23:43 +0000 (14:23 +0000)]
validate: return error on failed validation

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>
10 years agovalidate: add missing yes/no boolean values
Luka Perkov [Fri, 27 Jun 2014 08:09:04 +0000 (08:09 +0000)]
validate: add missing yes/no boolean values

Signed-off-by: Luka Perkov <luka@openwrt.org>
10 years agovalidate: add valid bool types enabled/disabled
Luka Perkov [Fri, 27 Jun 2014 08:09:03 +0000 (08:09 +0000)]
validate: add valid bool types enabled/disabled

They are already supported in config_get_bool function found in OpenWrt
base-package.

Signed-off-by: Luka Perkov <luka@openwrt.org>
10 years agovalidate: fix indentation
Luka Perkov [Fri, 27 Jun 2014 08:09:02 +0000 (08:09 +0000)]
validate: fix indentation

Signed-off-by: Luka Perkov <luka@openwrt.org>
10 years agokmodloader: force size argument for syscall to unsigned long to fix issues with musl
Felix Fietkau [Wed, 28 May 2014 21:28:28 +0000 (23:28 +0200)]
kmodloader: force size argument for syscall to unsigned long to fix issues with musl

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agoubox: only link libraries that are actually used
Felix Fietkau [Sun, 25 May 2014 20:00:58 +0000 (22:00 +0200)]
ubox: only link libraries that are actually used

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
10 years agolog: remove superflous client_close call
John Crispin [Thu, 27 Mar 2014 12:04:24 +0000 (12:04 +0000)]
log: remove superflous client_close call

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agomount_root/block: these tools were moved to the fstools repo
John Crispin [Wed, 26 Mar 2014 14:48:24 +0000 (14:48 +0000)]
mount_root/block: these tools were moved to the fstools repo

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agologd: fix time passed via unix fd
John Crispin [Tue, 18 Mar 2014 06:58:38 +0000 (06:58 +0000)]
logd: fix time passed via unix fd

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agologd: fix internal buffer size
John Crispin [Wed, 12 Mar 2014 07:00:11 +0000 (07:00 +0000)]
logd: fix internal buffer size

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agologd: fix pipe close
John Crispin [Wed, 12 Mar 2014 04:01:42 +0000 (04:01 +0000)]
logd: fix pipe close

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agologd: transport log data via the new ubus fd api
John Crispin [Wed, 26 Feb 2014 02:57:30 +0000 (02:57 +0000)]
logd: transport log data via the new ubus fd api

this fixes the size limitation patch.

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agokmodloader: fix insmod when the passed parameter is a valid path
John Crispin [Wed, 26 Feb 2014 06:02:07 +0000 (06:02 +0000)]
kmodloader: fix insmod when the passed parameter is a valid path

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agovalidate: range and base arguments for numeric types, new types hexstring, regexp...
Jo-Philipp Wich [Fri, 21 Feb 2014 15:29:11 +0000 (16:29 +0100)]
validate: range and base arguments for numeric types, new types hexstring, 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>
10 years agoblock: add more diagnostic messages
Jo-Philipp Wich [Wed, 4 Dec 2013 16:34:43 +0000 (16:34 +0000)]
block: add more diagnostic messages

10 years agomount_root: add more diagnostic messages
Jo-Philipp Wich [Wed, 4 Dec 2013 16:34:23 +0000 (16:34 +0000)]
mount_root: add more diagnostic messages

10 years agomount_root: try both $prefix/sbin/block and /sbin/block, fixes extroot with builtin...
Jo-Philipp Wich [Tue, 3 Dec 2013 18:14:48 +0000 (18:14 +0000)]
mount_root: try both $prefix/sbin/block and /sbin/block, fixes extroot with builtin block-mount

10 years agokmodloader: allow /etc/modules.d/ files to pass options
John Crispin [Wed, 22 Jan 2014 17:57:09 +0000 (17:57 +0000)]
kmodloader: allow /etc/modules.d/ files to pass options

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoubox: make logd use new ubus autoconnect
John Crispin [Wed, 22 Jan 2014 16:35:21 +0000 (16:35 +0000)]
ubox: make logd use new ubus autoconnect

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agologd: revert the log size changes
John Crispin [Wed, 22 Jan 2014 13:57:07 +0000 (13:57 +0000)]
logd: revert the log size changes

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agologd: prevent the buffer from being bigger than the maximum ubus size
John Crispin [Tue, 21 Jan 2014 13:00:19 +0000 (13:00 +0000)]
logd: prevent the buffer from being bigger than the maximum ubus size

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agologd: allow setting the buffer size from the command line
John Crispin [Sun, 19 Jan 2014 18:32:58 +0000 (18:32 +0000)]
logd: allow setting the buffer size from the command line

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agokmodloader: fix elf header parsing on 64bit machines
John Crispin [Thu, 16 Jan 2014 00:29:16 +0000 (00:29 +0000)]
kmodloader: fix elf header parsing on 64bit machines

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agoblock: remove duplicate block device wildcard
John Crispin [Wed, 15 Jan 2014 22:23:04 +0000 (22:23 +0000)]
block: remove duplicate block device wildcard

Signed-off-by: John Crispin <blogic@openwrt.org>
10 years agofix bogus kmodloader warning
John Crispin [Sun, 12 Jan 2014 13:07:18 +0000 (14:07 +0100)]
fix bogus kmodloader warning

https://dev.openwrt.org/ticket/14659

Signed-off-by: John Crispin <blogic@openwrt.org>
11 years agologread: fix initial connect. we really need a better reconnect logic
John Crispin [Mon, 9 Dec 2013 18:12:15 +0000 (19:12 +0100)]
logread: fix initial connect. we really need a better reconnect logic

Signed-off-by: John Crispin <blogic@openwrt.org>
11 years agovalidate: properly deal with datatype expressions containing escaped colons
Jo-Philipp Wich [Sat, 30 Nov 2013 17:35:08 +0000 (17:35 +0000)]
validate: properly deal with datatype expressions containing escaped colons

11 years agovalidate: fix length calculation of string literals and store value type for literal...
Jo-Philipp Wich [Sat, 30 Nov 2013 16:47:08 +0000 (16:47 +0000)]
validate: fix length calculation of string literals and store value type for literal comparisations

11 years agovalidate: fix return type of dt_parse() call
Jo-Philipp Wich [Sat, 30 Nov 2013 14:53:39 +0000 (14:53 +0000)]
validate: fix return type of dt_parse() call

11 years agovalidate: support uci lists in cli client and use dt_parse() return value to decide...
Jo-Philipp Wich [Thu, 28 Nov 2013 21:20:08 +0000 (21:20 +0000)]
validate: support uci lists in cli client and use dt_parse() return value to decide whether an option should be handled as bool

11 years agovalidate: change dt_parse() to return an enum indicating the kind of value that was...
Jo-Philipp Wich [Thu, 28 Nov 2013 21:19:34 +0000 (21:19 +0000)]
validate: change dt_parse() to return an enum indicating the kind of value that was matched (bool, number, string)

11 years agoadd a c version of the current uci_valisate call to the cli
John Crispin [Wed, 20 Nov 2013 22:54:14 +0000 (23:54 +0100)]
add a c version of the current uci_valisate call to the cli

Signed-off-by: John Crispin <blogic@openwrt.org>
11 years agomake use of the md5.c inside libubox
John Crispin [Tue, 19 Nov 2013 19:58:38 +0000 (20:58 +0100)]
make use of the md5.c inside libubox

Signed-off-by: John Crispin <blogic@openwrt.org>
11 years agorevert 2fdd374f4214129d93f10b7001adece9239752a2
John Crispin [Sat, 16 Nov 2013 19:55:14 +0000 (20:55 +0100)]
revert 2fdd374f4214129d93f10b7001adece9239752a2

Signed-off-by: John Crispin <blogic@openwrt.org>
11 years agoupdate gitignore
John Crispin [Thu, 14 Nov 2013 12:48:48 +0000 (13:48 +0100)]
update gitignore

Signed-off-by: John Crispin <blogic@openwrt.org>
11 years agoadd log daemon
John Crispin [Thu, 14 Nov 2013 12:47:18 +0000 (13:47 +0100)]
add log daemon

Signed-off-by: John Crispin <blogic@openwrt.org>
11 years agoadd validation code
John Crispin [Thu, 14 Nov 2013 12:43:19 +0000 (13:43 +0100)]
add validation code

Signed-off-by: John Crispin <blogic@openwrt.org>
11 years agokmod-loader: fix module options support when using modprobe
John Crispin [Fri, 8 Nov 2013 21:59:58 +0000 (22:59 +0100)]
kmod-loader: fix module options support when using modprobe

Signed-off-by: John Crispin <blogic@openwrt.org>
11 years agoblock: support extroot and overlay mounts by device
Jo-Philipp Wich [Wed, 6 Nov 2013 12:54:16 +0000 (12:54 +0000)]
block: support extroot and overlay mounts by device

11 years agoblock: fix find_block_info() by label
Jo-Philipp Wich [Wed, 6 Nov 2013 12:48:01 +0000 (12:48 +0000)]
block: fix find_block_info() by label

11 years agosupport specifying swap priority from the command line
Nathan Hintz [Sat, 2 Nov 2013 17:31:41 +0000 (17:31 +0000)]
support specifying swap priority from the command line

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
11 years agoclose file pointer before exiting function
Luka Perkov [Tue, 9 Jul 2013 23:50:48 +0000 (01:50 +0200)]
close file pointer before exiting function

Signed-off-by: Luka Perkov <luka@openwrt.org>
11 years agofix typo
Luka Perkov [Thu, 24 Oct 2013 00:28:20 +0000 (02:28 +0200)]
fix typo

Signed-off-by: Luka Perkov <luka@openwrt.org>
11 years agoadd support for patched rootfs
John Crispin [Mon, 7 Oct 2013 15:46:45 +0000 (17:46 +0200)]
add support for patched rootfs

Signed-off-by: John Crispin <blogic@openwrt.org>
11 years agokmodloader: respect global directory prefix in scan_module_folder()
Jo-Philipp Wich [Mon, 14 Oct 2013 14:13:40 +0000 (14:13 +0000)]
kmodloader: respect global directory prefix in scan_module_folder()

11 years agokmodloader: use the name of the found module struct for modinfo
Jo-Philipp Wich [Sat, 28 Sep 2013 16:32:29 +0000 (16:32 +0000)]
kmodloader: use the name of the found module struct for modinfo

The module .ko file might be called differently than the name used
by the kernel internally, e.g. "nls_iso8859-1.ko" is called
"nls_iso8859_1" in lsmmod. The print_modinfo() procedure expects the
filename spelling in order to successfully resolve the full module path.

After this change, "modinfo" supports printing module info even if the
user gives the kernel internal spelling instead of the file name one,
so that e.g. "modinfo "nls_iso8859_1" and "modinfo nls_iso8859-1.ko" will
both succeed.

11 years agokmodloader: use the name of the module struct when unloading modules
Jo-Philipp Wich [Sat, 28 Sep 2013 16:25:47 +0000 (16:25 +0000)]
kmodloader: use the name of the module struct when unloading modules

The module .ko file might be called differently than the name used
by the kernel internally, e.g. "nls_iso8859-1.ko" is called
"nls_iso8859_1" in lsmmod. The module removal syscall expects the
latter as well.

After this change, "rmmod" supports unloading the module even if the
user gives the file name spelling instead of the kernel internal one,
so that e.g. "rmmod nls_iso8859-1.ko" and "rmmod nls_iso8859_1" will
both succeed.

11 years agokmodloader: properly handle modules with both underscores and dashes in their name
Jo-Philipp Wich [Sat, 28 Sep 2013 14:41:50 +0000 (14:41 +0000)]
kmodloader: properly handle modules with both underscores and dashes in their name

11 years agofix hyphen substitution in path
John Crispin [Thu, 19 Sep 2013 13:15:09 +0000 (15:15 +0200)]
fix hyphen substitution in path

Signed-off-by: John Crispin <blogic@openwrt.org>
11 years agocosmetic cleanup of - vs _ patch
John Crispin [Tue, 17 Sep 2013 21:27:58 +0000 (23:27 +0200)]
cosmetic cleanup of - vs _ patch

Signed-off-by: John Crispin <blogic@openwrt.org>
11 years agofix _ vs - bug
John Crispin [Fri, 13 Sep 2013 18:15:15 +0000 (20:15 +0200)]
fix _ vs - bug

Signed-off-by: John Crispin <blogic@openwrt.org>
11 years agokmodloader: don't free memory allocated with alloca()
Jo-Philipp Wich [Thu, 5 Sep 2013 15:21:09 +0000 (17:21 +0200)]
kmodloader: don't free memory allocated with alloca()

11 years agoblock: properly handle vlist_add() for label, uuid and device cases
Jo-Philipp Wich [Thu, 5 Sep 2013 15:19:41 +0000 (17:19 +0200)]
block: properly handle vlist_add() for label, uuid and device cases