project/libubox.git
9 years agouloop: handle EPOLLHUP like EPOLLERR to prevent infinite tight loops between epoll_wa...
Jo-Philipp Wich [Sat, 7 Jul 2012 16:17:40 +0000 (18:17 +0200)]
uloop: handle EPOLLHUP like EPOLLERR to prevent infinite tight loops between epoll_wait() and the continue in uloop_run_events()

9 years agoblobmsg: remove the unnecessary name argument from blobmsg_check_attr_list, infer...
Felix Fietkau [Sun, 24 Jun 2012 19:11:06 +0000 (21:11 +0200)]
blobmsg: remove the unnecessary name argument from blobmsg_check_attr_list, infer it from the list type

9 years agoblobmsg: add blobmsg_check_attr_list() to validate element types of arrays and tables
Felix Fietkau [Sun, 24 Jun 2012 19:07:47 +0000 (21:07 +0200)]
blobmsg: add blobmsg_check_attr_list() to validate element types of arrays and tables

9 years agouloop: prevent fd callbacks for unregistered fds by ensuring that pointers in the...
Felix Fietkau [Sun, 24 Jun 2012 19:06:16 +0000 (21:06 +0200)]
uloop: prevent fd callbacks for unregistered fds by ensuring that pointers in the epoll array are cleared

9 years agovlist.h: protect against multiple inclusions
Felix Fietkau [Sun, 10 Jun 2012 15:11:36 +0000 (17:11 +0200)]
vlist.h: protect against multiple inclusions

9 years agoblob: add blob_memdup()
Felix Fietkau [Fri, 1 Jun 2012 18:54:05 +0000 (20:54 +0200)]
blob: add blob_memdup()

9 years agosh/jshn.sh: fix json_get_var() and json_get_type() to not return cached values
Jo-Philipp Wich [Wed, 30 May 2012 19:47:43 +0000 (21:47 +0200)]
sh/jshn.sh: fix json_get_var() and json_get_type() to not return cached values

9 years agoMerge branch 'master' of nbd.name:luci2/libubox
Jo-Philipp Wich [Tue, 29 May 2012 00:17:35 +0000 (02:17 +0200)]
Merge branch 'master' of nbd.name:luci2/libubox

9 years agosh/jshn.sh: replace "tr" calls with inline substitution, signalize success with retur...
Jo-Philipp Wich [Tue, 29 May 2012 00:10:20 +0000 (02:10 +0200)]
sh/jshn.sh: replace "tr" calls with inline substitution, signalize success with return values

9 years agosh/jshn.sh: replace "tr" calls with inline substitution, signalize success with retur...
Jo-Philipp Wich [Tue, 29 May 2012 00:06:39 +0000 (02:06 +0200)]
sh/jshn.sh: replace "tr" calls with inline substitution, signalize success with return values

9 years agouloop: include sys/types.h to make pid_t available
Benjamin Larsson [Mon, 28 May 2012 12:59:49 +0000 (14:59 +0200)]
uloop: include sys/types.h to make pid_t available

9 years agoremove uapi.h, afacis nothing uses it
Felix Fietkau [Sat, 26 May 2012 16:04:34 +0000 (18:04 +0200)]
remove uapi.h, afacis nothing uses it

9 years agoswitch blobmsg_json over to permissive license
Felix Fietkau [Sat, 26 May 2012 16:03:08 +0000 (18:03 +0200)]
switch blobmsg_json over to permissive license

9 years agoswitch blobmsg over to permissive license
Felix Fietkau [Sat, 26 May 2012 16:02:30 +0000 (18:02 +0200)]
switch blobmsg over to permissive license

9 years agoremove ulog.h, afaics nothing uses it
Felix Fietkau [Sat, 26 May 2012 15:59:59 +0000 (17:59 +0200)]
remove ulog.h, afaics nothing uses it

9 years agoadd vlist (from netifd)
Felix Fietkau [Sat, 26 May 2012 15:57:04 +0000 (17:57 +0200)]
add vlist (from netifd)

9 years agoadd avl_strcmp
Felix Fietkau [Sat, 26 May 2012 15:50:10 +0000 (17:50 +0200)]
add avl_strcmp

9 years agosh/jshn.sh: fix allowing numbers in identifiers
Felix Fietkau [Thu, 17 May 2012 12:29:59 +0000 (14:29 +0200)]
sh/jshn.sh: fix allowing numbers in identifiers

