| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This contains a workaround for stdalign bug:
http://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00340.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023
(Thanks Paul Eggert).
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
* .gnulib: Update submodule to latest.
* daemon/m4/gnulib-cache.m4: Regenerate.
|
|
|
|
|
|
|
|
| |
This tool replaces virt-list-filesystems and virt-list-partitions with
a new tool written in C with a more uniform command line structure
and output.
This existing Perl tools are deprecated but remain indefinitely.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current code uses atoi to parse the generator Int type and
atoll to parse the generator Int64 type. The problem with the
ato* functions is that they don't cope with errors very well,
and they cannot parse numbers that begin with 0.. or 0x..
for octal and hexadecimal respectively.
This replaces the atoi call with a call to Gnulib xstrtol
and the atoll call with a call to Gnulib xstrtoll.
The generated code looks like this for all Int arguments:
{
strtol_error xerr;
long r;
xerr = xstrtol (argv[0], NULL, 0, &r, "");
if (xerr != LONGINT_OK) {
fprintf (stderr,
_("%s: %s: invalid integer parameter (%s returned %d)\n"),
cmd, "memsize", "xstrtol", xerr);
return -1;
}
/* The Int type in the generator is a signed 31 bit int. */
if (r < (-(2LL<<30)) || r > ((2LL<<30)-1)) {
fprintf (stderr, _("%s: %s: integer out of range\n"), cmd, "memsize");
return -1;
}
/* The check above should ensure this assignment does not overflow. */
memsize = r;
}
and like this for all Int64 arguments (note we don't need the
range check for these):
{
strtol_error xerr;
long long r;
xerr = xstrtoll (argv[1], NULL, 0, &r, "");
if (xerr != LONGINT_OK) {
fprintf (stderr,
_("%s: %s: invalid integer parameter (%s returned %d)\n"),
cmd, "size", "xstrtoll", xerr);
return -1;
}
size = r;
}
Note this also fixes an unrelated bug in guestfish handling of
RBufferOut. We were using 'fwrite' without checking the return
value, and this could have caused silent failures, eg. in the case
where there was not enough disk space to store the resulting file,
or even if the program was interrupted (but continued) during the
write.
Replace this with Gnulib 'full-write', and check the return value
and report errors.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit uses the Gnulib 'lock' module to implement a mutex on
the global list of handles which is stored by the library.
Note that Gnulib nicely avoids explicitly linking with -lpthread
unless the application program itself links to -lpthread. Locks
are only enabled in multithreaded applications.
$ ldd src/.libs/libguestfs.so.0.217.0
linux-vdso.so.1 => (0x00007fffcb7ff000)
libc.so.6 => /lib64/libc.so.6 (0x00007f96a4e6c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f96a544d000)
Please enter the commit message for your changes. Lines starting
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements FUSE filesystem support so that any libguestfs-
accessible disk image can be mounted as a local filesystem.
Note: file writes (ie. write(2) system call) is not yet implemented.
The API needs more test coverage, particularly lesser-used system
calls.
The big unresolved issue is UID/GID mapping between guest filesystem
IDs and the host. It's not easy to automate this because you need
extra details about the guest itself in order to get to its
UID->username map (eg. /etc/passwd from the guest).
|
|
|
|
| |
Uses Gnulib implementation of openat which should be portable.
|
| |
|
|
|
|
|
|
|
|
|
| |
* Makefile.am (ACLOCAL_AMFLAGS): Specify only one include dir: m4.
* bootstrap: Tell gnulib-tool to put .m4 files in m4/, not gnulib/m4.
* autogen.sh: Move autoreconf from here into...
* bootstrap: ...here, so that it is run only when gnulib-tool is.
Also, tell it to skip the usual autopoint and libtoolize runs.
* m4/.gitignore: Update.
|
|
|
|
|
|
|
|
|
|
|
| |
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 : $_'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* m4/.gitignore: Ignore these files.
* m4/codeset.m4: Remove file.
* m4/gettext.m4: Likewise.
* m4/glibc2.m4: Likewise.
* m4/glibc21.m4: Likewise.
* m4/iconv.m4: Likewise.
* m4/intdiv0.m4: Likewise.
* m4/intl.m4: Likewise.
* m4/intldir.m4: Likewise.
* m4/intlmacosx.m4: Likewise.
* m4/intltool.m4: Likewise.
* m4/inttypes-pri.m4: Likewise.
* m4/inttypes.m4: Likewise.
* m4/inttypes_h.m4: Likewise.
* m4/isc-posix.m4: Likewise.
* m4/lcmessage.m4: Likewise.
* m4/lib-ld.m4: Likewise.
* m4/lib-link.m4: Likewise.
* m4/lib-prefix.m4: Likewise.
* m4/lock.m4: Likewise.
* m4/longdouble.m4: Likewise.
* m4/longlong.m4: Likewise.
* m4/nls.m4: Likewise.
* m4/po.m4: Likewise.
* m4/printf-posix.m4: Likewise.
* m4/progtest.m4: Likewise.
* m4/signed.m4: Likewise.
* m4/size_max.m4: Likewise.
* m4/stdint_h.m4: Likewise.
* m4/uintmax_t.m4: Likewise.
* m4/ulonglong.m4: Likewise.
* m4/visibility.m4: Likewise.
* m4/wchar_t.m4: Likewise.
* m4/wint_t.m4: Likewise.
* m4/xsize.m4: Likewise.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|