| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
* src/Makefile.am: Compile protocol.c into a convenience library, so it
can have its own CFLAGS, and link that with the destination one.
|
| |
|
|
|
|
| |
Missing declaration of local variable 'i'.
|
| |
|
|
|
|
| |
* src/generator.ml: Emit a few omitted newlines.
|
|
|
|
|
| |
* src/generator.ml: Include <Python.h> *before* <stdio.h>
to avoid redefinition warning about "_POSIX_C_SOURCE".
|
|
|
|
|
|
| |
Also, ...
* src/generator.ml: Add DeviceList type, and propagate that change
out to all calling/interface code.
|
|
|
|
|
|
|
|
|
|
| |
mkfs-b: Pass the -b (blocksize) parameter to mkfs.
mke2journal and friends: Lets you create external ext2 journals on
devices.
mke2fs-J and friends: Lets you create ext2/3/4 filesystems with
external journals.
|
|
|
|
|
| |
Adds a uuidgen function which gets the random UUID from the
uuid program. Uses this for tests.
|
|
|
|
|
| |
* src/generator.ml: Use "rstructs_used" to emit definitions only for
put_TYPE_list functions that are used.
|
|
|
|
| |
* src/generator.ml (emit_put_list_function): New function.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* src/generator.ml: Update all rules to handle Dev_or_Path.
(the above changes to generator.ml are mostly mechanical)
Emit a use of REQUIRE_ROOT_OR_RESOLVE_DEVICE.
* daemon/upload.c (do_download): Remove use of
REQUIRE_ROOT_OR_RESOLVE_DEVICE, now that it's automatically done
in calling code.
* daemon/file.c (do_file): Likewise.
|
|
|
|
| |
* src/generator.ml (file, download): Use it.
|
|
|
|
|
| |
* daemon/dir.c (do_mkdtemp): Rewrite for a "const" parameter.
* src/generator.ml (mkdtemp): Declare parameter to be of type Pathname.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Nearly every file-related function in daemons/*.c is affected:
Remove this pair of statements from each affected do_* function:
- NEED_ROOT (return -1);
- ABS_PATH (dir, return -1);
and change the type of the corresponding parameter to "const char *".
* src/generator.ml: Emit NEED_ROOT just once, even when there are two or
more Pathname args.
|
|
|
|
|
|
|
|
|
|
| |
* src/generator.ml: Emit NEED_ROOT and ABS_PATH into generated
stubs.c, rather than requiring they be added manually at the start
of each and every do_* function that operates on a "path" parameter.
Update grammar: Pathname is just a String, with the above exception.
Do not update augeas "path" parameters, since they are not file names,
but rather ":"-separated search paths. Except aug_init, for which
"path" *is* a file name.
|
|
|
|
|
|
| |
* src/generator.ml: Emit "const char *", not "char *" for Device and
String params, now that the non-const code is hoisted into the calling
code in stubs.c.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Then update each affected function, removing each uses of RESOLVE_DEVICE,
now that it's generated in caller from stub.c.
* daemon/blockdev.c (call_blockdev): Remove use of RESOLVE_DEVICE.
* daemon/devsparts.c (do_mkfs): Likewise.
* daemon/ext2.c (do_e2fsck_f, do_get_e2label, do_get_e2uuid): Likewise.
(do_resize2fs, do_set_e2label, do_set_e2uuid, do_tune2fs_l): Likewise.
* daemon/fsck.c (do_fsck): Likewise.
* daemon/grub.c (do_grub_install): Likewise.
* daemon/lvm.c (do_lvremove, do_pvcreate, do_pvremove): Likewise.
(do_pvresize): Likewise.
* daemon/mount.c (do_mount_vfs): Likewise.
* daemon/ntfs.c (do_ntfs_3g_probe): Likewise.
* daemon/scrub.c (do_scrub_device): Likewise.
* daemon/sfdisk.c (sfdisk, sfdisk_flag): Likewise.
* daemon/swap.c (do_mkswap, do_mkswap_L, do_mkswap_U): Likewise.
(do_swapoff_device, do_swapon_device): Likewise.
* daemon/zero.c (do_zero): Likewise.
* daemon/zerofree.c (do_zerofree): Likewise.
|
|
|
|
|
| |
* src/generator.ml: Emit RESOLVE_DEVICE (device, goto done);
just before each Device-enabled do_$FUNCTION.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you use the guestfs_add_drive function, then currently it
generates a qemu command line element like:
-drive ...,cache=off,...
This causes qemu to try to open the device with O_DIRECT.
Unfortunately some filesystems don't support this flag, notably tmpfs,
which means you can't use libguestfs in conjunction with tmpfs. On
some systems /tmp is a tmpfs filesystem.
This patch fixes this so that if the filesystem doesn't support
O_DIRECT, then we omit the cache=off parameter. This seems reasonable
from a reliability point of view, because if you're using tmpfs then
you probably didn't expect reliability in the case where your system
suddenly powers off.
|
| |
|
| |
|
|
|
|
| |
Adds new API calls to set and get this flags.
|
|
|
|
|
| |
(Just whitespace and comment changes, and small restructuring
of the code).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the way the qemu command is displayed to look like
this:
/usr/bin/qemu-kvm \
-drive file=/tmp/test.img,cache=off,if=virtio \
-m 500 \
-no-reboot \
-kernel /tmp/libguestfsHBJHRh/kernel \
-initrd /tmp/libguestfsHBJHRh/initrd \
[...]
This allows the command line to be copied and pasted directly
into the shell, and also makes it simpler to read.
|
|
|
|
|
|
|
|
| |
Add ./configure --with-net-if=(virtio|ne2k_pci) option.
This lets you workaround the following virtio_net bug:
https://bugzilla.redhat.com/show_bug.cgi?id=516022
|
|
|
|
|
|
|
|
| |
On RHEL 5, mkswap /dev/sdb fails, even with the '-f' option
(contradictory to what the manual page says).
This commit adds a new 'InitPartition' initialization which
just creates /dev/sda1, and then does the swap test on that.
|
|
|
|
|
|
|
| |
The block size changes between kernel releases, causing
a false failure in the tests. The error was:
test_statvfs_0: bsize was 65536, expected 131072
|
|
|
|
|
| |
This allows people to use the ne2k-pci network driver, for those
situations where the virtio_net driver is broken (cough 516022 cough).
|
|
|
|
|
|
| |
Use:
-net user,vlan=0,net=10.0.2.0/8
just to make the (already implicit) 10.0.2.x network explicit.
|
|
|
|
|
|
|
| |
The tests hardcoded an MD5 of the test file, COPYING.LIB, whose contents had
change. This change causes it to compute the MD5 rather than hardcoding it.
OCaml provided by rjones.
|
|
|
|
|
|
|
|
| |
The swapon label test has a side-effect, in that it creates a new partition.
This causes the later failure of the list_partitions test.
This change causes the swapon_label test to zero /dev/sdb after the test, and
then re-read the partition table.
|
|
|
|
|
|
|
| |
* regressions/test-cancellation-download-librarycancels.sh:
* src/generator.ml:
* cfg.mk (disable_temporarily): Remove sc_trailing_blank.
* .x-sc_trailing_blank: New file.
|
|
|
|
|
|
|
|
|
|
|
| |
Do it by running this command:
[exempted files are matched via .x-sc_TAB_in_indentation]
git ls-files \
| pcregrep -vf .x-sc_TAB_in_indentation \
| xargs pcregrep -l '^ *\t' \
| xargs perl -MText::Tabs -ni -le \
'$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
|
|
|
|
|
| |
* src/guestfs.c (guestfs_perrorf): Rename former err to errnum,
to avoid compilation error.
|
|
|
|
| |
* src/guestfs.c (guestfs_perrorf): Handle failed vasprintf.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
SELinux exists in a very disturbed state if it is enabled at
boot time, but no policy is loaded. In particular, it messes
up the security.selinux extended attributes on files in a
not-very-useful way.
We can't enable SELinux because we don't know what policy
can or should be loaded. Therefore it's best to disable it
completely.
|
|
|
|
|
|
|
| |
Don't warn where a command just has no tests.
Instead check other commands' tests so we get a definitive
(and much smaller) list of commands that are not tested anywhere.
|
|
|
|
|
|
|
|
|
|
|
|
| |
swapon-device
swapoff-device
swapon-file
swapoff-file
swapon-label
swapoff-label
swapon-uuid
swapoff-uuid
mkswap-file
|
| |
|
|
|
|
|
| |
These commands can be used to make hard and symbolic links. The
readlink command is used to read existing symbolic links.
|