summaryrefslogtreecommitdiffstats
path: root/src/inspect.c
Commit message (Collapse)AuthorAgeFilesLines
* inspect: Check /etc/lsb-release is not too large before calling head on it.Richard W.M. Jones2010-11-181-1/+16
| | | | (cherry picked from commit 35afe0cb33c986bf595585a716ff259cf3415a1f)
* inspect: Add function to read the first line of a file, with safety checks.Richard W.M. Jones2010-11-181-14/+42
| | | | (cherry picked from commit a4448956e9a815aff59cac3d98caf80f620fc4c4)
* inspect: Abstract the wrapper that sets up Augeas.Richard W.M. Jones2010-11-181-32/+49
| | | | | | This is just code motion. Cherry picked from commit 61cfe13ec49f1d1e9d6124f0ee98520aab720087.
* inspect: Centralize all file downloads through a single function.Richard W.M. Jones2010-11-181-32/+52
| | | | Cherry picked from commit 8a3a4c25d3bb63674c9ccf8483d9bfd89085fe47.
* inspect: Refuse to download software hive if it is huge.Richard W.M. Jones2010-11-181-0/+8
| | | | (cherry picked from commit e44cf42f362d793c47d892a18a6853d88abd6ecb)
* inspect: Refuse to parse /etc/fstab if it is huge.Richard W.M. Jones2010-11-181-0/+8
| | | | (cherry picked from commit 692f127447d399db21c2e93026d4d2b0ac1839d1)
* Abstract out check_architecture and check_fstab_aug_open functions.Richard W.M. Jones2010-11-181-8/+29
| | | | | | This is part of the development commit 79b202ca26226e0a95e3f04ac7ff91e9eb918b48 excluding the new FreeBSD feature.
* inspect: Fix error out path if minor_version parsing fails.Richard W.M. Jones2010-11-181-1/+1
| | | | (cherry picked from commit 9674a73c08e128d8a7a39a6be6140c373c0e61f0)
* lib: Make some error strings localizable.Richard W.M. Jones2010-11-181-3/+3
| | | | (cherry picked from commit 528cd8f64176ca50f5b82db5682b0ee31833b162)
* lib: Add match3 function.Richard W.M. Jones2010-11-181-0/+25
| | | | (cherry picked from commit 55e6ccb23e0b1f954107b4d0284d3d41f7a4e7b8)
* lib: Make pcre, libmagic and hivex libraries optional.Richard Jones2010-11-181-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 Cherry picked from commit a0b4caa0821b759de01361b7019c9c9c9607027d.
* inspect: win64 regexp was dead code.Richard Jones2010-11-181-2/+0
| | | | (cherry picked from commit 8ac9575b204a8ac85f9030500cb6eabbf6aa3226)
* lib: Augeas (client side) is not needed by the library.Richard Jones2010-11-181-2/+1
| | | | | | However it is used by the daemon. Cherry picked from commit b52183b5491748d9e979d30e55db6d648b102416.
* 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.