| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
acl.c: In function 'do_acl_get_file':
acl.c:158:1: error: function might be candidate for attribute 'noreturn' [-Werror=suggest-attribute=noreturn]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
eg:
$ isoinfo --debug -d -i ubuntu-12.04-desktop-amd64.iso
CD-ROM is in ISO 9660 format
System id:
Volume id: Ubuntu 12.04 LTS amd64
Volume set id:
Publisher id:
[...]
Creation Date: 2012 04 25 16:13:46.00
Modification Date: 2012 04 25 16:13:46.00
Expiration Date: : : .
Effective Date: : : .
[...]
|
|
|
|
|
| |
The lvresize command unnecessarily gives an error if you don't
change the size of the LV. Suppress this error.
|
|
|
|
|
|
| |
This adds the following new APIs:
- cap_get_file
- cap_set_file
|
|
|
|
|
|
|
| |
This adds the following new APIs:
- acl_get_file
- acl_set_file
- acl_delete_def_file
|
|
|
|
|
| |
See https://bugzilla.redhat.com/show_bug.cgi?id=872831
and https://bugzilla.redhat.com/show_bug.cgi?id=865961
|
|
|
|
|
|
|
| |
Also various fixes:
- remove fixed-size buffer
- change if (err) free (err) -> free (err).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Used to create temporary directory or file with an optional suffix.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
RWMJ:
- Split this out into a new file (daemon/mktemp.c).
- I don't see a reason to deprecate the mkdtemp function which
works fine. Instead remove complex dir-making code from the
new function.
- Test and fix the patch (missing close(fd)).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Revert "btrfs: Add an extended workaround for btrfs failures seen with kernel 3.7.0."
Reverted these workaround, since we may have found a fix for the btrfs
bug itself (for details see RHBZ#863978).
This reverts commit d9e5b514aa4ef6d659b267e8caef4ebec8a221b1
and commit a03f536f0dae3ca20e11b7c2ba41e4a7eb1f28c9.
|
|
|
|
|
|
|
|
|
|
| |
See:
https://bugzilla.redhat.com/show_bug.cgi?id=863978
and:
http://thread.gmane.org/gmane.comp.file-systems.btrfs/20257
This extends the fix in commit d9e5b514aa4ef6d659b267e8caef4ebec8a221b1
because I missed the case where mkfs.btrfs is called directly.
|
|
|
|
|
|
|
| |
See:
https://bugzilla.redhat.com/show_bug.cgi?id=863978
and:
http://thread.gmane.org/gmane.comp.file-systems.btrfs/20257
|
|
|
|
|
|
|
|
| |
New API: remove-drive.
Note because of a bug in fuser, this only works with psmisc >= 22.20.
This also updates the hotplugging tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When libvirt is used, we can allow disks to be hotplugged.
guestfs_add_drive can be called after launch to hot-add a disk.
When a disk is hot-added, we first ask libvirt to add the disk to the
appliance, then we make an internal call into the appliance to get it
to wait for the disk to appear (ie. udev_settle ()).
Hot-added disks are tracked in the g->drives array.
This also adds a test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New API: list-disk-labels
Allow the user to pass an optional disk label when adding a drive.
This is passed through to qemu / libvirt using the disk serial field,
and from there to the appliance which exposes it through udev,
creating a special alias of the device /dev/disk/guestfs/<label>.
Partitions are named /dev/disk/guestfs/<label><partnum>.
virtio-blk and virtio-scsi limit the serial field to 20 bytes. We
further limit the name to maximum 20 ASCII characters in [a-zA-Z].
list-devices and list-partitions are not changed: these calls still
return raw block device names. However a new call, list-disk-labels,
returns a hash table allowing callers to map between disk labels, and
block device and partition names.
This commit also includes a test.
|
|
|
|
| |
This fixes commit df2469a48f4641bdfe26a4179dd946df190fa970.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(RHBZ#858128).
If compare_device_names was given two devices with devices with
different interfaces (eg. /dev/sda and /dev/vda) then it would try to
compare the partition numbers, and fail when it could parse them.
It's arguable what we should be doing in this case (except for
strongly discouraging people from using the interface feature), but
let's at least not cause the daemon to assert-fail.
Found by Red Hat QA, thanks Mohua Li.
|
|
|
|
|
|
|
|
|
|
|
| |
New api mke2fs for full configuration of filesystem.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
RWMJ:
- Update description.
- Run and fix the tests.
- Remove bogus filename from po/POTFILES.
|
|
|
|
| |
This is just code motion.
|
| |
|
|
|
|
|
|
|
| |
<file>: error: jump skips variable initialization [-Werror=jump-misses-init]
This has only just appeared, possibly related to previous gnulib
update. In any case, this is just code motion / cleanup.
|
|
|
|
|
|
|
| |
Meyering).
The gnulib <fcntl.h> replacement header will now define this symbol if
it's not defined already.
|
|
|
|
| |
Found by 'make syntax-check'.
|
|
|
|
| |
Found by 'make syntax-check'.
|
|
|
|
| |
Found by 'make syntax-check'.
|
|
|
|
| |
Found by running 'make syntax-check'.
|
|
|
|
|
|
|
| |
While adding the list of external commands I missed the
various checksum tools.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
|
|
|
|
|
|
| |
udevadm is included in all reasonable recent distributions.
This avoids 'command not found' errors in verbose mode.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
guestfsd calls many different tools. Keeping track of all of them is
error prone. This patch introduces a new helper macro to put the command
string into its own ELF section:
GUESTFSD_EXT_CMD(C_variable, command_name);
This syntax makes it still possible to grep for used command names.
The actual usage of the collected list could be like this:
objcopy -j .guestfsd_ext_cmds -O binary daemon/guestfsd /dev/stdout |
tr '\0' '\n' | sort -u
The resulting output will be used to tell mkinitrd which programs to
copy into the initrd.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
RWMJ:
- Move str_vgchange at request of author.
- Fix snprintf call in daemon/debug.c
|
|
|
|
| |
Instead this patch will be carried out of tree in the oldlinux branch.
|
|
|
|
|
|
|
|
|
|
| |
Add a new api xfs_repair for repairing an XFS filesystem.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
RWMJ:
- Fix non-error return path so it doesn't send two replies.
- Document return code.
|
|
|
|
|
|
|
|
|
|
|
| |
Transscribe many hivex(3) APIs into the libguestfs API.
There is one hive handle per libguestfs handle, as with Augeas.
Note that hivex uses iconv_open for some APIs (eg. hivex_value_string).
But since we delete all the i18n files from the appliance, this
doesn't work -- iconv_open returns EINVAL. Therefore hivex APIs which
require iconv cannot be bound in the daemon.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add optional label and uuid arguments, and deprecate mkswap-L and
mkswap-U.
This also adds a call to udev_settle after creating the swap device.
This is an attempt to workaround the following problem seen in Koji
and Rawhide:
libguestfs: trace: mkswap_L "swapit" "/dev/sda1"
libguestfs: send_to_daemon: 72 bytes: 00 00 00 44 | 20 00 f5 f5 | 00 00 00 04 | 00 00 00 83 | 00 00 00 00 | ...
guestfsd: main_loop: proc 210 (part_disk) took 2.28 seconds
guestfsd: main_loop: new request, len 0x44
mkswap -f -L swapit /dev/sda1
libguestfs: recv_from_daemon: 40 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 00 83 | 00 00 00 01 | 00 12 37 cf | ...
libguestfs: trace: mkswap_L = 0
libguestfs: trace: swapon_label "swapit"
libguestfs: send_to_daemon: 56 bytes: 00 00 00 34 | 20 00 f5 f5 | 00 00 00 04 | 00 00 00 ae | 00 00 00 00 | ...
guestfsd: main_loop: proc 131 (mkswap_L) took 0.77 seconds
guestfsd: main_loop: new request, len 0x34
swapon -L swapit
swapon: cannot find the device for swapit
guestfsd: error: swapit: swapon: cannot find the device for swapit
libguestfs: recv_from_daemon: 100 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 00 ae | 00 00 00 01 | 00 12 37 d0 | ...
libguestfs: trace: swapon_label = -1 (error)
swapon_label: swapit: swapon: cannot find the device for swapit
test_swapon_label_0 FAILED
|
|
|
|
|
|
|
| |
Just drop the unstructed output since we can get the structed info
from xfs_info instead.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add new api xfs_admin to change parameters of an XFS filesystem.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
RWMJ:
- Remove printuuid, printlabel, since they don't change any settings.
- Adjusted the documentation.
- Fix the tests.
|
| |
|
| |
|
|
|
|
|
| |
This API is not especially useful on its own. It will be used to
reimplement guestfs_ls to work without protocol limits.
|
| |
|
|
|
|
|
| |
Note that the code to do this was already in virt-ls, so this is
change is mostly just moving the code into the core library.
|
|
|
|
|
|
|
|
| |
Note that we keep the old daemon calls, but rename them as
"internal_write" and "internal_write_append". This lets us implement
the new library-side calls more efficiently in the common case when
the uploaded content is smaller than the message buffer. In most
cases the new calls won't end up using a temporary file.
|
|
|
|
| |
This also makes a larger test suite for this command.
|
| |
|
|
|
|
|
| |
This also reimplements the virt-ls -R option to use the replacement
guestfs_find API, which is simpler (though actually less efficient).
|
| |
|
| |
|
|
|
|
| |
Useful functions for concatenating strings together.
|