summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* file: Fix file command on /dev/VG/LV paths (RHBZ#582484).Richard Jones2010-06-081-1/+1
| | | | | | | | | | | | | Previous commit 4df593496e116dfb635731c058b7627e81fc179c broke the "file" command on logical volume paths, since these are symbolic links. We *should* follow these (only). This inadvertantly broke virt-inspector too, which indicates that we need more regression testing in this area. Since carrying whole Fedora images around could make the distribution even larger than now, I'm not sure at the moment how to do this. Thanks to Matt Booth for diagnosing this bug.
* file: Restrict to regular files (RHBZ#582484).Richard Jones2010-06-041-5/+18
| | | | | | | | | | | | | | | | | | | | | | The file call can hang if called on char devices (because we are using the file -s option). This is hard to solve cleanly without adding another file API. However this restricts file to regular files, unless called explicitly with a /dev/ path. For non-regular files, it will now return a string like "directory". There is a small semantic change for symbolic links. Previously it would not have worked at all on absolute links (or rather, the results would have been undefined). It would have treated relative symlinks to regular files as the regular file itself. Now it will return the string "symbolic link" in both cases. This commit also makes the API safe when called on untrusted filesystems. Previously a filesystem might have been set up so that (eg) /etc/redhat-release was a char device, which would have caused virt-inspector and virt-v2v to hang. Now it will not hang.
* touch: Restrict touch to regular files only (RHBZ#582484).Richard Jones2010-06-041-1/+4
|
* mkfs-b: Map block size to cluster size for VFAT and NTFS partitions ↵Richard Jones2010-06-031-2/+17
| | | | | | | (RHBZ#599464). This also adds a regression test for VFAT and (conditionally) NTFS filesystems.
* generator: Allow individual tests to depend on daemon features.Richard Jones2010-06-031-2/+12
| | | | | | | | Using IfAvailable "featurename" we allow individual tests to only run if the feature is available in the daemon. This will allow us to extend testing to a lot more optional features such as NTFS.
* tests: Factor out common code into 'is_available' function.Richard Jones2010-06-031-10/+16
| | | | This commit is just code motion.
* grub-install: Enable grub-install tests and create explicit device.map file.Richard Jones2010-06-031-4/+7
|
* grub-install: In docs suggest manually creating device.map (RHBZ#484986).Richard Jones2010-06-031-1/+12
|
* resize2fs: Document this command also works with ext4 (thanks Yufang Zhang).Richard Jones2010-06-021-3/+3
|
* fish: help command return error for non-existent commands (RHBZ#597145).Richard Jones2010-06-021-3/+5
| | | | | | | | | | | | | | With this change, the exit status indicates error for non-existent commands. $ guestfish -h foo foo: command not known, use -h to list all commands $ echo $? 1 $ guestfish help foo foo: command not known, use -h to list all commands $ echo $? 1
* daemon: write-file: Check range of size parameter (RHBZ#597135).Richard Jones2010-06-021-1/+3
| | | | This also adds a regression test.
* Fix and deprecate get_e2label and get_e2uuid (RHBZ#597112).Richard Jones2010-06-011-3/+8
| | | | | | | | | Fix these calls (see description in RHBZ#597112), but also deprecate them since the new calls vfs_label and vfs_uuid can work on any filesystem type. This also adds a regression test for the original bug reported in RHBZ#597112.
* New APIs: vfs-label and vfs-uuid return label and uuid for many fs types.Richard Jones2010-06-012-1/+24
| | | | | | | | | | | These APIs generalize the existing 'get-e2label' and 'get-e2uuid' calls, to provide calls which should be able to get the label and UUID for most filesystem types. These use 'blkid' to do the work. I have tested that the blkid commands themselves work on RHEL 5. (Suggested by Yufang Zhang).
* Fix documentation for vfs-type to reflect reality.Richard Jones2010-05-271-5/+6
|
* Clarify documentation on distro backports in version command.Richard Jones2010-05-271-2/+4
|
* Add reference to version number documentation to version command.Richard Jones2010-05-271-0/+2
|
* Clarify sparse behaviour of truncate-size command.Richard Jones2010-05-271-2/+7
|
* Fix typo in documentation of guestfs_readlinklist.Richard Jones2010-05-271-1/+1
|
* Fix missing word in docuentation of guestfs_readdir.Richard Jones2010-05-271-1/+1
|
* Revise documentation on creating files.Richard Jones2010-05-271-1/+5
|
* New API: fallocate64 (replaces fallocate).Richard Jones2010-05-272-2/+24
| | | | | | guestfs_fallocate takes an integer for the length, effectively limiting it to creating 1GB files. This new call takes an int64_t for the length, but is otherwise identical.
* Fix typo in description of echo-daemon command.Richard Jones2010-05-261-2/+2
|
* Add tests for available-all-groups command.Richard Jones2010-05-251-1/+1
|
* fish: New command: 'supported'Richard Jones2010-05-251-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | This checks all available optional groups and prints out which ones are supported by the daemon. Note you must launch the appliance first. Example: ><fs> supported augeas yes inotify yes linuxfsuuid yes linuxmodules yes linuxxattrs yes lvm2 yes mknod yes ntfs3g yes ntfsprogs yes realpath yes scrub yes selinux yes xz yes zerofree yes
* New API: available-all-groups to return list of all optional groups.Richard Jones2010-05-252-1/+15
|
* guestfs_version: Correct documentation.Richard Jones2010-05-221-2/+3
| | | | | Remove reference to 'ELF weak linking tricks' and replace with suggestion to use dl* functions.
* Build workaround for Python 2.4.x in RHEL 5.Richard W.M. Jones2010-05-211-0/+6
| | | | | See: http://www.python.org/dev/peps/pep-0353/#conversion-guidelines
* C99 compatible build fix for RHEL 5.Richard W.M. Jones2010-05-211-3/+6
|
* New API: ntfsresize-size to allow shrinking NTFS (RHBZ#585223).Richard Jones2010-05-212-1/+8
|
* New API: pvresize-size to allow shrinking PVs (RHBZ#585222).Richard Jones2010-05-211-0/+7
|
* New API: resize2fs-size to allow shrinking ext2 filesystems (RHBZ#585221).Richard Jones2010-05-211-0/+7
|
* fish: Allow suffixes on number parameters (eg. 1M)Richard Jones2010-05-211-1/+4
| | | | | | | | | | | | | | | | This small change uses the gnulib xstrtoll functionality to enable suffixes on integer parameters in guestfish. For example: truncate-size /file 1G (previously you would have had to given the full number). This also applies to the 'alloc' and 'sparse' commands (and indirectly to the -N option). The specification for these commands has changed slightly, in that 'alloc foo 1MB' would now use SI units, allocating 1000000 bytes instead of a true megabyte. All existing uses would use 'alloc foo 1M' which still allocates true megabytes.
* generator: Make 'xz' into an optional group.Richard Jones2010-05-201-2/+2
| | | | | | | On Ubuntu <= Karmic, xz-utils was not packaged, and therefore any xz-related tests would fail. Thus make this an optional group so that we can test for this and avoid running the tests if xz utils are not present.
* generator: Check parameters are not NULL (RHBZ#501893).Richard Jones2010-05-201-10/+47
| | | | | | | | | | | | | | This adds additional tests to check that several types of parameter including String are not NULL when passed to the C functions. Previously this would cause a segfault inside libguestfs. With this change, you get an error message / exception. Of the possible pointer parameters, only OptString is now permitted to be NULL. This change does not affect the Perl bindings. This is because Perl XS code was already adding similar checks if you passed undef into a parameter expecting a string.
* generator: Some String parameters should be OptString (RHBZ#501894).Richard Jones2010-05-201-2/+2
| | | | | I haven't checked the list of functions exhaustively, but these are the obvious ones.
* New API: Implement pwrite system call (partial fix for RHBZ#592883).Richard Jones2010-05-202-2/+30
|
* New API: write for creating files with fixed content (RHBZ#501889).Richard Jones2010-05-203-51/+54
| | | | | | | | | | | | | The guestfs_write call can be used to create small files with arbitrary 8 bit content, including \0 bytes. This replaces and deprecates write-file, which cannot be modified to use BufferIn because of an unfortunate choice in the ABI: the size parameter to write-file, if zero, means that the daemon tries to calculate the length of the buffer using strlen. However this fails if we pass a zero-length buffer using BufferIn because then the daemon tries to do strlen on a (really) zero length buffer, not even containing a terminating \0 character, thus segfaulting.
* generator: Implement BufferIn parameter type (RHBZ#501889).Richard Jones2010-05-201-38/+165
| | | | | | | | | | | | The BufferIn argument turns into various things: in C const char *, size_t parameter pair in XDR an opaque<> type (instead of string) which allows \0 chars in other bindings mostly just a string, since most languages except for C permit strings to contain any 8 bit data
* Unify supermin appliance building using febootstrap 2.7Richard Jones2010-05-131-12/+10
|
* Fix FileIn cmds losing synch if both ends send cancel messages (RHBZ#576879).Richard Jones2010-05-131-9/+9
| | | | | | | | | | | | | | | | | | | | | | | During a FileIn command (eg. upload, tar-in) if both sides experience errors, then both sides could send cancel messages, the result being lost synchronization. The reason for the lost synch was because the daemon was ignoring this case and sending an error message back which the library side (which had cancelled) was not expecting. Fix this by checking in the daemon for the case where the library also cancels during daemon cancellation, and not sending an error messages. This also includes an enhanced regression test which checks for this case. This extends the original fix in commit 5922d7084d6b43f0a1a15b664c7082dfeaf584d0. More details can be found here: https://bugzilla.redhat.com/show_bug.cgi?id=576879#c5
* Fix error message in string-e command (RHBZ#588651).Richard Jones2010-05-131-4/+33
|
* Add version numbers to Perl modules (RHBZ#521674).Richard Jones2010-05-121-11/+17
| | | | | | | | | | Sys::Guestfs now contains a version number which reflects the ABI that we are compiled against, ie. '0.<MAX_PROC_NR>'. This has the beneficial side effect of causing an error if the user tries to mix versions of the Perl module and the XS code. Sys::Guestfs::Lib now contains a synthetic version number which will reflect future changes in that module.
* New API: fill-pattern for creating files with predefined patterns.Richard Jones2010-05-122-2/+15
|
* launch: Rearrange the code so config check is first.Richard Jones2010-05-081-12/+12
| | | | | | | Move the config state check first in the guestfs_launch function, so that we don't reset g->launch_t or calculate the temporary directory in the case where the launch function will immediately return with an error.
* generator: FishAction is no longer used, remove this feature.Richard Jones2010-05-081-5/+1
|
* fish: Make 'launch' function static.Richard Jones2010-05-081-1/+1
| | | | | | This commit makes the launch function static and private to 'fish.c', and changes the generator so the function is no longer called for the 'run/launch' command.
* If qemu dies during launch, set an error message (RHBZ#588851).Richard Jones2010-05-071-4/+11
|
* daemon: Fix read-file so it fails gracefully for large files (RHBZ#589039).Richard Jones2010-05-071-1/+14
| | | | | | | | | | | | | | | | Pengzhen Cao noticed that read-file would fail for files larger than the protocol size; this is *not* the bug. However it would also lose protocol synchronization after this. The reason was that functions which return RBufferOut in the generator must not 'touch' the *size_r parameter along error return paths. I fixed read-file and initrd-cat, and I checked that pread was doing the right thing. This also adds regression tests for read-file with various categories of large file.
* daemon: Fix wc* commands to work on absolute symbolic links (RHBZ#579608).Richard Jones2010-05-071-1/+4
|
* daemon: Fix strings to work on absolute symbolic links (RHBZ#579608).Richard Jones2010-05-071-1/+4
|