summaryrefslogtreecommitdiffstats
path: root/src/inspect_apps.c
Commit message (Collapse)AuthorAgeFilesLines
* inspection: Fix calls to case_sensitive_path (RHBZ#858126).Richard W.M. Jones2012-10-011-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | Don't assume that if guestfs_case_sensitive_path returns NULL, that it means the file does not exist. The (previously undefined) behaviour of case_sensitive_path was that a NULL return meant "either the file doesn't exist or some other error". However in commit 973581780d8a006f336684fef6762801402d775d this was changed so that if the last element of the path didn't exist, it was assumed to be a new file and the (non-NULL) path of the new file is returned. This change breaks code (including in libguestfs) which tries to use case_sensitive_path as a dual-purpose call to fix-up a path for Windows and test if the file exists. Such code should be rewritten so that it explicitly tests for file existence after calling case_sensitive_path. I examined all the calls to case_sensitive_path in libguestfs and modified them where necessary. Cherry picked from commit 9ea6e9701461e594033999150f930cc4fafec4d2. (cherry picked from commit ff610469fb8ad1d27dac5d3cb2f1e007d8c0ecc7)
* Mac OS X: Added check of #include <endian.h>Masami HIRATA2012-08-051-0/+3
| | | | | | | Mac OS X doesn't have endian.h Signed-off-by: Masami HIRATA <msmhrt@gmail.com> (cherry picked from commit 6e3f8d2511a63bdcfa7c7d0e5414d5643c4ff599)
* inspect_apps: Avoid double-close on error path (found by Coverity) ↵Richard W.M. Jones2012-03-081-0/+1
| | | | | | | | | (RHBZ#801298). Error: USE_AFTER_FREE: /builddir/build/BUILD/libguestfs-1.16.5/src/inspect_apps.c:392: freed_arg: "fclose" frees "fp". /builddir/build/BUILD/libguestfs-1.16.5/src/inspect_apps.c:404: deref_arg: Calling "fclose" dereferences freed pointer "fp". (cherry picked from commit 270daae52b6a96b4d05cbe03e0b31a0b2e4ac1ae)
* Tempus fugit.Richard W.M. Jones2012-01-181-1/+1
| | | | Update all copyright dates to 2012.
* inspection: Add outline support for GNU/Hurd.Richard W.M. Jones2011-11-281-0/+1
|
* Add basic support for netbsd detection.Michael Scherer2011-10-141-0/+1
|
* Add support for pkgsrc, default NetBSD package manager.Michael Scherer2011-10-141-0/+1
| | | | | | For now, only detect the tool, but support from reading installed package could be added later ( may require either a package of pkgsrc, or a smaller tool to read the db ).
* Require PCRE library.Richard W.M. Jones2011-07-251-6/+4
| | | | This library is widely available in distros.
* Change download_to_tmp so it can work with multi-root operating systems.Richard W.M. Jones2011-06-281-53/+45
| | | | | | | | | | | | | | | | The previous guestfs___download_to_tmp function did not handle multiboot correctly. In particular it used the same cache name for downloaded files from different roots, which could have caused things like applications in each root to be confused. This changes the function so that the cache filename is prefixed with the root / fs number, eg. $tmpdir/0-Name instead of $tmpdir/Name. This change also requires the function to return the new name, so all places in the code which called this function had to be updated. This updates and fixes commit 3c1f762abed92f7a358f3bc93e3396d0606b18ad.
* list-applications: If software hive is missing, this is an error.Richard W.M. Jones2011-04-211-5/+5
| | | | | virt-inspector would exit silently if list-applications failed along this error path.
* inspect: Get version and release of RPM packages.Richard W.M. Jones2011-04-141-10/+153
| | | | | | | | | | This commit downloads the Packages RPM database allowing us to find other details about installed RPM packages (via inspect-list-applications). This adds version and release. Epoch cannot yet be found. This commit also updates the Fedora example image so that it contains a dummy RPM Packages database with some data.
* inspect: Abstract out db_dump code for listing RPM applications.Richard W.M. Jones2011-04-141-81/+28
| | | | | | | | | | | There are two changes here: (1) The code for listing RPM applications ran db_dump and parsed the output. We abstract out that parsing code into a separate reusable module (src/dbdump.c). (2) The old db_dump parsing code used db_dump -p (printable) format. Instead use db_dump -k (hex) format so we can read binary fields.
* inspect: Split code into separate files.Richard W.M. Jones2011-04-141-0/+536
The src/inspect.c file had grown rather large -- 3,500 lines. Split it across several files according to function. This is just moving code. After the split the files are more evenly divided: 536 src/inspect_apps.c 766 src/inspect.c 537 src/inspect_fs.c 404 src/inspect_fs_cd.c 785 src/inspect_fs_unix.c 535 src/inspect_fs_windows.c 3563 total