json_add_generic() needs to handle them as well

9 years agosh/jshn.sh: allow numbers in identifiers for json_get_var()
Jo-Philipp Wich [Tue, 15 May 2012 22:18:16 +0000 (00:18 +0200)]
sh/jshn.sh: allow numbers in identifiers for json_get_var()

When traversing arrays of tables or arrays of array it is required to
call json_select # where # is the index of the array item to select.

Internally json_select() calls json_get_var() to obtain the correct
prefix to populate $JSON_CUR with. However, the "tr" call in
json_get_var() incorrectly replaces all digits with underscores,
making any lookup for numeric array items fail.

The attached patch changes the "tr" expression to allow digits and
thus implements the expected behaviour for nested arrays.

9 years agojshn.sh: add json_get_vars() wrapper function
Felix Fietkau [Sun, 13 May 2012 22:21:12 +0000 (00:21 +0200)]
jshn.sh: add json_get_vars() wrapper function

9 years agoadd blobmsg_add_blob() to copy over an existing blobmsg attribute
Felix Fietkau [Tue, 8 May 2012 13:59:19 +0000 (15:59 +0200)]
add blobmsg_add_blob() to copy over an existing blobmsg attribute

9 years agoremove uhtbl-test.c, it is obsolete
Felix Fietkau [Wed, 14 Mar 2012 10:55:59 +0000 (11:55 +0100)]
remove uhtbl-test.c, it is obsolete

9 years agoreplace list.h with a BSD licensed variant (taken from FreeBSD SVN)
Felix Fietkau [Mon, 6 Feb 2012 20:09:42 +0000 (21:09 +0100)]
replace list.h with a BSD licensed variant (taken from FreeBSD SVN)

10 years agoblobmsg: add missing endian conversions
Felix Fietkau [Wed, 16 Nov 2011 23:47:49 +0000 (00:47 +0100)]
blobmsg: add missing endian conversions

10 years agoblobmsg_json: print int16 elements in blobmsg_format_element (patch by Luka Perkov)
Felix Fietkau [Wed, 16 Nov 2011 23:40:37 +0000 (00:40 +0100)]
blobmsg_json: print int16 elements in blobmsg_format_element (patch by Luka Perkov)

10 years agoblob: switch to ISC license, switch blob_{get,put}_int* to _u*, add wrappers
Felix Fietkau [Thu, 10 Nov 2011 08:05:33 +0000 (09:05 +0100)]
blob: switch to ISC license, switch blob_{get,put}_int* to _u*, add wrappers

10 years agomake casts from void * explicit to avoid C++ warnings (patch by Arthur Davis)
Felix Fietkau [Thu, 27 Oct 2011 08:16:56 +0000 (10:16 +0200)]
make casts from void * explicit to avoid C++ warnings (patch by Arthur Davis)

10 years agolist.h: rename parameter named "new" to "_new" to avoid using a reserved C++ keyword...
Felix Fietkau [Thu, 27 Oct 2011 08:15:01 +0000 (10:15 +0200)]
list.h: rename parameter named "new" to "_new" to avoid using a reserved C++ keyword (patch by Arthur Davis)

10 years agofix more instances of uninitialized padding bytes
Felix Fietkau [Thu, 6 Oct 2011 15:57:13 +0000 (17:57 +0200)]
fix more instances of uninitialized padding bytes

10 years agoblobmsg: fill padding between name and data
Felix Fietkau [Thu, 6 Oct 2011 15:19:28 +0000 (17:19 +0200)]
blobmsg: fill padding between name and data

10 years agomake the blobmsg format endian agnostic (stick to big-endian)
Felix Fietkau [Thu, 6 Oct 2011 15:15:00 +0000 (17:15 +0200)]
make the blobmsg format endian agnostic (stick to big-endian)

10 years agofill padding bytes when setting raw attribute length
Felix Fietkau [Thu, 6 Oct 2011 15:14:44 +0000 (17:14 +0200)]
fill padding bytes when setting raw attribute length

10 years agoexplicitly zero extra buffer space added with realloc to silence valgrind warnings
Felix Fietkau [Mon, 3 Oct 2011 10:41:51 +0000 (12:41 +0200)]
explicitly zero extra buffer space added with realloc to silence valgrind warnings

