project/uci.git
10 years agodo not attempt to build lua if disabled
Felix Fietkau [Wed, 6 Apr 2011 23:13:57 +0000 (01:13 +0200)]
do not attempt to build lua if disabled

10 years agoconstify arguments to parser function
Felix Fietkau [Tue, 5 Apr 2011 01:33:38 +0000 (03:33 +0200)]
constify arguments to parser function

10 years agoadd parser helpers similar to the blobmsg parser in libubox
Felix Fietkau [Tue, 5 Apr 2011 01:29:17 +0000 (03:29 +0200)]
add parser helpers similar to the blobmsg parser in libubox

10 years agocli: do not return 0 if the command was invalid
Felix Fietkau [Sat, 2 Apr 2011 13:44:34 +0000 (15:44 +0200)]
cli: do not return 0 if the command was invalid

10 years agoalso link the shared libuci to libdl
Felix Fietkau [Sun, 27 Mar 2011 12:52:58 +0000 (14:52 +0200)]
also link the shared libuci to libdl

10 years agofix lua plugin linker error
Felix Fietkau [Sun, 27 Mar 2011 00:47:23 +0000 (01:47 +0100)]
fix lua plugin linker error

10 years agofix building without plugin support
Felix Fietkau [Sat, 26 Mar 2011 22:37:53 +0000 (23:37 +0100)]
fix building without plugin support

10 years agofix include path
Felix Fietkau [Sat, 26 Mar 2011 20:55:03 +0000 (21:55 +0100)]
fix include path

10 years agouse libdl
Felix Fietkau [Sat, 26 Mar 2011 20:53:17 +0000 (21:53 +0100)]
use libdl

10 years agoallow the user to override the lua path
Felix Fietkau [Sat, 26 Mar 2011 20:46:11 +0000 (21:46 +0100)]
allow the user to override the lua path

10 years agomove ucimap to a separate library
Felix Fietkau [Sat, 26 Mar 2011 20:42:30 +0000 (21:42 +0100)]
move ucimap to a separate library

10 years agoreplace the existing build system with cmake
Felix Fietkau [Sat, 26 Mar 2011 20:40:51 +0000 (21:40 +0100)]
replace the existing build system with cmake

10 years agoimprove support for C++ stuff
Felix Fietkau [Tue, 15 Mar 2011 03:05:15 +0000 (04:05 +0100)]
improve support for C++ stuff

10 years agofix uci_list_set_pos to reorder sections properly, even when moving a section to...
Felix Fietkau [Wed, 19 Jan 2011 20:30:35 +0000 (21:30 +0100)]
fix uci_list_set_pos to reorder sections properly, even when moving a section to the last position

11 years agomake uci_file_commit() static
Felix Fietkau [Tue, 28 Dec 2010 17:14:39 +0000 (18:14 +0100)]
make uci_file_commit() static

11 years agolua: use uci_foreach_element_safe in uci_lua_foreach() - patch by jow
Felix Fietkau [Mon, 1 Nov 2010 13:43:00 +0000 (14:43 +0100)]
lua: use uci_foreach_element_safe in uci_lua_foreach() - patch by jow

11 years agoadd a helper function for looking up an option string
Felix Fietkau [Tue, 28 Sep 2010 09:17:23 +0000 (11:17 +0200)]
add a helper function for looking up an option string

11 years agofix return value in inline lookup functions
Felix Fietkau [Tue, 28 Sep 2010 09:12:41 +0000 (11:12 +0200)]
fix return value in inline lookup functions

11 years agoucimap: ucimap_parse: consider smap_offset when allocating the section data
Lars-Peter Clausen [Sat, 21 Aug 2010 00:51:48 +0000 (02:51 +0200)]
ucimap: ucimap_parse: consider smap_offset when allocating the section data

Currently when there is no custom section data allocator the ucimap_section_data
struct has to be at the beginning at the containing structure.
This patch gets rid of that restriction by taking smap_offset into account.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
11 years agoadd convenience functions for looking up packages/sections/options
Felix Fietkau [Sat, 21 Aug 2010 01:17:38 +0000 (03:17 +0200)]
add convenience functions for looking up packages/sections/options

