oweals/uci.git
15 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

15 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

15 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

15 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

15 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

15 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

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

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

15 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

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

15 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

15 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

15 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

15 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

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

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

15 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

15 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

15 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

15 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

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

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

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

15 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

15 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

15 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

15 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

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

15 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

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

15 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

15 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

15 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

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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

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

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

15 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

15 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

15 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

15 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

15 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

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

15 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

15 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

15 years agolua: fix rewriting uci lists
Felix Fietkau [Tue, 20 Jan 2009 00:28:02 +0000 (01:28 +0100)]
lua: fix rewriting uci lists

15 years agomake the uci_ptr struct reusable after a call to uci_delete()
Felix Fietkau [Tue, 20 Jan 2009 00:07:28 +0000 (01:07 +0100)]
make the uci_ptr struct reusable after a call to uci_delete()

15 years agoadd uci.rename()
Felix Fietkau [Sun, 18 Jan 2009 02:03:32 +0000 (03:03 +0100)]
add uci.rename()

15 years agobump major version
Felix Fietkau [Sat, 27 Dec 2008 18:52:36 +0000 (19:52 +0100)]
bump major version

15 years agofix uci rename for anonymous sections
Felix Fietkau [Sat, 27 Dec 2008 18:52:18 +0000 (19:52 +0100)]
fix uci rename for anonymous sections

15 years agoadd initial version of the shell api
Felix Fietkau [Tue, 23 Dec 2008 11:31:23 +0000 (12:31 +0100)]
add initial version of the shell api

15 years agoadd foreign key and list support for ucimap
Felix Fietkau [Fri, 28 Nov 2008 10:33:23 +0000 (11:33 +0100)]
add foreign key and list support for ucimap

16 years agofix memory leak reported in https://dev.openwrt.org/ticket/4236
Felix Fietkau [Tue, 25 Nov 2008 16:29:08 +0000 (17:29 +0100)]
fix memory leak reported in https://dev.openwrt.org/ticket/4236

16 years agolua: add uci.add_history to the api
Felix Fietkau [Sat, 15 Nov 2008 11:55:33 +0000 (12:55 +0100)]
lua: add uci.add_history to the api

16 years agoadd libucimap
Felix Fietkau [Fri, 14 Nov 2008 21:38:57 +0000 (22:38 +0100)]
add libucimap

16 years agoinstall development headers
Felix Fietkau [Fri, 14 Nov 2008 21:20:27 +0000 (22:20 +0100)]
install development headers

16 years agodon't redefine container_of if it's already defined
Felix Fietkau [Fri, 14 Nov 2008 21:20:18 +0000 (22:20 +0100)]
don't redefine container_of if it's already defined

16 years agolua: fix uci.set_list
Felix Fietkau [Fri, 14 Nov 2008 16:52:11 +0000 (17:52 +0100)]
lua: fix uci.set_list

16 years agomake extended syntax on uci show optional (but enabled by default)
Felix Fietkau [Wed, 15 Oct 2008 11:39:40 +0000 (13:39 +0200)]
make extended syntax on uci show optional (but enabled by default)

