| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
(cherry picked from commit cbb026036826f2ab40237aec0b0c5453b859625d)
|
|
|
|
|
|
|
|
|
| |
This fixes the following commands when run with RHEL 5-era parted:
get-bootable
get-parttype
part-list
(cherry picked from commit 3ab2d089f3eb34562bc2c9ce4310869b46c69d70)
|
|
|
|
| |
(cherry picked from commit aee7d55fcf754d97d945c318ec06d6387ade067b)
|
|
|
|
|
|
|
|
| |
This also adds a regression test.
For stable-1.2 branch:
- cherry picked from commit 9733d4746988b3a072d8bb1daac4b9795b8f4134
- modify the regression test to apply against the generator
|
|
|
|
| |
(cherry picked from commit 52f9cd4882135910ea06e1e50ac6441d455c9ab1)
|
|
|
|
|
|
| |
By killing the cache file, we make blkid work in situations such
as a just-created filesystem.
(cherry picked from commit 21c42e9fabf6cea3d564e338a314479ef120502a)
|
|
|
|
|
| |
Note that there is no change to the semantics of the code.
(cherry picked from commit 85c71f8fff3e80f549342bf995b686ba7303c2b4)
|
|
|
|
|
|
| |
(cherry picked from commit 287f8957fea3efe411c7ac55595d5d6c7b613e4e
and modified to apply to the stable branch. Note that the original
commit message contains a typo 'string-e' instead of 'strings-e')
|
|
|
|
| |
(cherry picked from commit 9d158c3ab132df21d58890f18224cd2fe020de67)
|
|
|
|
| |
(cherry picked from commit b52ef0b021fc443d88d4d9c43f57468712e40965)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
(cherry picked from commit 42f59b28f123f53ae038df23a9abee08e959e46b)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the network configuration so everything is set using
some macros at the top of src/guestfs.c.
Also, rename the macros used in the daemon so they are not the
same. It was a very long time since these sets of macros had to
match the ones defined in src/guestfs.c, despite what the comment
said.
Note that this commit should not change the semantics of the
program at all.
(cherry picked from commit 8a9f2ca65521d093ac14307aca4370d9497ac840)
|
|
|
|
|
| |
This also adds a regression test for this bug.
(cherry picked from commit c24de46d06cc3ecccf00bfaaffb06172659cdd0a)
|
|
|
|
|
|
|
| |
This shouldn't change the semantics of the program.
For stable-1.2 this was cherry picked from commit af29c84 and
rebased against the older code in daemon/checksum.c.
|
|
|
|
|
|
|
|
|
|
|
|
| |
chmod: Disallow negative mode, document mode affected by umask.
mkdir-mode: Disallow negative mode, document that filesystems
may interpret the mode in different ways.
mknod: Disallow negative mode, document mode affected by umask.
umask: Check the range of umask mask value carefully.
(cherry picked from commit 61ab83d19009a8006dd73ebe16d22494b78be4d1)
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
Previously we used strtok. However this has the problem that
strtok considers multiple delimiter characters to be like a single
delimiter, eg. "1:::2" would be parsed the same as "1:2". In
other words, the previous code would skip over or fail if there
are empty fields.
(cherry picked from commit cb9350019cc6382a35c98f522c9c4d221c92b605)
|
|
|
|
|
|
| |
This allows us to make the RUN_PARTED macro do something else
along the error path, other than just returning -1.
(cherry picked from commit 440ad646cdf31bdb5ad2bc92fc51fa6df3fb9c63)
|
|
|
|
| |
(cherry picked from commit d1dd00606d0b5b1430598e5092b017aa15d9ee11)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This includes various code cleanups:
(a) A regression test for RHBZ#580246.
(b) Use write instead of fwrite to write out the tar file. This is
just because the error handling of write seems to be better
specified and easier to use.
(c) Use size_t instead of int for length.
(d) Clearer debug messages when in verbose mode.
(cherry picked from commit de7ef2a0fdcbcddfd35ecb8ee2804e1ca0968454)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem was this sequence of events:
(1) File transfer goes through OK.
(2) pclose returns failure (because 'tar' subprocess failed)
(3) We try to cancel the transfer by calling cancel_receive.
Step (3) fails because the transfer (as far as the library is
concerned) has succeeded, so causing a hang.
The more fundamental reason why we see steps (1) and (2) is that
'tar' does NOT fail immediately if there is a write error. Instead
it continues reading and discarding the input until the end of the
input before giving "Error exit delayed from previous errors".
IMHO this is a bug with tar, since an ENOSPC write error should
be fatal for tar.
(cherry picked from commit 07f4b20ae959069fca41756b0dc103ec5fa99754)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
posix_fallocate has a non-standard way to return error indications.
Thus all our calls to posix_fallocate were effectively unchecked. For
example:
$ guestfish alloc test.img 1P
$ echo $?
0
$ ll test.img
-rw-rw-r--. 1 rjones rjones 0 2010-04-06 11:02 test.img
$ rm test.img
With this change, errors are detected and reported properly:
$ ./fish/guestfish alloc test.img 1P
fallocate: File too large
This is a fix for:
https://bugzilla.redhat.com/show_bug.cgi?id=579664
(cherry picked from commit 2ade61d1f864c75ce65c358e4ac8a012a897b89a)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since commit 977edb3185fe8f we have been passing TERM from the
library into the appliance (for the benefit of virt-rescue).
However this changes the output of parted, which I would argue
is a bug in parted:
TERM=xterm /sbin/parted -m -- /dev/sda unit b print 2>&1 | hexdump -C
00000000 1b 5b 3f 31 30 33 34 68 42 59 54 3b 0a 2f 64 65 |.[?1034hBYT;./de|
Notice the escape-sequence junk before the official "BYT;"
header.
By setting TERM=dumb we avoid this.
|
| |
|
| |
|
|
|
|
|
|
| |
Change the appliance so PATH includes common directories. Thus
we don't need to hard-code paths to binaries (eg. "/sbin/fdisk")
everywhere.
|
|
|
|
|
|
|
|
|
| |
The problem is that mkfs was making an ext2 filesystem,
which later we were checking with e4fsck. e4fsck corrects
an "error" on the filesystem:
/dev/VG/LV: Adding dirhash hint to filesystem.
e4fsck returns 1 (errors corrected) which we were interpreting
as an error return.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This function trims the whitespace from around a string. It
does this in-place, so it can be called for malloc'd strings.
|
| |
|
|
|
|
|
| |
These are useful for Debian since they keep the tarball unpacked
in git.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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:..)
|
| |
|
| |
|
|
|
|
|
| |
Returns the size of a file. You can already do this with 'stat',
but this call is good for scripting.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows you to save the errno from a previous call and
pass it to reply_with_perror.
For example, original code:
r = some_system_call ();
err = errno;
do_cleanup ();
errno = err;
if (r == -1) {
reply_with_perror ("failed");
return -1;
}
can in future be changed to:
r = some_system_call ();
err = errno;
do_cleanup ();
if (r == -1) {
reply_with_perror_errno (err, "failed");
return -1;
}
|
| |
|
|
|
|
|
|
| |
This just ensures that we accurately report errors, even if our
error path code doesn't set errno. We won't end up with a bogus
errno left over from a previous call.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
These functions are not available on Windows.
|