summaryrefslogtreecommitdiffstats
path: root/src/inspect.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
* inspect: win64 regexp was dead code.Richard Jones2010-11-101-2/+0
|
* lib: Augeas (client side) is not needed by the library.Richard Jones2010-11-101-2/+1
| | | | However it is used by the daemon.
* New API: inspect-get-roots to return roots from last inspection.Richard W.M. Jones2010-11-051-20/+34
| | | | | Return the roots found by the last call to inspect-os, but without redoing the whole inspection.
* inspect: Add support for MeeGo.stable-1.6Richard W.M. Jones2010-11-021-0/+10
|
* inspect: Add support for Ubuntu.Richard Jones2010-10-291-1/+75
|
* inspect: Add detection of Gentoo.Richard Jones2010-10-291-0/+10
|
* inspect: Add detection of Arch Linux.Richard Jones2010-10-291-0/+8
|
* inspect: Add detection of Pardus.Richard Jones2010-10-291-0/+10
|
* inspect: Generic parsing of MAJOR.MINOR in product names.Richard Jones2010-10-291-16/+26
|
* inspect: Generic parsing of release files.Richard Jones2010-10-291-26/+25
|
* inspect: Ignore Pardus "/.swap" swapfile.Richard W.M. Jones2010-10-291-4/+5
|
* New API: inspect-get-windows-systemroot to get systemroot.Richard W.M. Jones2010-10-281-23/+30
| | | | | | We are already using heuristics in the C inspection code to determine the Windows %SYSTEMROOT% directory. This change just exposes this information through the API.
* inspection: Ignore floppy disks and CD-ROM drives (RHBZ#642929).Richard W.M. Jones2010-10-271-0/+7
|
* /dev/mapper paths should not be returned from C inspection APIs (RHBZ#638899).Richard W.M. Jones2010-10-271-17/+32
| | | | | | | | | | | | | | | | With this patch, /dev/mapper paths do not appear in the output of guestfs_inspect_os, as you can see from this example: Welcome to guestfish, the libguestfs filesystem interactive shell for editing virtual machine filesystems. Type: 'help' for a list of commands 'man' to read the manual 'quit' to quit the shell Operating system: Fedora release 13 (Goddard) /dev/vg_f13x64/lv_root mounted on / <--- NB /dev/vda1 mounted on /boot
* Allow $TMPDIR to override most temporary directory uses.Richard W.M. Jones2010-09-241-16/+28
| | | | | | | Be more consistent in allowing the user to override use of the temporary directory by specifying $TMPDIR. Also prefer P_tmpdir macro (defined in <stdio.h>) if that is defined, rather than hard-coding "/tmp" for the fallback location.
* leak: Free PCRE regexps when library is unloaded.Richard W.M. Jones2010-09-211-0/+18
| | | | | | | The compiled PCRE regexps used for inspection were being leaked when the library was unloaded. (Found by valgrind).
* New API: list-filesystems: list filesystemsRichard Jones2010-09-151-0/+137
| | | | | | | | | | | | | | | | | | This API is a simpler replacement for the guestfish commands list-devices / list-partitions / lvs, in the case where you are just examining a guest by hand to see what it contains. Typical usage and output in guestfish is like this: $ guestfish --ro -a /dev/vg_trick/F13x64 ><fs> run ><fs> list-filesystems /dev/vda1: ext4 /dev/vg_f13x64/lv_root: ext4 /dev/vg_f13x64/lv_swap: swap It can also be used to replace programs that try to mount devices to determine if they are mountable filesystems.
* syntax: Remove trailing spaces.Richard Jones2010-09-101-2/+2
|
* New APIs for guest inspection.Richard Jones2010-08-171-0/+1017
| | | | | | | | | | | | | | | | | | | | | This commit converts (some of) the Perl inspection code to C and makes it available through core APIs. The new APIs are: inspect-os - Does the inspection, returns list of OSes inspect-get-* - Get results of the inspection where '*' is one of: type - 'windows' or 'linux' distro - Linux distro arch - architecture product-name - long product name string major-version minor-version - major.minor version of OS mountpoints - get a list of the mountpoints filesystems - get all filesystems associated with the OS This works for all existing supported Linux and Windows OSes.
* New API: file-architectureRichard Jones2010-08-171-0/+280
This change simply converts the existing Perl-only function file_architecture into a core API call. The core API call is written in C and available in all languages and from guestfish.