| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Combine the two Gnulib instances together.
Add checks from old daemon/configure.ac into configure.ac.
Fix daemon/Makefile.am so it is like a normal subdirectory
Makefile.am.
Because we are now using the replacement strerror_r function from
Gnulib (instead of the one from glibc directly), this requires a small
change to src/guestfs.c.
|
|
|
|
| |
Related to RHBZ#727178.
|
|
|
|
|
|
| |
On recent Debian, /etc/blkid.tab is now a symlink to /dev/.blkid.tab.
Rather than chasing the cache file around (it may move to /run in future)
use the -c /dev/null option to stop blkid from reading the cache.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the blkid command returns 2, that means the value was not found.
Note that this changes the output of the vfs-type API when the
filesystem has no type (eg when it is empty). Previously this would
return an error. Now it returns empty string "".
We did not document this either way. Making it return empty string is
consistent with vfs-label and vfs-uuid.
This change broke list-filesystems, since that code was assuming that
vfs-type could only return a filesystem type or an error.
|
|
|
|
| |
Append content to the end of a file.
|
|
|
|
|
|
|
|
| |
If enabled, then the daemon will be installed in $sbindir
(eg. /usr/sbin/guestfsd). The default is off, as now.
This option should be used by packagers when building the libguestfs
live service.
|
|
|
|
| |
This resizes a btrfs filesystem.
|
|
|
|
| |
Allow other types of filesystems to be created.
|
| |
|
|
|
|
|
|
| |
This is a more comprehensive fix for RHBZ#685009. Add a new API which
allows the --force flag to be passed, allowing multiple NTFS resize
operations in a single session.
|
|
|
|
| |
List device mapper devices.
|
|
|
|
| |
This updates commit 5f10c3350338bbca735a74db26f98da968957bd9.
|
| |
|
|
|
|
|
|
|
| |
This is needed because older versions of grub(for example in centos)
do not understand filesystems created with newer version of e2fsprogs.
By default in e2fsprogs 1.4+ creates partitions with 256 bit inode
size, and grub expect 128 bit size.
|
|
|
|
| |
The updated patch makes 'options' into an optional parameter.
|
| |
|
|
|
|
|
| |
* .gnulib: Update submodule to latest.
* daemon/m4/gnulib-cache.m4: Regenerate.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
If the external command failed to run, we could free up the allocated
*stdoutput and *stderror pointers, but then return those freed
pointers to the caller. The caller usually tries to print and free
*stderror, so this is a serious error.
Instead, return *stdoutput as NULL, and *stderror pointing to a
generic error message.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
For some reason we were checking the parameter!
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Remove some debug messages which were basically left over from when
the code was being developed.
However we leave debug messages where it is printing an external
command that is about to be executed, since those are useful.
|
|
|
|
|
| |
rpcgen generates source which can't be safely compiled with strict-aliasing
enabled.
|
|
|
|
|
|
|
|
| |
Reimplement these so they read /proc/mounts instead of trying to parse
the output of the 'mount' external command.
One consequence of this is that these commands now work again for
ntfs-3g filesystems.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces a new form of progress event, where we don't know how
much of the operation has taken place, but we nevertheless want to
send back some indication of activity. Some progress bar indicators
directly support this, eg. GtkProgressBar where it is known as "pulse
mode".
A pulse mode progress message is a special backwards-compatible form
of the ordinary progress message. No change is required in callers,
unless they want to add support for pulse mode.
The daemon sends:
- zero or more progress messages with position = 0, total = 1
- a single final progress message with position = total = 1
Note that the final progress message may not be sent if the call fails
and returns an error. This is consistent with the behaviour of
ordinary progress messages.
The daemon allows two types of implementation. Either you can just
call notify_progress (0, 1); ...; notify_progress (1, 1) as usual.
Or you can call the functions pulse_mode_start, pulse_mode_end and/or
pulse_mode_cancel (see documentation in daemon/daemon.h). For this
second form of call, the guarantee is very weak: it *just* says the
daemon is still capable of doing something, and it doesn't imply that
if there is a subprocess that it is doing anything. However this does
make it very easy to add pulse mode progress messages to all sorts of
existing calls that depend on long-running external commands.
To do: add a third variant that monitors a subprocess and only sends
back progress messages if it's doing something, where "doing
something" might indicate it's using CPU time or it's printing output.
|
| |
|
| |
|
|
|
|
|
| |
Notes:
Labels: cleanup, forcestable
Depends: 227bea6c7ef89b707fe2c01c4d0d0fb9081e8c04
|
|
|
|
| |
Notes:
Labels: bugfix, RHBZ#690819
|
|
|
|
|
|
|
|
|
|
| |
The particular issue is that ntfs-3g (or FUSE?) no longer appears
to update /etc/mtab, which meant that umount-all was not unmounting
these partitions. But parsing /proc/mounts is simpler and more
robust in any case.
Notes:
Labels: bugfix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the case where both ends cancel at the same time (eg. both ends
realize there are errors before or during the transfer), previously we
skipped sending back an error from the daemon, on the spurious basis
that the library would not need it (the library is cancelling because
of its own error).
However this is wrong: we should always send back an error message
from the daemon in order to preserve synchronization of the protocol.
A simple test case is:
$ guestfish -N fs -m /dev/sda1 upload nosuchfile /
libguestfs: error: open: nosuchfile: No such file or directory
libguestfs: error: unexpected procedure number (66/282)
(Notice two things: there are errors at both ends, and the
loss of synchronization).
After applying this commit, the loss of synchronization does not occur
and we just see the library error:
$ guestfish -N fs -m /dev/sda1 upload nosuchfile /
libguestfs: error: open: nosuchfile: No such file or directory
The choice of displaying the library or the daemon error is fairly
arbitrary in this case -- it would be valid to display either or even
to combine them into one error. Displaying the library error only
makes the code considerably simpler.
This commit also (re-)enables a test for this case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As a previous, incorrect attempt to fix RHBZ#576879 we tried to
prevent the daemon from sending an error reply if the daemon had
cancelled the transfer. This is wrong: the daemon should send an
error reply in these cases.
A simple test case is this:
guestfish -N fs -m /dev/sda1 upload big-file /
(This fails because the target "/" is a directory, not a file.)
Prior to this commit, libguestfs would hang instead of printing an
error. With this commit, libguestfs prints an error.
What is happening is:
(1) Library is uploading
a file (2) In the middle of the long
upload, daemon detects an error.
Daemon cancels.
(3) Library detects cancel,
sends cancel chunk, then waits
for the error reply from the
daemon. (4) Daemon is supposed to send
an error reply message.
Because step (4) wasn't happening, uploads that failed like this would
hang in the library (waiting for the error message, while the daemon
was waiting for the next request).
This also adds a regression test.
This temporarily breaks the "both ends cancel" case (RHBZ#576879c5).
Therefore the test for that is disabled, and this is fixed in the next
patch in the series.
This partially reverts commit dc706a639eec16084c0618baf7bfde00c6565f63.
|
|
|
|
|
|
|
|
| |
This adds 'guestfsd: ...' prefix before each message, and
also puts a message at the top of the main loop just after
a new message has been received.
The intent is to make it simpler to follow the protocol.
|
|
|
|
|
|
|
| |
The chunk.cancel field should always be [0|1]. If it is not then
something has gone badly wrong -- probably loss of synchronization.
If this occurs print a debug message and return error from
receive_file function.
|
| |
|