16 years agoput more descriptive names on anonymous sections when running uci show (can be reused...
Felix Fietkau [Wed, 15 Oct 2008 11:27:50 +0000 (13:27 +0200)]
put more descriptive names on anonymous sections when running uci show (can be reused for uci set/del/...) - based on an idea by xMff

16 years agooverhaul package and section type validation - makes it easier to read and fixes...
Felix Fietkau [Fri, 5 Sep 2008 19:51:46 +0000 (21:51 +0200)]
overhaul package and section type validation - makes it easier to read and fixes some bugs in uci changes and uci show without explicit package references

16 years agoadd .index field to sections
Felix Fietkau [Fri, 5 Sep 2008 19:36:45 +0000 (21:36 +0200)]
add .index field to sections

16 years agofix lua binding include path
Felix Fietkau [Thu, 4 Sep 2008 23:59:14 +0000 (01:59 +0200)]
fix lua binding include path

16 years agofix uci batch nesting check (patch by lars)
Felix Fietkau [Thu, 4 Sep 2008 23:20:09 +0000 (01:20 +0200)]
fix uci batch nesting check (patch by lars)

16 years agofix segmentation fault / endless loop on history loads
Felix Fietkau [Thu, 4 Sep 2008 23:15:00 +0000 (01:15 +0200)]
fix segmentation fault / endless loop on history loads

16 years agoproperly search for lua includes and the library directory
Felix Fietkau [Sun, 31 Aug 2008 16:46:31 +0000 (18:46 +0200)]
properly search for lua includes and the library directory

16 years agoAdd mkdir to Makefile and Makefile.inc, use $prefix for binary
Jens Muecke [Sun, 24 Aug 2008 17:28:09 +0000 (19:28 +0200)]
Add mkdir to Makefile and Makefile.inc, use $prefix for binary

16 years agofix segfault in uci batch
Felix Fietkau [Sun, 31 Aug 2008 10:17:56 +0000 (12:17 +0200)]
fix segfault in uci batch

16 years agofix uci.save() with cursors
Felix Fietkau [Wed, 27 Aug 2008 21:05:21 +0000 (23:05 +0200)]
fix uci.save() with cursors

16 years agofix uci.get()
Felix Fietkau [Wed, 27 Aug 2008 20:44:44 +0000 (22:44 +0200)]
fix uci.get()

16 years agoadd \n to error messages only when output goes to stderr
Felix Fietkau [Wed, 27 Aug 2008 20:07:52 +0000 (22:07 +0200)]
add \n to error messages only when output goes to stderr

16 years agopush out uci error messages to lua as well
Felix Fietkau [Wed, 27 Aug 2008 20:05:54 +0000 (22:05 +0200)]
push out uci error messages to lua as well

16 years agoextend api to be able to get a full error string instead of printing it
Felix Fietkau [Wed, 27 Aug 2008 19:43:08 +0000 (21:43 +0200)]
extend api to be able to get a full error string instead of printing it

16 years agofix segfault in extended section lookup
Felix Fietkau [Wed, 27 Aug 2008 19:38:54 +0000 (21:38 +0200)]
fix segfault in extended section lookup

16 years agoadd uci.cursor() support based on a patch by CyrusFF
Felix Fietkau [Wed, 27 Aug 2008 18:16:58 +0000 (20:16 +0200)]
add uci.cursor() support based on a patch by CyrusFF

16 years agoadd get functions for savedir and confdir
Felix Fietkau [Wed, 27 Aug 2008 15:09:50 +0000 (17:09 +0200)]
add get functions for savedir and confdir

16 years agofix sanity checks for uci.set to be able to create new sections
Felix Fietkau [Wed, 27 Aug 2008 14:45:56 +0000 (16:45 +0200)]
fix sanity checks for uci.set to be able to create new sections

16 years agofix incomplete lookups for uci.get()
Felix Fietkau [Wed, 27 Aug 2008 14:43:40 +0000 (16:43 +0200)]
fix incomplete lookups for uci.get()

16 years agoreport errors on partial lookups for show/get in the cli instead of silently falling...
Felix Fietkau [Wed, 27 Aug 2008 14:31:49 +0000 (16:31 +0200)]
report errors on partial lookups for show/get in the cli instead of silently falling back to the last match

16 years agoCheck for segfault and illegal instruction when expecting an error
Frédéric Moulins [Tue, 26 Aug 2008 10:28:00 +0000 (12:28 +0200)]
Check for segfault and illegal instruction when expecting an error

When an error is expected, fail the test when return code is :
* 139: segmentation fault
* 132: illegal instruction

16 years agoadd an extra option check for tuple parsing
Felix [Mon, 25 Aug 2008 23:20:43 +0000 (01:20 +0200)]
add an extra option check for tuple parsing

16 years agoAdd parsing tests for get, set and show
Frédéric Moulins [Mon, 25 Aug 2008 21:46:44 +0000 (23:46 +0200)]
Add parsing tests for get, set and show

Hello,

the result of 'make test' is explicit, even if there is much noise for
the same issue I think.

Do not miss segmentation faults in the log when testing section index
corner cases.

fred

16 years agoadd .anonymous attribute for uci sections in lua
Felix [Sun, 24 Aug 2008 15:35:29 +0000 (17:35 +0200)]
add .anonymous attribute for uci sections in lua

16 years agoAdds a unit test framework based on shunit2
Felix [Sat, 23 Aug 2008 13:03:23 +0000 (15:03 +0200)]
Adds a unit test framework based on shunit2

Includes simple tests for :
- uci import
- uci export
- uci get
- uci set
- uci add

shunit2 :
http://code.google.com/p/shunit2/

Signed-off-by: Frédéric Moulins <ffrrrr@gmail.com>
16 years agofilter incomplete lookups on uci show
Felix Fietkau [Sat, 23 Aug 2008 11:39:05 +0000 (13:39 +0200)]
filter incomplete lookups on uci show

16 years agofilter out duplicate changes when using uci_set to change option values
Felix Fietkau [Sat, 23 Aug 2008 11:36:39 +0000 (13:36 +0200)]
filter out duplicate changes when using uci_set to change option values

16 years agowork around a gcc optimizer bug
Felix Fietkau [Sat, 23 Aug 2008 09:44:07 +0000 (11:44 +0200)]
work around a gcc optimizer bug

16 years agofix 4-arg uci.set()
Felix Fietkau [Sat, 23 Aug 2008 09:14:15 +0000 (11:14 +0200)]
fix 4-arg uci.set()

16 years agoadd some missing initializations
Felix Fietkau [Sat, 23 Aug 2008 09:10:41 +0000 (11:10 +0200)]
add some missing initializations

16 years agoport lua bindings to new uci api
Felix Fietkau [Sat, 23 Aug 2008 09:07:13 +0000 (11:07 +0200)]
port lua bindings to new uci api

16 years agofix uci revert
Felix Fietkau [Fri, 22 Aug 2008 20:08:06 +0000 (22:08 +0200)]
fix uci revert

16 years agofix uci delete
Felix Fietkau [Fri, 22 Aug 2008 20:03:22 +0000 (22:03 +0200)]
fix uci delete

16 years agoclean up uci_set
Felix Fietkau [Fri, 22 Aug 2008 20:02:20 +0000 (22:02 +0200)]
clean up uci_set

16 years agouci_revert api cleanup
Felix Fietkau [Fri, 22 Aug 2008 18:39:37 +0000 (20:39 +0200)]
uci_revert api cleanup