summaryrefslogtreecommitdiffstats
path: root/src/inspect.c
Commit message (Collapse)AuthorAgeFilesLines
* inspection: Add outline support for GNU/Hurd.Richard W.M. Jones2011-11-281-0/+1
|
* md: Inspect MD devicesMatthew Booth2011-11-241-0/+16
|
* NFC: Declare and use variables on the same line in inspect.cMatthew Booth2011-11-241-4/+2
|
* 32 bit: Use %td for ptrdiff_t (difference between two pointers).Richard W.M. Jones2011-11-111-1/+1
|
* Allow compilation without hivex (RHBZ#723474).Richard W.M. Jones2011-10-211-92/+92
|
* inspection: Return root devices sorted.Richard W.M. Jones2011-10-191-0/+11
|
* Add basic support for netbsd detection.Michael Scherer2011-10-141-1/+2
|
* 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 ).
* Add Opensuse and zypper detection supportMichael Scherer2011-10-141-0/+2
| | | | This would also erronously detect SLES as Opensuse.
* Detect Mageia distributionMichael Scherer2011-10-141-0/+1
|
* inspection: Add support for ttylinux (a minimal Linux).Richard W.M. Jones2011-09-161-0/+1
|
* 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-34/+39
| | | | | | | | | | | | | | | | 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.
* inspect: "centos" and "scientificlinux" are now separate distros.Richard W.M. Jones2011-04-211-0/+2
| | | | Previously we returned "rhel" for these, which was not accurate.
* inspect: Split code into separate files.Richard W.M. Jones2011-04-141-2533/+37
| | | | | | | | | | | | | | | | | 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
* inspect: Move shared PCRE match functions to separate file.Richard W.M. Jones2011-04-131-98/+0
| | | | This is just moving code around.
* inspect: Cache downloaded files in the handle g->tmpdir.Richard W.M. Jones2011-04-131-56/+72
| | | | | | | | | | | | | | | | | | During inspection we download various files such as the Windows 'software' and 'system' registries. Previously these were downloaded as temporary files and discarded immediately after use. This meant that the 'software' registry was being downloaded twice by virt-inspector (it's required once for basic OS inspection, and a second time to list Windows applications). This commit changes this so that these files are cached in g->tmpdir, and thus the second time we just reuse the file we've already downloaded. Callers shouldn't be relying on inspect-list-applications to reread the actual registry from the VM (unless you close and reopen the handle). It says in the documentation that the results of inspection may be cached in the handle.
* inspect: Fix some small memory leaks in Windows inspection.Richard W.M. Jones2011-04-121-0/+3
| | | | Found using valgrind.
* New API: inspect-get-drive-mappingsRichard W.M. Jones2011-04-051-1/+179
| | | | | | | | | | | | This returns the drive mappings from the Windows Registry. virt-inspector displays the drive mappings, giving output similar to this: <drive_mappings> <drive_mapping name="C">/dev/sda2</drive_mapping> <drive_mapping name="E">/dev/sdb1</drive_mapping> </drive_mappings>
* New API: inspect-get-windows-current-control-setRichard W.M. Jones2011-04-051-9/+65
| | | | | | | | | | | | | | This returns the actual registry key corresponding to CurrentControlSet (eg. it might be "ControlSet001"). Previously the inspection code was hard-coding ControlSet001. Now we use the correct control set, and also make it available to callers through the API. This commit also updates the virt-dhcp-address example so it uses this new API. virt-inspector displays the current control set when available.
* Rename resolve_windows_path_silently to case_sensitive_path_silently.Richard W.M. Jones2011-04-051-9/+9
| | | | | | A more accurate description of what this function does. This is just code motion.
* inspect: Detect 32 bit applications running on WOW64 emulator (RHBZ#692545).Richard W.M. Jones2011-03-311-42/+56
| | | | | | | These applications are located along a different Registry path. See http://support.microsoft.com/kb/896459 for all the details. Thanks Jinxin Zheng for finding the bug and the solution.
* inspector: Add detection of Slackware.Richard W.M. Jones2011-03-251-0/+12
| | | | Notes: Labels: feature
* New API: guestfs_inspect_get_product_variantRichard W.M. Jones2011-03-231-0/+25
| | | | | | | | | | This returns a product variant for inspected operating systems. In practice this is a useful way to distinguish between consumer and enterprise/server versions of Windows that otherwise have the same version number. Notes: Labels: feature
* inspect: Don't fail for Windows guests with multiple disks (RHBZ#674130).Richard W.M. Jones2011-03-221-2/+13
| | | | | Notes: Labels: bugfix, RHBZ#674130 Depends: 5776c145d411e5ae00072ecf422055f3d0bd29e2
* inspect: Simplify Windows root heuristic code.Richard W.M. Jones2011-03-221-12/+38
| | | | | | | | | Add special is_file_nocase and is_dir_nocase functions and remove the duplicate checks for files and directories with different cases. Notes: Labels: codemotion
* New event API (RHBZ#664558).Richard W.M. Jones2011-03-151-14/+10
| | | | | | | | | | | | | This API allows more than one callback to be registered for each event, makes it possible to call the API from other languages, and allows [nearly all] log, debug and trace messages to be rerouted from stderr. An older version of this API was discussed on the mailing list here: https://www.redhat.com/archives/libguestfs/2010-December/msg00081.html https://www.redhat.com/archives/libguestfs/2011-January/msg00012.html This also updates guestfish to use the new API for its progress bars.
* Detect Red Hat Desktop as 'rhel' distro (RHBZ#682979).Richard W.M. Jones2011-03-081-3/+3
| | | | | | | | | | | | | /etc/redhat-release on Red Hat Desktop contains the following string: Red Hat Desktop release 4 (Nahant Update 8) Previously we matched against the string "Red Hat Enterprise Linux" but since this does not contain that string, this distro wasn't being detected correctly. Note this also changes the obsolete Perl code, for the benefit of virt-v2v.
* Fix inspection code when PCRE or hivex is missing.Richard W.M. Jones2011-03-031-0/+24
|
* Add ability to inspect install disks and live CDs.Richard W.M. Jones2011-01-151-35/+527
| | | | | For examples of the virt-inspector output, see the additional inspector/example-*.xml files in this commit.
* inspect: Add macros for file size limits.Richard W.M. Jones2011-01-151-9/+37
| | | | | | This also bumps the file size limit for "small text files" up to 2 MB, since we want to parse Windows CD txtsetup.sif files that are usually around 500K in size.
* Remove several unused local variables.Richard W.M. Jones2010-12-101-4/+0
| | | | (Revealed by compiling under Debian where this is a warning).
* inspect: Detect if db_dump and db_load programs are available.Richard W.M. Jones2010-11-241-1/+7
| | | | | | If db_dump is not available then disable RPM application detection. Note these utilities have odd names on Debian.
* inspect: Fix memory leak of hostname.Richard W.M. Jones2010-11-191-0/+1
| | | | | This fixes a memory leak introduced by commit fab75c0337d7897d10ea5e95e47ac05eab81ace9.
* New API: inspect-get-hostname to return the hostname of the guest.Richard W.M. Jones2010-11-161-3/+238
| | | | | This returns the hostname of the guest. Tested on RHEL, Fedora, Debian 5, Ubuntu 10.10, FreeBSD 8, Windows 7.
* inspect: Check /etc/lsb-release is not too large before calling head on it.Richard W.M. Jones2010-11-161-1/+16
|
* inspect: Add function to read the first line of a file, with safety checks.Richard W.M. Jones2010-11-161-14/+42
|
* inspect: Abstract the wrapper that sets up Augeas.Richard W.M. Jones2010-11-161-33/+50
| | | | This is just code motion.
* New API: inspect-list-applications.Richard W.M. Jones2010-11-151-0/+452
| | | | | | | | This converts the current Perl code in virt-inspector for listing applications, into C, making it a part of the core API. This is also capable of fetching the list of Windows applications from the registry.
* inspect: Centralize all file downloads through a single function.Richard W.M. Jones2010-11-151-32/+52
|
* inspect: Add support for Linux Mint and Mandriva.Richard Jones2010-11-151-1/+35
| | | | | | | | Linux Mint is derived from Ubuntu. Mandriva has a release file, but it also has /etc/lsb-release and the same parsing code can be reused. Mandriva has a package manager called urpmi.
* inspect: Fix error out path if minor_version parsing fails.Richard W.M. Jones2010-11-131-1/+1
|
* inspect: Refuse to download software hive if it is huge.Richard W.M. Jones2010-11-131-0/+8
|
* inspect: Refuse to parse /etc/fstab if it is huge.Richard W.M. Jones2010-11-131-0/+8
|
* lib: Make some error strings localizable.Richard W.M. Jones2010-11-131-3/+3
|
* inspect: Inspection support for FreeBSD.Richard W.M. Jones2010-11-131-11/+111
| | | | | | | | | | This adds inspection support for FreeBSD. However this is not quite enough to allow guestfish -i freebsd.img to work, because guestfish will try to mount the filesystems, which cannot be done because Linux requires special mount options for the Universal Filesystem (UFS) used by *BSD. Nevertheless you can manually run the same commands.
* inspect: Optimize root filesystem check.Richard W.M. Jones2010-11-131-8/+13
| | | | Avoid duplicate checks for things like /etc and /bin.
* lib: Add match3 function.Richard W.M. Jones2010-11-131-0/+25
|
* New APIs: inspect-get-package-format, inspect-get-package-management.Richard Jones2010-11-121-0/+146
| | | | This APIs reimplement some parts of virt-inspector in C.
* lib: Make pcre, libmagic and hivex libraries optional.Richard Jones2010-11-101-425/+182
| | | | | | | | | | | | | | | This change makes these libraries optional. If they are not available at compile time then certain core API features will be disabled (see below). This also changes PCRE detection to use pkg-config instead of the ad hoc autoconf checks. The large inspect.c file has been split out into separate function-specific files. file-architecture: requires pcre & libmagic inspection: requires pcre & hivex