Gustavo Sverzut Barbieri
27fdf63153
index: fix memleak for non-matchin aliases.
2011-12-10 13:28:18 -02:00
Gustavo Sverzut Barbieri
d091546448
index-mm: allocate values inline into node, strings points to mmap.
...
For mmap mode, we can avoid allocating and copying strings from the
mmap'ed memory.
With that we have fixed length "struct index_mm_value" that can be
allocated inline with "struct index_mm_node".
2011-12-10 13:04:43 -02:00
Gustavo Sverzut Barbieri
148226ed92
index: cleanup header, move as much as possible to libkmod-index.c
2011-12-10 11:53:51 -02:00
Gustavo Sverzut Barbieri
15c1c143f2
index-mm: no need to allocate prefix.
2011-12-10 11:44:31 -02:00
Gustavo Sverzut Barbieri
fc2d835df5
index-mm: fix memory access.
...
uint32_t reads must be aligned, they're not then use memcpy().
read_alloc_chars_mm() and read_chars_mm() were wrong, normalize all
address calculation using single byte pointer "addr" that is
incremented by the amount read, this will avoid further errors.
2011-12-10 11:36:35 -02:00
Lucas De Marchi
5109f2b422
index: mm: Add flag to open call to populate buffer
2011-12-08 19:51:06 -02:00
Gustavo Sverzut Barbieri
558b020704
remove useless look checking for duplicates
2011-12-08 16:36:48 -02:00
Gustavo Sverzut Barbieri
1433ba9ef5
index: avoid strlen() whenever possible.
2011-12-08 16:35:36 -02:00
Gustavo Sverzut Barbieri
435ad788e2
reduce calls to realloc() if size did not change.
2011-12-08 16:35:36 -02:00
Gustavo Sverzut Barbieri
405f614af9
index: improve buffer management and reduce mallocs.
...
Grow buffer based on a step, avoiding hitting the system over and over
again.
Do not allocate the 'struct buffer' as in all cases the lifetime is
known and the pattern was allocate then free in every call site.
2011-12-08 14:38:22 -02:00
Lucas De Marchi
8f923be69a
index: change license to LGPL
...
I've got an explicit permit from index author to re-license it as LGPL.
2011-12-03 04:30:16 -02:00
Lucas De Marchi
5a7ade7191
index: update copyrignt
...
mmap implementation
2011-12-03 04:07:16 -02:00
Lucas De Marchi
bf89f70ca3
index: mmap: add support for seaching with wildcards
...
Almost a clean copy & paste from the previous implementation.
2011-12-03 04:07:16 -02:00
Lucas De Marchi
b797b79183
index: mmap: add support for searching
...
Almost a clean copy & paste from the previous implementation.
2011-12-03 04:07:16 -02:00
Lucas De Marchi
e33bb87cae
index: mmap: add support for searching node
...
Almost a clean copy & paste from the previous implementation.
2011-12-03 04:07:16 -02:00
Lucas De Marchi
91298dc79e
index: mmap: read child node
2011-12-03 04:07:15 -02:00
Lucas De Marchi
77bf936a89
index: mmap: read root node
2011-12-03 04:07:15 -02:00
Lucas De Marchi
836be9ac5f
index: mmap: create and destroy node
2011-12-03 04:07:15 -02:00
Lucas De Marchi
b471a6b494
index: mmap: open and close file
2011-12-03 04:06:16 -02:00
Lucas De Marchi
e71970ae44
index: follow libkmod coding style
2011-12-02 10:29:36 -02:00
Lucas De Marchi
eb8bb32e42
Remove redundant comments
2011-12-02 10:25:17 -02:00
Lucas De Marchi
85078e6eef
index: remove unused functions
2011-12-02 10:21:42 -02:00
Lucas De Marchi
1d152accf3
index: re-order functions so prototypes are not needed
2011-12-02 10:15:00 -02:00
Lucas De Marchi
3a61c84faa
Remove trailing whitespace
2011-12-02 10:08:52 -02:00
Lucas De Marchi
963ca5586e
Fix 'redundant redeclaration' warnings
2011-12-02 10:07:25 -02:00
Lucas De Marchi
93688880db
Fix 'old style declaration' warnings
2011-12-02 10:05:31 -02:00
Lucas De Marchi
0fbdfef3f9
Clean 'shadowed declaration' warnings
...
index is a function in string.h, so replace index with idx all over the
source code.
2011-12-02 09:56:22 -02:00
Lucas De Marchi
a7be73b917
Remove trailing whitespaces
2011-11-30 15:59:47 -02:00
Lucas De Marchi
e8847fd2fc
Import index handling from module-init-tools
...
This effectively makes the combined work be GPL. All other parts of this
library are still LGPL and if this part in future becomes
double-licensed, we can switch back to LGPL.
2011-11-30 15:23:49 -02:00