11 years agoremove the unused "complete" parameter for uci_fill_ptr()
Felix Fietkau [Sat, 21 Aug 2010 00:47:25 +0000 (02:47 +0200)]
remove the unused "complete" parameter for uci_fill_ptr()

11 years agoadd support for partial lookups - skip lookup for filled-in sections or packages
Felix Fietkau [Sat, 21 Aug 2010 00:44:32 +0000 (02:44 +0200)]
add support for partial lookups - skip lookup for filled-in sections or packages

11 years agoprovide backwards compatibility in the lua module after the history -> delta change
Felix Fietkau [Fri, 20 Aug 2010 18:45:04 +0000 (20:45 +0200)]
provide backwards compatibility in the lua module after the history -> delta change

11 years agomake uci_lookup_ptr() use the extended flag properly again
Felix Fietkau [Fri, 20 Aug 2010 13:51:07 +0000 (15:51 +0200)]
make uci_lookup_ptr() use the extended flag properly again

11 years agosplit off and compile delta.c separately
Felix Fietkau [Fri, 20 Aug 2010 13:27:22 +0000 (15:27 +0200)]
split off and compile delta.c separately

11 years agouci_history -> uci_delta
Felix Fietkau [Fri, 20 Aug 2010 12:59:27 +0000 (14:59 +0200)]
uci_history -> uci_delta

11 years agosplit off and compile util.c separately
Felix Fietkau [Fri, 20 Aug 2010 12:56:30 +0000 (14:56 +0200)]
split off and compile util.c separately

11 years agoexport uci_parse_ptr
Felix Fietkau [Fri, 20 Aug 2010 12:55:15 +0000 (14:55 +0200)]
export uci_parse_ptr

11 years agosplit off and compile file.c separately
Felix Fietkau [Fri, 20 Aug 2010 12:51:18 +0000 (14:51 +0200)]
split off and compile file.c separately

11 years agosimplify dependency handling
Felix Fietkau [Tue, 17 Aug 2010 11:34:04 +0000 (13:34 +0200)]
simplify dependency handling

11 years agosimplify code (thx, henning)
Felix Fietkau [Sat, 23 Jan 2010 19:55:55 +0000 (20:55 +0100)]
simplify code (thx, henning)

12 years agoFix memory leak in uci_list_config_files
Justin Bronder [Tue, 1 Dec 2009 16:13:41 +0000 (11:13 -0500)]
Fix memory leak in uci_list_config_files

When glob returns non-zero, the path buffer was not unallocated.

12 years agoAllow setting of libdirname.
Justin Bronder [Thu, 18 Jun 2009 17:49:28 +0000 (13:49 -0400)]
Allow setting of libdirname.

Modifies the Makefiles so that the installer can specify the name
of the directory that libraries should be installed into by setting
LIBDIRNAME.  For instance 'lib' or 'lib64'.

12 years agofix compile on snow leopard
Felix Fietkau [Fri, 6 Nov 2009 08:14:58 +0000 (09:14 +0100)]
fix compile on snow leopard

12 years agolua: use extended lookups by default
Felix Fietkau [Wed, 28 Oct 2009 20:13:27 +0000 (21:13 +0100)]
lua: use extended lookups by default

12 years agolua: add uci.foreach() error handling patch by xMff
Felix Fietkau [Mon, 19 Oct 2009 11:33:27 +0000 (13:33 +0200)]
lua: add uci.foreach() error handling patch by xMff

12 years agofix uci_lookup_ptr comments
Felix Fietkau [Thu, 17 Sep 2009 09:27:15 +0000 (11:27 +0200)]
fix uci_lookup_ptr comments

12 years agoadd test/save to .gitignore
Felix Fietkau [Sun, 6 Sep 2009 19:42:17 +0000 (21:42 +0200)]
add test/save to .gitignore

12 years agoucimap: simplify the parse/format callbacks. the data argument now always points...
Felix Fietkau [Sun, 6 Sep 2009 19:40:10 +0000 (21:40 +0200)]
ucimap: simplify the parse/format callbacks. the data argument now always points to the field in the data structure

12 years agoucimap: fix list size initialization, validate list size on fixups as well
Felix Fietkau [Sun, 6 Sep 2009 17:20:01 +0000 (19:20 +0200)]
ucimap: fix list size initialization, validate list size on fixups as well