10 years agofix reads beyond the end of the buffer when iterating over blob attributes
Felix Fietkau [Mon, 3 Oct 2011 10:36:46 +0000 (12:36 +0200)]
fix reads beyond the end of the buffer when iterating over blob attributes

10 years agoadd a blobmsg_type() inline function
Felix Fietkau [Mon, 12 Sep 2011 11:37:53 +0000 (13:37 +0200)]
add a blobmsg_type() inline function

10 years agosame for json_get_var
Felix Fietkau [Sun, 11 Sep 2011 09:46:44 +0000 (11:46 +0200)]
same for json_get_var

10 years agojshn: support using characters in elements that do not conform to shell variable...
Felix Fietkau [Sun, 11 Sep 2011 09:40:22 +0000 (11:40 +0200)]
jshn: support using characters in elements that do not conform to shell variable restrictions

10 years agoadd blobmsg_get_bool
Felix Fietkau [Wed, 7 Sep 2011 04:33:36 +0000 (06:33 +0200)]
add blobmsg_get_bool

10 years agoblob_attr_equal: un-inline, add pointer checks
Felix Fietkau [Mon, 5 Sep 2011 04:25:51 +0000 (06:25 +0200)]
blob_attr_equal: un-inline, add pointer checks

10 years agoadd blob_attr_equal() for comparing attributes
Felix Fietkau [Mon, 5 Sep 2011 04:09:32 +0000 (06:09 +0200)]
add blob_attr_equal() for comparing attributes

10 years agofix a bug in blobmsg_parse
Felix Fietkau [Wed, 17 Aug 2011 17:44:11 +0000 (10:44 -0700)]
fix a bug in blobmsg_parse

a second entry that has the same length as an existing found entry would
abort the parse loop (reported by Stefan M├Ąchler)

10 years agochange the include path for list.h in jshn.c
Felix Fietkau [Fri, 12 Aug 2011 17:12:50 +0000 (11:12 -0600)]
change the include path for list.h in jshn.c

10 years agoadd a missing include
Felix Fietkau [Thu, 11 Aug 2011 21:37:48 +0000 (15:37 -0600)]
add a missing include

10 years agojshn: clear more variables on json_init, fix adding array elements
Felix Fietkau [Thu, 11 Aug 2011 21:29:23 +0000 (15:29 -0600)]
jshn: clear more variables on json_init, fix adding array elements

10 years agoadd blob_buf_free
Felix Fietkau [Fri, 29 Jul 2011 17:38:30 +0000 (19:38 +0200)]
add blob_buf_free

10 years agoadd BLOBMSG_TYPE_BOOL as an alias for BLOBMSG_TYPE_INT8
Felix Fietkau [Fri, 29 Jul 2011 10:56:18 +0000 (12:56 +0200)]
add BLOBMSG_TYPE_BOOL as an alias for BLOBMSG_TYPE_INT8

10 years agoblobmsg_json: support indenting of output data
Felix Fietkau [Mon, 18 Jul 2011 11:04:23 +0000 (13:04 +0200)]
blobmsg_json: support indenting of output data

10 years agojshn: add an option for printing the json data without a terminating newline
Felix Fietkau [Tue, 31 May 2011 13:41:19 +0000 (15:41 +0200)]
jshn: add an option for printing the json data without a terminating newline

10 years agouloop: use list.h, add support for handling sigchld
Felix Fietkau [Tue, 24 May 2011 19:46:10 +0000 (21:46 +0200)]
uloop: use list.h, add support for handling sigchld

10 years agojshn: fix invalid variable reuse
Felix Fietkau [Mon, 23 May 2011 21:15:33 +0000 (23:15 +0200)]
jshn: fix invalid variable reuse

10 years agojshn: do not use -n on export
Felix Fietkau [Mon, 23 May 2011 21:09:19 +0000 (23:09 +0200)]
jshn: do not use -n on export

10 years agoadd jshn
Felix Fietkau [Mon, 23 May 2011 20:21:27 +0000 (22:21 +0200)]
add jshn

10 years agomake the avl node key const
Felix Fietkau [Wed, 13 Apr 2011 18:14:20 +0000 (20:14 +0200)]
make the avl node key const

10 years agoremove int16, use int8 as bool instead of integer
Felix Fietkau [Sun, 27 Mar 2011 00:08:51 +0000 (01:08 +0100)]
remove int16, use int8 as bool instead of integer

