summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Documentation updates.Richard Jones2010-04-121-0/+13
| | | | | | | | | Fix copyright years. Fix URLs to point to new PRC site. Make sure guestfish(1) and guestfs(3) manpages reference the current list of tools. (cherry picked from commit 9a608a1516bd339dc6d5ebe9952d3bced273c416)
* New partition APIs: part_del, part_get_bootable, part_get/set_mbr_idRichard Jones2010-04-122-1/+56
| | | | | | | | | These APIs flesh out further the partitioning API. Note for stable-1.2 branch: Cherry picked from b68c030adfdbefe65bc9 and modified to apply against stable-1.2. We need these new APIs in order to support bugfixes in virt-resize.
* Documentation: Clarify documentation on the bootable flag.Richard Jones2010-04-121-4/+3
| | | | (cherry picked from commit 30752ac7ca042f533b8d0c4c6144400a8532b154)
* If qemu dies during launch in "null vmchannel" mode, don't hang (RHBZ#579155).Richard Jones2010-04-081-1/+9
| | | | | | | Detect if qemu dies during launch by wait(2)-ing for it, and then getting EOF on the qemu pipe. This was broken in null vmchannel mode, causing a hang. (cherry picked from commit e35debd642bea240609775610b68145dab0a634b)
* Don't kill self accidentally.Richard Jones2010-04-081-3/+3
| | | | | | | Always check that pid > 0 before calling kill (pid, 9). The issue was that sometimes pid == 0, and this ends up killing ourselves. (cherry picked from commit dc5df3bfec706803e75a5f2454293db30e753249)
* Fix for "warning: unexpected connection from UID ..."Richard Jones2010-04-081-0/+1
| | | | | | | | | This warning is currently a fatal error. The code attempts to retry the accept call, but because we don't reset sock = -1 the retry doesn't happen and it dies anyway. Set sock = -1 so the retry attempt can happen. (cherry picked from commit fb4ec82d97f71963ea7f830cb0bc38abefcbac99)
* fish: Print extended help when the user types an unknown command first.Richard Jones2010-04-081-0/+2
| | | | | | | | | $ guestfish /tmp/disk.img /tmp/disk.img: unknown command Did you mean to open a disk image? guestfish -a disk.img For a list of commands: guestfish -h For complete documentation: man guestfish (cherry picked from commit 4c50f4c38d9a50fbf983c79dd208d1b1598fef8a)
* tests: Move alarm(2) calls to the correct place in the tests.Richard Jones2010-03-271-3/+3
| | | | This is a re-fix for RHBZ#505329.
* rescue: Pass $TERM from library into the virt-rescue appliance.Richard Jones2010-03-261-0/+2
| | | | | We set it on the kernel command line, then get it out from there when the rescue appliance boots.
* appliance: Set $PATH instead of hard-coding paths to binaries everywhere.Richard Jones2010-03-261-1/+1
| | | | | | Change the appliance so PATH includes common directories. Thus we don't need to hard-code paths to binaries (eg. "/sbin/fdisk") everywhere.
* perl: use newSVpvn for variable length strings.Richard Jones2010-03-251-3/+3
| | | | | | | Previously we used newSVpv (str, len), but if len == 0 then this means Perl tries to calculate the string length using strlen(3). This is not desirable when we know the length, in which case we should use newSVpvn instead.
* New API: guestfs_copy_size to copy a fixed number of bytes.Richard Jones2010-03-232-2/+15
| | | | | | | This is similar to 'guestfs_dd', but it copies just a fixed number of bytes from the source to the destination. It's an error if the source is too short or if the destination is too small.
* Change some _exit(0|1) to _exit(EXIT_SUCCESS|EXIT_FAILURE).Richard W.M. Jones2010-03-231-4/+4
|
* guestfs.h: Include <stdint.h>.Richard Jones2010-03-221-0/+1
| | | | | | | | This allows programs to work if they just #include <guestfs.h> and no other headers. It's not useful in the general case, but fixes some configure-time tests, particularly the one for Ruby on OS X.
* Mac OS X: Disable null vmchannel implementation.Richard Jones2010-03-221-1/+14
| | | | | | | | | As far as I can tell, Darwin has no way to check the peer euid of a _loopback_ TCP socket. This is required for the "null vmchannel" implementation to work securely. Therefore disable this - Darwin will use one of the other supported vmchannel implementations instead.
* Mac OS X: 'xdr_uint32_t' is 'xdr_u_int32_t'Richard Jones2010-03-221-0/+4
|
* Mac OS X: implement readline functions.Richard Jones2010-03-221-3/+12
| | | | | OS X has an older version of readline with some differences in the names of functions.
* Mac OS X: include <rpc/types.h> before <rpc/xdr.h>Richard Jones2010-03-221-0/+1
| | | | | | In PortableXDR this is not included automatically so we have to include it explicitly to get definitions for the XDR types.
* Mac OS X: include <string.h> in guestfs-actions.cRichard Jones2010-03-221-0/+1
| | | | This is required because guestfs-actions.c uses 'memset'.
* Mac OS X: Fix HAVE_GNU_CALLOC so it works when __GLIBC__ is not defined.Richard Jones2010-03-221-0/+4
|
* Mac OS X: strerror_r on Macs is not like GNU strerror_r.Richard Jones2010-03-221-1/+1
| | | | | Really this should be turned into a configure-time test. Perhaps one exists already?
* Mac OS X: define MAX macro if not already defined.Richard Jones2010-03-221-0/+4
|
* Mac OS X: kill(2) requires <signal.h>Richard Jones2010-03-221-0/+1
|
* generator: Small fix for GODI users.Richard Jones2010-03-221-0/+1
| | | | | GODI has an odd package layout, so the generator was unable to find xml-light. Add the GODI directory to the search path.
* Run qemu with -nographic option.Richard Jones2010-03-221-2/+3
| | | | | On Mac OS X this prevents a short "flash" as qemu opens a toplevel window.
* New APIs: Query the relationship between LVM objects.Richard Jones2010-03-182-1/+43
| | | | | | | | | These calls allow you to query the relationship between LVM objects, for example, which PVs contain a VG, or which LVs are contained in a VG. See the example / test program 'regressions/test-lvm-mapping.pl' for an example of how to do this from Perl.
* add_drive_ro adds readonly=on option if available.Richard Jones2010-03-162-5/+21
| | | | | | | | | | | | | | Change the add_drive_ro call so it adds the readonly=on option if qemu supports that. This just means that qemu will not try to open the drive with O_RDWR, and should not otherwise change the behaviour of qemu or libguestfs. (In particular, writes to the read-only drive are still permitted, and are just discarded when the handle is closed). However it should alleviate RHBZ#571714 where udev was deciding to incorrectly relabel a device because we had opened the device for writing (even though we didn't actually write to it).
* Allow qemu_supports to run earlier.Richard Jones2010-03-162-10/+27
| | | | | | | Reimplement qemu_supports() internal function. Allow it to run before launch so we can test qemu features. Document that you should run guestfs_set_qemu as early as possible to make sure these tests are reliable.
* guestfs.h: More adjustment to comments in the header file.Richard Jones2010-03-161-10/+14
|
* guestfs.h: Move some internal functions to the internal header.Richard Jones2010-03-162-15/+16
| | | | | | Functions like guestfs__send were never exported through the public API (libguestfs.syms prevented that). However they appeared in the public header. Move them to the internal header.
* Rearrangement and comment changes in <guestfs.h> header file.Richard Jones2010-03-161-10/+18
| | | | There should be no substantive change.
* Tab to space (whitespace fixes only).Richard Jones2010-03-121-82/+82
|
* Docs: Change exit(1) -> exit(EXIT_FAILURE)Richard Jones2010-03-121-1/+1
|
* Rewrite libguestfs-supermin-helper in C.Richard Jones2010-03-122-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libguestfs-supermin-helper was previously a shell script. Although we had steadily optimized it, there were a number of intractable hot spots: (1) cpio still reads input files in 512 byte chunks; this is *very* pessimal behaviour, particularly when SELinux is enabled. (2) the hostfiles globbing was done very inefficiently by the shell, with the shell rereading the same directory over and over again. This is a rewrite of this shell script in C. It is approximately 3 times faster without SELinux, and has an even greater speed difference with SELinux. The main features are: (a) It never frees memory, making it simpler. The program is designed to run and exit in sub-second times, so this is acceptable. (b) It caches directory reads, making the globbing of host files much faster (measured this as ~ 4 x speed up). (c) It doesn't use external cpio, but instead contains code to write newc format cpio files, which is all that the kernel can read. Unlike cpio, this code uses large buffers for reads and writes. (d) Ignores missing or unreadable hostfiles, whereas cpio gave a warning. (e) Checks all return values from system calls. (f) With --verbose flag, it will print messages timing itself. This passes all tests. Updated with feedback from Jim Meyering.
* guestfish: Use xstrtoll to parse Int params (RHBZ#569757 RHBZ#567567).Richard Jones2010-03-121-1/+1
| | | | | | Change guestfish so it uses xstrtoll to parse Int (31 bit) parameters. This fixes two bugs on 32 bit platforms which failed when long = 32 bits. long long = 64 bits on both.
* Spin off hivex as a separate upstream project.Richard Jones2010-02-221-4/+4
| | | | | | | | | | | | | | This commit makes the semi-independent hivex library into a separate upstream project. The git repo for hivex is now: http://git.annexia.org/?p=hivex.git;a=summary Downloads of hivex are available here: http://libguestfs.org/download/ All questions, patches, bugs etc should be sent to the libguestfs mailing list and bug tracker.
* Turn ProtocolLimitWarning into link to documentation section.Richard Jones2010-02-152-2/+24
|
* initrd-cat: Needs ProtocolLimitWarning.Richard Jones2010-02-151-1/+1
|
* Remove references to FTP, replace with FUSE.Richard Jones2010-02-152-7/+9
| | | | | | | We originally intended to implement an FTP server (and before than, an NFS server). But we didn't implement either. We did however implement a FUSE service (guestmount) which takes the place of both.
* Remove some unused variables.Richard Jones2010-02-151-2/+1
| | | | | | Since we have to compile with -Wno-unused-variables, we don't spot unused variables in code. I found these by compiling the code in Ubuntu.
* daemon: Don't need to prefix error messages with the command name.Richard Jones2010-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | The RPC stubs already prefix the command name to error messages. The daemon doesn't have to do this. As a (small) benefit this also makes the daemon slightly smaller. Code in the daemon such as: if (argv[0] == NULL) { reply_with_error ("passed an empty list"); return NULL; } now results in error messages like this: ><fs> command "" libguestfs: error: command: passed an empty list (whereas previously you would have seen ..command: command:..)
* generator: Don't prefix error messages with command name.Richard Jones2010-02-121-11/+10
| | | | | | | The command name is already being added by the RPC stubs, so adding it again in Perl and C# just results in doubled error messages like: foo: foo: the error
* New APIs: add-drive{,-ro}-with-if allows you to set QEMU block emulation.Richard Jones2010-02-122-5/+44
| | | | | | | | | | | The default if=... comes from configure time (currently it defaults to if=virtio). This change allows you to set the QEMU block emulation. We don't think this will be used very often, but virt-v2v requires it in order to work around a subtle problem with running 'mkinitrd' in an appliance attached to a guest.
* generator: 'interface' is a reserved word in Java.Richard Jones2010-02-121-0/+1
|
* add_cdrom: Update docs for adding ISO images.Richard Jones2010-02-121-2/+16
| | | | See also RHBZ#563450 (NB: This commit does not fix the bug).
* Use mount-options instead of mount to avoid implicit -o sync.Richard Jones2010-02-102-17/+26
| | | | | | | | | | | | | | | guestfs_mount adds -o sync implicitly. This causes a very large performance problem for write-intensive programs (eg. virt-v2v). Document this as a "gotcha". Change the tests, guestfish, Sys::Guestfs::Lib, guestmount to use mount-options instead. (Note that this gotcha does not affect mount-ro). The source of the performance problem was first identified by Matthew Booth.
* Add -enable-kvm option to qemu command line.Richard Jones2010-02-091-0/+31
| | | | | | | | If the version of qemu being used supports -enable-kvm option, then check if /dev/kvm is openable and add this option. I have found this option makes no difference, although it is *supposed* to enable KVM (hardware virtualization) support.
* New API call: initrd-cat to list a file from an initrd.Richard Jones2010-02-092-1/+18
|
* Documentation: Added a section on libguestfs gotchas.Richard Jones2010-02-081-0/+55
|
* Implement 'vgrename' and 'lvrename' APIs.Richard Jones2010-01-282-1/+21
|