| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This is just code motion.
Some files cannot be renamed. Notably rpcgen input and output files
must not contain dash characters, else rpcgen breaks.
|
|
|
|
|
| |
If the partition name we're about to return doesn't really exist,
then don't perform the mapping.
|
|
|
|
|
|
|
|
| |
See https://bugzilla.redhat.com/show_bug.cgi?id=836573#c3
for an explanation.
Useful function 'is_partition' shows how to tell if a device name
represents a partition.
|
|
|
|
|
|
| |
This is mostly code motion, although it also fixes a memory leak in an
extremely rare failure case, and it generally tidies up the existing
code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(RHBZ#823821).
Change guestfs___first_line_of_file so that if the file is empty this
returns an empty string instead of an error. This is consistent with
the behaviour of this function in the case where the file starts with
a \n character, where it would previously have returned an empty
string.
Change all callers so that they handle this case.
Then change the hostname parsing code so that it doesn't give up when
/etc/HOSTNAME is empty, but falls through to the next alternative, and
similarly for /etc/hostname.
Thanks Todd Mummert for finding and diagnosing this bug.
|
|
|
|
|
|
|
|
|
| |
parse_release_file should be used to set fs->product_name, instead of
calling guestfs___first_line_of_file directory, although currently the
two are equivalent.
This is code motion and fixes
commit b648b1813fc8e55db790435b5414d9be3ec765d2.
|
| |
|
|
|
|
| |
(RHBZ#811872).
|
|
|
|
| |
Unclear if this is a real bug or not.
|
| |
|
|
|
|
|
|
|
|
| |
In two places, we were counting things in an array using an 'int'. In
theory, the int could overflow, so gcc determines this to be undefined
behaviour.
The fix is to use size_t or ssize_t instead.
|
| |
|
|
|
|
|
| |
UUID parsing returned 'false' (ie. 0 == OK) when the UUID contained
illegal characters. Now it returns -1 == failure.
|
| |
|
|
|
|
|
| |
FreeDOS is returned as type="dos", distro="freedos". No version or
application information is returned at present.
|
| |
|
|
|
|
| |
Update all copyright dates to 2012.
|
|
|
|
|
|
|
|
|
| |
This patch fixes inspection when fstab contains devices md devices
specified as /dev/mdN. The appliance creates these devices without reference to
the guest's mdadm.conf so, for e.g. /dev/md0 in the guest will often be created
as /dev/md127 in the appliance. With this patch, we match the uuids of detected
md devices against uuids specified in mdadm.conf, and map them appropriately
when we encounter them in fstab.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Select non-comment labels using an augeas path to return the correct
nodes in the first instance, rather than applying a regular expression
to all results.
There is no functional change to the code.
RWMJ:
- Rebased to current HEAD.
- Move variable decls to top of function.
- Some whitespace changes.
- Remove check for errors from snprintf since it can never happen.
|
| |
|
|
|
|
| |
This change is in support of the addition of MD support to fstab inspection.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We currently use a heuristic to guess how drive names we find
referenced in the guest map to drive names in the appliance. If this
heuristic fails it can cause inspection to fail.
This change adds a new 'name' option to add_drive_opts, which allows
the user to explicitly pass the name of a drive to libguestfs if it is
known. This change also updates the fstab-parsing inspection code to
use this information if it is available.
|
| |
|
|
|
|
|
| |
The regular expression matching disk name assumed that there was only a single
letter suffix. This change handles a naming scheme for any number of disks.
|
| |
|
|
|
|
| |
This would also erronously detect SLES as Opensuse.
|
| |
|
|
|
|
|
|
|
| |
This means "the device that holds /etc/fstab", so map it correctly.
This fixes support for ttylinux and also some other guests that use
/dev/root instead of a real device name.
|
| |
|
| |
|
|
|
|
| |
This library is widely available in distros.
|
|
|
|
| |
Previously we returned "rhel" for these, which was not accurate.
|
|
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
|