12 years agoucimap: fix list initialization
Felix Fietkau [Sun, 6 Sep 2009 17:07:21 +0000 (19:07 +0200)]
ucimap: fix list initialization

12 years agoadd some comments to the header file
Felix Fietkau [Sat, 5 Sep 2009 00:51:42 +0000 (02:51 +0200)]
add some comments to the header file

12 years agoreplace the use of list.h in the ucimap core, relicense ucimap to LGPL v2.1, update...
Felix Fietkau [Sat, 5 Sep 2009 00:32:37 +0000 (02:32 +0200)]
replace the use of list.h in the ucimap core, relicense ucimap to LGPL v2.1, update copyright headers

12 years agoremove ucimap type->name conversion unless DEBUG is enabled
Felix Fietkau [Fri, 4 Sep 2009 23:24:40 +0000 (01:24 +0200)]
remove ucimap type->name conversion unless DEBUG is enabled

12 years agofix a typo
Felix Fietkau [Fri, 4 Sep 2009 23:22:37 +0000 (01:22 +0200)]
fix a typo

12 years agoucimap: add support for saving lists to uci
Felix Fietkau [Fri, 4 Sep 2009 23:10:42 +0000 (01:10 +0200)]
ucimap: add support for saving lists to uci

12 years agotest: do not print expected error messages
Felix Fietkau [Fri, 4 Sep 2009 22:45:12 +0000 (00:45 +0200)]
test: do not print expected error messages

