project/libubox.git
12 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

12 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

12 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

12 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

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

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

12 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

12 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.

12 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

12 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

12 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

12 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)

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

13 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)

13 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

13 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)

13 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)

13 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

13 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

13 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)

13 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

13 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

13 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

13 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

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

13 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

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

13 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

13 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

13 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)

13 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

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

13 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

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

13 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

13 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

13 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

13 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

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

13 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

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

13 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

13 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

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

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

13 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

13 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

13 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

13 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

13 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

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

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

13 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

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

13 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

13 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

13 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*

13 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

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

13 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

13 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

13 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

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

13 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

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

13 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

13 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

13 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

13 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

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

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

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

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

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

13 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

13 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

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

13 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

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

13 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

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

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

13 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

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

13 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

13 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

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

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

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

13 years agoupdate avl implementation from packetbb
Felix Fietkau [Sat, 22 Jan 2011 16:02:23 +0000 (17:02 +0100)]
update avl implementation from packetbb

13 years agoadd BLOBMSG_TYPE_LAST
Felix Fietkau [Wed, 29 Dec 2010 14:08:45 +0000 (15:08 +0100)]
add BLOBMSG_TYPE_LAST

13 years agomerge an avl list implementation (imported from PacketBB)
Felix Fietkau [Tue, 28 Dec 2010 22:59:06 +0000 (23:59 +0100)]
merge an avl list implementation (imported from PacketBB)

13 years agouloop: add a flag for keeping the socket blocking
Felix Fietkau [Mon, 6 Dec 2010 15:54:13 +0000 (16:54 +0100)]
uloop: add a flag for keeping the socket blocking

13 years agouloop: fix infinite waiting with kqueue
Felix Fietkau [Mon, 6 Dec 2010 00:16:59 +0000 (01:16 +0100)]
uloop: fix infinite waiting with kqueue

13 years agoconstify blob_attr_info
Felix Fietkau [Sun, 5 Dec 2010 22:31:33 +0000 (23:31 +0100)]
constify blob_attr_info

13 years agoport uloop to BSD kqueue
Felix Fietkau [Sat, 4 Dec 2010 23:38:58 +0000 (00:38 +0100)]
port uloop to BSD kqueue

13 years agomake usock generic
Felix Fietkau [Sat, 4 Dec 2010 22:09:20 +0000 (23:09 +0100)]
make usock generic

13 years agoremove ucix - packages depending on it should ship it directly
Felix Fietkau [Sat, 4 Dec 2010 22:08:26 +0000 (23:08 +0100)]
remove ucix - packages depending on it should ship it directly

13 years agocompile a subset on darwin
Felix Fietkau [Fri, 3 Dec 2010 18:16:10 +0000 (19:16 +0100)]
compile a subset on darwin

14 years agoInitial import
Felix Fietkau [Wed, 13 Oct 2010 19:17:51 +0000 (21:17 +0200)]
Initial import