10 years agosupport building without json support
Felix Fietkau [Sat, 26 Mar 2011 22:50:33 +0000 (23:50 +0100)]
support building without json support

10 years agoremove the hlist code
Felix Fietkau [Sat, 26 Mar 2011 19:38:33 +0000 (20:38 +0100)]
remove the hlist code

10 years agochange minimum cmake version to 2.6
Felix Fietkau [Sat, 12 Feb 2011 22:58:09 +0000 (23:58 +0100)]
change minimum cmake version to 2.6

10 years agouloop: fix event timeouts on darwin
Felix Fietkau [Sat, 12 Feb 2011 20:33:32 +0000 (21:33 +0100)]
uloop: fix event timeouts on darwin

10 years agouloop: allow timeouts to cancel the event loop
Felix Fietkau [Fri, 11 Feb 2011 01:38:32 +0000 (02:38 +0100)]
uloop: allow timeouts to cancel the event loop

10 years agoallow multiple calls to uloop_init() without annoying side effects
Felix Fietkau [Fri, 11 Feb 2011 00:25:17 +0000 (01:25 +0100)]
allow multiple calls to uloop_init() without annoying side effects

10 years agoadd a cast to fix 64 bit issues
Felix Fietkau [Mon, 7 Feb 2011 19:30:52 +0000 (20:30 +0100)]
add a cast to fix 64 bit issues

10 years agouloop: make first_timeout static
Felix Fietkau [Mon, 7 Feb 2011 16:52:33 +0000 (17:52 +0100)]
uloop: make first_timeout static

10 years agomake uloop_end() inline
Felix Fietkau [Mon, 7 Feb 2011 16:51:20 +0000 (17:51 +0100)]
make uloop_end() inline

10 years agovalidate blobmsg attributes before converting them to json
Felix Fietkau [Mon, 7 Feb 2011 16:47:02 +0000 (17:47 +0100)]
validate blobmsg attributes before converting them to json

10 years agousock: remove code duplication
Felix Fietkau [Mon, 7 Feb 2011 16:00:50 +0000 (17:00 +0100)]
usock: remove code duplication

10 years agoproperly null-terminate formatted json strings
Felix Fietkau [Mon, 7 Feb 2011 00:18:56 +0000 (01:18 +0100)]
properly null-terminate formatted json strings

10 years agoallow blobmsg_add_field to add arrays/tables
Felix Fietkau [Mon, 7 Feb 2011 00:12:07 +0000 (01:12 +0100)]
allow blobmsg_add_field to add arrays/tables

10 years agorename blob_get_int* to blob_get_u*
Felix Fietkau [Sun, 6 Feb 2011 20:36:04 +0000 (21:36 +0100)]
rename blob_get_int* to blob_get_u*

10 years agomove json formatting to the blobmsg_json library
Felix Fietkau [Sun, 6 Feb 2011 20:23:28 +0000 (21:23 +0100)]
move json formatting to the blobmsg_json library

10 years agomake __avl_find_element() inline
Felix Fietkau [Sun, 6 Feb 2011 17:01:37 +0000 (18:01 +0100)]
make __avl_find_element() inline

10 years agoremove hash.[ch] - i don't think we will need it
Felix Fietkau [Sun, 6 Feb 2011 16:20:46 +0000 (17:20 +0100)]
remove hash.[ch] - i don't think we will need it

10 years agoremove uhtbl - i don't think we will need it
Felix Fietkau [Sun, 6 Feb 2011 16:19:35 +0000 (17:19 +0100)]
remove uhtbl - i don't think we will need it

10 years agoadd a callback to the blobmsg-to-json function to override the formatting of specific...
Felix Fietkau [Sun, 6 Feb 2011 15:48:28 +0000 (16:48 +0100)]
add a callback to the blobmsg-to-json function to override the formatting of specific attributes

10 years agoadd missing copyright headers
Felix Fietkau [Sun, 6 Feb 2011 15:20:57 +0000 (16:20 +0100)]
add missing copyright headers

10 years agoadd a json to blobmsg parsing library
Felix Fietkau [Sun, 6 Feb 2011 15:14:15 +0000 (16:14 +0100)]
add a json to blobmsg parsing library

10 years agouloop: export the cancelled flag
Felix Fietkau [Sun, 6 Feb 2011 15:13:58 +0000 (16:13 +0100)]
uloop: export the cancelled flag

