aboutsummaryrefslogtreecommitdiffstats
path: root/swabber.c
AgeCommit message (Collapse)Author
2011-02-01Move canonicalize() into a separate fileDavid Borman
Move canonicalize() into a separate file, and add some testing code that can be enabled by compiling with -DTEST_PROGRAM. There are some built-in test paths, as well as the ability to read tests from a file. Signed-off-by: David Borman <david.borman@windriver.com>
2011-02-01Speed up swabber string searchesDavid Borman
There are two places in swabber where it is building up a list of filenames, by constructing a linked list. These lists gets searched for a match before adding a new filename, so that filenames are only added once. Scanning down this unordered linked list can be very expensive as the list grows. Many of the files can be referenced many times, and we can speed up the detecting of matches by moving a matched entry to the front of the list. This way frequently found filenames tend to stay towards the beginning of the list, making checks for them much quicker. Signed-off-by: David Borman <david.borman@windriver.com>
2011-02-01Speed up swabber file processingDavid Borman
Most of the files in the package_files list are not referenced, and hence they don't get any tags. Yet the print_tags routine was walking down the entire package_files list for every package. This simple optimization is to create a linked list of just those package_files records that contain tags, and then iterate over that shorter list for each package. In my test case it went from walking an array of over 170,000 items, to walking a linked list of only 100 item. Signed-off-by: David Borman <david.borman@windriver.com>
2011-02-01Use putc() instead of fwrite() for single charactersDavid Borman
When there is only a single character to be written, use putc() instead of fwrite(). Signed-off-by: David Borman <david.borman@windriver.com>
2011-02-01Switch argument processing to getopt(3)David Borman
Convert the argument processing to use getopt(3). Also convert the parsing of the -c option to be in a separate subroutine, and to make use of the strtok(3) routine, and add the ability to prepend the task names with '-' to disable that task. Signed-off-by: David Borman <david.borman@windriver.com>
2011-02-01Whitespace and formatting cleanupDavid Borman
Clean up whitespace issues and make the format closer to K&R. Signed-off-by: David Borman <david.borman@windriver.com>
2011-02-01Revert "Remove some unused symbols."Alex deVries
This reverts commit b83056f18556b3a02ad5c0c8da18e0d3f27ac534.
2011-02-01Remove some unused symbols.Alex deVries
2011-02-01Clean up compilation warningsDavid Borman
Clean up the compilaton warnings so that everything builds without any warnings. Signed-off-by: David Borman <david.borman@windriver.com>
2010-11-23Change error reporting when loading lists.Alex deVries
Handle concept of generic distributions, or distribution families.
2010-11-23Removing debug comments that were inserted to find problems finding ↵Alex deVries
detect_distro.
2010-11-18basic support for fstat and stat calls.Alex deVries
2010-11-17Fix problem where calling swabber without an absolute path reallyAlex deVries
screws up the finding of detect_distro.
2010-11-17Fix up segfault if you don't specify any filters.Alex deVries
2010-11-17Handle filters for different directories properly.Alex deVries
2010-11-15Adding distro detection.Alex deVries
2010-11-15Add usage information for file_detailAlex deVries
2010-11-15Add file_details option.Alex deVries
Fix null pointer problem in it.
2010-11-12- added external filtersAlex deVries
- added support for specification of the location of white/black/filter list files - fixed lists' insert to handle ordering properly - filters are now linked lists.
2010-11-11Add support for recursive directories for logs.Alex deVries
Deal with whitelists properly.
2010-11-11Handling null reference pointer.Alex deVries
Prefix dangerous errors with * for easy searching. Updated bug list.
2010-11-04Removing structures as they've moved to swabber.hAlex deVries
Add canolicalize() to handle "foo/../bar", which turns into bar/ Add shrink_path_dirname(), which pretty prints long patsh Various pretty-printing code. New error handling code. New handling of black and white lists. Various new options.
2010-10-12Add blacklist handling, change format of output.Alex deVries
2010-10-12Adding whitelist handling, plus blacklist backend support.Alex deVries
2010-10-08Cleanup of some compiler warnings.Alex deVries
2010-10-08Fix up option parsing.Alex deVries
2010-10-08Fixing up task parsing.Alex deVries
2010-10-08Make error handling work again, and handle errors for execve.Alex deVries
2010-10-08Canonicalize filenames, to resolve "//" to "/", and "foo/bar/.." to "foo/"Alex deVries
2010-10-08Fix error code handling, and add -c command line option.Alex deVries
2010-09-21Various changes intended for better, more complete reporting.Alex deVries
2010-09-17Automatically detect if a path is a dir of log files or a single log file. ↵Alex deVries
Eliminate -m option.
2010-09-17Adding -r feature, which lets you put reports in a separate file, rather ↵Alex deVries
than just stdout. Also removing progress flag, since it is all fast enough now.
2010-09-15Fixing some inocuous compiler warnings.Alex deVries
2010-09-15Adding better documentation.Alex deVries
Adding missing packages.h Better usage information for swabber. Small changes to load_distro.c
2010-08-31Initial import of swabber.Alex deVries