12 years agoucimap: add helper function for resizing lists and freeing items (both using ucimap...
Felix Fietkau [Fri, 4 Sep 2009 22:39:41 +0000 (00:39 +0200)]
ucimap: add helper function for resizing lists and freeing items (both using ucimap internal allocation list), add test coverage for config change operations

12 years agoadd sanity checks for optmap section type vs sectionmap type
Felix Fietkau [Fri, 4 Sep 2009 18:07:06 +0000 (20:07 +0200)]
add sanity checks for optmap section type vs sectionmap type

12 years agoucimap: add custom free() callbacks for options, only used on custom datatypes
Felix Fietkau [Fri, 4 Sep 2009 01:59:11 +0000 (03:59 +0200)]
ucimap: add custom free() callbacks for options, only used on custom datatypes

12 years agoadd ucimap_free_section to the api
Felix Fietkau [Fri, 4 Sep 2009 00:57:43 +0000 (02:57 +0200)]
add ucimap_free_section to the api

12 years agofix a null pointer deref in uci_file_commit when overwriting history data
Felix Fietkau [Fri, 4 Sep 2009 00:55:00 +0000 (02:55 +0200)]
fix a null pointer deref in uci_file_commit when overwriting history data

12 years agoadd type safety checks for option maps
Felix Fietkau [Fri, 4 Sep 2009 00:42:54 +0000 (02:42 +0200)]
add type safety checks for option maps

12 years agobuild ucimap-example in make all
Felix Fietkau [Fri, 4 Sep 2009 00:19:34 +0000 (02:19 +0200)]
build ucimap-example in make all

12 years agoonly call section ->add callbacks after all fixups have been processed, also call...
Felix Fietkau [Wed, 2 Sep 2009 00:43:03 +0000 (02:43 +0200)]
only call section ->add callbacks after all fixups have been processed, also call ->add for sections manually parsed later

12 years agofix missing api change
Felix Fietkau [Tue, 1 Sep 2009 15:07:51 +0000 (17:07 +0200)]
fix missing api change

12 years agopreserve section list order
Felix Fietkau [Tue, 1 Sep 2009 03:03:05 +0000 (05:03 +0200)]
preserve section list order

12 years agorename ucimap_data::section to ptr
Felix Fietkau [Tue, 1 Sep 2009 01:23:01 +0000 (03:23 +0200)]
rename ucimap_data::section to ptr

12 years agoadd missing build dependencies
Felix Fietkau [Tue, 1 Sep 2009 00:51:59 +0000 (02:51 +0200)]
add missing build dependencies

12 years agoexpose the ucimap_parse_section function in the api, do not defer fixups if immediate...
Felix Fietkau [Tue, 1 Sep 2009 00:27:55 +0000 (02:27 +0200)]
expose the ucimap_parse_section function in the api, do not defer fixups if immediate lookup works

12 years agoprotect ucimap.h against multiple inclusions
Felix Fietkau [Mon, 31 Aug 2009 21:28:53 +0000 (23:28 +0200)]
protect ucimap.h against multiple inclusions

12 years agomove ucimap into the core library
Felix Fietkau [Mon, 31 Aug 2009 21:20:54 +0000 (23:20 +0200)]
move ucimap into the core library

12 years agoucimap: add new UCIMAP_LIST_AUTO for automatically converting multiple list items...
Felix Fietkau [Mon, 31 Aug 2009 20:44:34 +0000 (22:44 +0200)]
ucimap: add new UCIMAP_LIST_AUTO for automatically converting multiple list items whitespace-separated in an option

12 years agoucimap: properly test bool interpretation
Felix Fietkau [Sun, 30 Aug 2009 15:43:38 +0000 (17:43 +0200)]
ucimap: properly test bool interpretation

12 years agoucimap: fix boolean interpretation, add range checks for int values (thx, henning)
Felix Fietkau [Sun, 30 Aug 2009 15:41:15 +0000 (17:41 +0200)]
ucimap: fix boolean interpretation, add range checks for int values (thx, henning)

12 years agoadd missing lib flags for ucimap-example
Felix Fietkau [Sun, 30 Aug 2009 14:36:45 +0000 (16:36 +0200)]
add missing lib flags for ucimap-example

12 years agoremove ucimap-example during make clean
Felix Fietkau [Sun, 30 Aug 2009 13:47:53 +0000 (15:47 +0200)]
remove ucimap-example during make clean

12 years agoturn ucimap-example.c into a test case
Felix Fietkau [Sun, 30 Aug 2009 13:37:22 +0000 (15:37 +0200)]
turn ucimap-example.c into a test case

12 years agoadd missing null pointer check after malloc
Felix Fietkau [Sun, 30 Aug 2009 01:12:49 +0000 (03:12 +0200)]
add missing null pointer check after malloc

12 years agoucimap: clarify alloc
Felix Fietkau [Sun, 30 Aug 2009 00:55:22 +0000 (02:55 +0200)]
ucimap: clarify alloc

12 years agobump major version
Felix Fietkau [Sun, 30 Aug 2009 00:54:16 +0000 (02:54 +0200)]
bump major version

12 years agoucimap: some hints
Felix Fietkau [Sun, 30 Aug 2009 00:53:48 +0000 (02:53 +0200)]
ucimap: some hints

12 years agoucimap: implement format callback for custom data types
Felix Fietkau [Sun, 30 Aug 2009 00:51:11 +0000 (02:51 +0200)]
ucimap: implement format callback for custom data types

12 years agoucimap: add example for using the alloc callback
Felix Fietkau [Sat, 29 Aug 2009 21:01:20 +0000 (23:01 +0200)]
ucimap: add example for using the alloc callback

12 years agoucimap: allow api users to take over allocation of section data structures
Felix Fietkau [Sat, 29 Aug 2009 20:59:02 +0000 (22:59 +0200)]
ucimap: allow api users to take over allocation of section data structures

12 years agoucimap: move the section data to a dedicated field inside the managed structs
Felix Fietkau [Sat, 29 Aug 2009 20:53:26 +0000 (22:53 +0200)]
ucimap: move the section data to a dedicated field inside the managed structs

12 years agoucimap: rename uci_sectmap* to uci_sectionmap*
Felix Fietkau [Sat, 29 Aug 2009 20:28:26 +0000 (22:28 +0200)]
ucimap: rename uci_sectmap* to uci_sectionmap*

12 years agoucimap: add callback for validation/conversion and custom data type
Felix Fietkau [Sat, 29 Aug 2009 18:14:19 +0000 (20:14 +0200)]
ucimap: add callback for validation/conversion and custom data type

12 years agoshorten callback names
Felix Fietkau [Sat, 29 Aug 2009 17:41:57 +0000 (19:41 +0200)]
shorten callback names

12 years agoucimap: add an example for optmap data structure encapsulation
Felix Fietkau [Sat, 29 Aug 2009 16:50:28 +0000 (18:50 +0200)]
ucimap: add an example for optmap data structure encapsulation

12 years agoucimap: cleanup OPTMAP_OPTION macro, rename to UCIMAP_OPTION
Felix Fietkau [Sat, 29 Aug 2009 16:46:04 +0000 (18:46 +0200)]
ucimap: cleanup OPTMAP_OPTION macro, rename to UCIMAP_OPTION

12 years agoucimap: ignore unhandled data structure changes for now
Felix Fietkau [Sat, 29 Aug 2009 16:39:21 +0000 (18:39 +0200)]
ucimap: ignore unhandled data structure changes for now

12 years agofix ucimap_set_changed
Felix Fietkau [Sat, 29 Aug 2009 16:37:27 +0000 (18:37 +0200)]
fix ucimap_set_changed

12 years agoucimap: free memory allocated for fixups
Felix Fietkau [Sat, 29 Aug 2009 16:35:54 +0000 (18:35 +0200)]
ucimap: free memory allocated for fixups

12 years agoucimap: clean up list handling, use arrays instead of linked lists
Felix Fietkau [Sat, 29 Aug 2009 16:34:49 +0000 (18:34 +0200)]
ucimap: clean up list handling, use arrays instead of linked lists

12 years agoucimap: allow sectmaps to specify the option map data structure size (useful for...
Felix Fietkau [Sat, 29 Aug 2009 14:30:28 +0000 (16:30 +0200)]
ucimap: allow sectmaps to specify the option map data structure size (useful for encapsulating it in another data structure

12 years agoucimap-example: make data structures static
Felix Fietkau [Sat, 29 Aug 2009 14:29:51 +0000 (16:29 +0200)]
ucimap-example: make data structures static

12 years agolua: add a return code for aborting iteration in uci_foreach
Felix Fietkau [Mon, 24 Aug 2009 23:42:01 +0000 (01:42 +0200)]
lua: add a return code for aborting iteration in uci_foreach

12 years agodo not fail when attempting to set a nonexistant option to an empty value
Felix Fietkau [Tue, 18 Aug 2009 19:04:40 +0000 (21:04 +0200)]
do not fail when attempting to set a nonexistant option to an empty value

12 years agowhen running uci set with an empty value, fall back to uci remove
Felix Fietkau [Tue, 18 Aug 2009 19:00:34 +0000 (21:00 +0200)]
when running uci set with an empty value, fall back to uci remove

12 years agoadd plugin support
Felix Fietkau [Mon, 8 Jun 2009 00:36:09 +0000 (02:36 +0200)]
add plugin support

12 years agoadd reorder to lua api
Felix Fietkau [Sat, 23 May 2009 02:56:43 +0000 (04:56 +0200)]
add reorder to lua api

12 years agoadd section reordering to libuci and cli
Felix Fietkau [Sat, 23 May 2009 02:50:27 +0000 (04:50 +0200)]
add section reordering to libuci and cli

12 years agoincrease argv in batch mode to silence a false gcc 4.4 warning
Felix Fietkau [Thu, 30 Apr 2009 19:35:53 +0000 (21:35 +0200)]
increase argv in batch mode to silence a false gcc 4.4 warning

12 years agodon't bail out on locking errors, when flock() is not supported
Felix Fietkau [Thu, 23 Apr 2009 15:06:10 +0000 (17:06 +0200)]
don't bail out on locking errors, when flock() is not supported

12 years agocreate missing lib dir on installation
Felix Fietkau [Sat, 11 Apr 2009 02:53:20 +0000 (04:53 +0200)]
create missing lib dir on installation

12 years agofix const related compile error with newer gcc
Felix Fietkau [Fri, 10 Apr 2009 23:16:02 +0000 (01:16 +0200)]
fix const related compile error with newer gcc

12 years agoadd missing fflush() on close - fixes a bug in the lock/unlock order (thx, Cyrus)
Felix Fietkau [Tue, 24 Mar 2009 15:48:13 +0000 (16:48 +0100)]
add missing fflush() on close - fixes a bug in the lock/unlock order (thx, Cyrus)

12 years agofix compilation on later glibc/gcc versions with stricter checks
Felix Fietkau [Mon, 23 Feb 2009 14:57:12 +0000 (15:57 +0100)]
fix compilation on later glibc/gcc versions with stricter checks

12 years agofix signed vs unsigned char validation bug
Felix Fietkau [Tue, 20 Jan 2009 13:17:29 +0000 (14:17 +0100)]
fix signed vs unsigned char validation bug