10 years agoblobmsg: fix dynamic string buffer length calculation
Felix Fietkau [Sun, 6 Feb 2011 01:07:26 +0000 (02:07 +0100)]
blobmsg: fix dynamic string buffer length calculation

10 years agouloop: fix the write flag for mac os x
Felix Fietkau [Sun, 6 Feb 2011 00:56:37 +0000 (01:56 +0100)]
uloop: fix the write flag for mac os x

10 years agoblomsg: add integer attribute accessor functions
Felix Fietkau [Sat, 5 Feb 2011 01:06:49 +0000 (02:06 +0100)]
blomsg: add integer attribute accessor functions

10 years agoadd functions for allocating and adding a string buffer field
Felix Fietkau [Fri, 4 Feb 2011 20:57:59 +0000 (21:57 +0100)]
add functions for allocating and adding a string buffer field

10 years agoadd back usock
Felix Fietkau [Mon, 31 Jan 2011 20:24:20 +0000 (21:24 +0100)]
add back usock

10 years agoremove unl
Felix Fietkau [Mon, 31 Jan 2011 19:58:17 +0000 (20:58 +0100)]
remove unl

10 years agolink against libnl-tiny
Felix Fietkau [Mon, 31 Jan 2011 19:30:21 +0000 (20:30 +0100)]
link against libnl-tiny

10 years agoconvert to cmake
Felix Fietkau [Mon, 31 Jan 2011 19:23:34 +0000 (20:23 +0100)]
convert to cmake

10 years agofix json string formatting
Felix Fietkau [Mon, 31 Jan 2011 16:17:40 +0000 (17:17 +0100)]
fix json string formatting

10 years agofix off-by-one in the string validation check
Felix Fietkau [Mon, 31 Jan 2011 15:24:11 +0000 (16:24 +0100)]
fix off-by-one in the string validation check

10 years agoblobmsg: constify and add more validation
Felix Fietkau [Mon, 31 Jan 2011 02:51:06 +0000 (03:51 +0100)]
blobmsg: constify and add more validation

10 years agoblob: constify
Felix Fietkau [Mon, 31 Jan 2011 02:48:02 +0000 (03:48 +0100)]
blob: constify

10 years agomake blob attribute checking available externally
Felix Fietkau [Mon, 31 Jan 2011 02:46:37 +0000 (03:46 +0100)]
make blob attribute checking available externally

10 years agoblob: validate strings on parse
Felix Fietkau [Mon, 31 Jan 2011 02:30:41 +0000 (03:30 +0100)]
blob: validate strings on parse

10 years agoadd support for json-formatting blobmsg elements
Felix Fietkau [Sun, 30 Jan 2011 13:15:57 +0000 (14:15 +0100)]
add support for json-formatting blobmsg elements

10 years agofix json list parsing
Felix Fietkau [Sun, 30 Jan 2011 00:13:32 +0000 (01:13 +0100)]
fix json list parsing

10 years agoadd blobmsg_for_each_attr
Felix Fietkau [Sat, 29 Jan 2011 17:16:12 +0000 (18:16 +0100)]
add blobmsg_for_each_attr

10 years agoblobmsg: make arrays structually the same as tables - simplifies library user code
Felix Fietkau [Sat, 29 Jan 2011 17:00:40 +0000 (18:00 +0100)]
blobmsg: make arrays structually the same as tables - simplifies library user code

10 years agoremove blob_buf::priv
Felix Fietkau [Sat, 29 Jan 2011 17:00:01 +0000 (18:00 +0100)]
remove blob_buf::priv

10 years agoremove #if 0'd debug code
Felix Fietkau [Sat, 29 Jan 2011 12:05:24 +0000 (13:05 +0100)]
remove #if 0'd debug code

10 years agoadd a blobmsg-to-json function
Felix Fietkau [Sun, 23 Jan 2011 21:52:53 +0000 (22:52 +0100)]
add a blobmsg-to-json function

10 years agoimprove validation - add header length
Felix Fietkau [Sun, 23 Jan 2011 19:32:57 +0000 (20:32 +0100)]
improve validation - add header length

10 years agoadd blobmsg_name()
Felix Fietkau [Sun, 23 Jan 2011 19:06:03 +0000 (20:06 +0100)]
add blobmsg_name()

10 years agoadd blobmsg validation function
Felix Fietkau [Sun, 23 Jan 2011 18:55:41 +0000 (19:55 +0100)]
add blobmsg validation function