summaryrefslogtreecommitdiffstats
path: root/fuse
Commit message (Collapse)AuthorAgeFilesLines
* Remove some unused variables.Richard Jones2010-02-151-1/+1
| | | | | | Since we have to compile with -Wno-unused-variables, we don't spot unused variables in code. I found these by compiling the code in Ubuntu.
* Use mount-options instead of mount to avoid implicit -o sync.Richard Jones2010-02-101-4/+7
| | | | | | | | | | | | | | | guestfs_mount adds -o sync implicitly. This causes a very large performance problem for write-intensive programs (eg. virt-v2v). Document this as a "gotcha". Change the tests, guestfish, Sys::Guestfs::Lib, guestmount to use mount-options instead. (Note that this gotcha does not affect mount-ro). The source of the performance problem was first identified by Matthew Booth.
* Set locale in C programs so l10n works (RHBZ#559962).Richard Jones2010-01-292-0/+5
| | | | | | | | | | | | | | | This commit adds the calls to setlocale &c to all of the current C programs. It also adds l10n support to hivexget and hivexml which lacked them previously. To test this, try: LANG=pa_IN.UTF-8 guestfish --cmd-help (You can only do this test after installing the package, or at least the 'pa.mo' mo-file in the correct place).
* New tool: virt-list-filesystemsRichard Jones2009-11-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Use this program as a convenient way to list the filesystems available in a disk image or libvirt guest. Example: $ virt-list-filesystems /dev/vg_trick/Debian5x64 /dev/debian5x64/home /dev/debian5x64/root /dev/debian5x64/tmp /dev/debian5x64/usr /dev/debian5x64/var /dev/sda1 This is designed to make it easier for novices to use guestfish and guestmount. In particular with guestmount this acts as a way to get a list of filesystems to use with the '-m' option. ie: $ virt-list-filesystems unknowndisk.img /dev/sda1 /dev/sda2 $ guestmount -a unknowndisk.img -m /dev/sda1 /mnt
* maint: use EXIT_SUCCESS and EXIT_FAILURE, not 0 and 1 in "usage", tooJim Meyering2009-11-201-2/+2
| | | | | | | | | | Convert by running these commands: perl -pi -e 's/\b(usage ?)\(1\)/$1(EXIT_FAILURE)/' \ fish/fish.c fuse/guestmount.c perl -pi -e 's/\b(usage ?)\(0\)/$1(EXIT_SUCCESS)/' \ fish/fish.c fuse/guestmount.c * fish/fish.c (main): Replace 0/1 with EXIT_SUCCESS/EXIT_FAILURE. * fuse/guestmount.c (main): Likewise.
* maint: use EXIT_SUCCESS and EXIT_FAILURE, not 0 and 1 to exitJim Meyering2009-11-202-15/+15
| | | | | | | | | | | | | | | Convert all uses automatically, via these two commands: git grep -l '\<exit *(1)' \ | grep -vEf .x-sc_prohibit_magic_number_exit \ | xargs --no-run-if-empty \ perl -pi -e 's/\b(exit ?)\(1\)/$1(EXIT_FAILURE)/' git grep -l '\<exit *(0)' \ | grep -vEf .x-sc_prohibit_magic_number_exit \ | xargs --no-run-if-empty \ perl -pi -e 's/\b(exit ?)\(0\)/$1(EXIT_SUCCESS)/' * .x-sc_prohibit_magic_number_exit: New file. Edit (RWMJ): Don't change Java code.
* build: Fix inter-directory dependenciesMatthew Booth2009-11-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds an explicit dependency on generator.ml for every file it generates, except java files. Java is left for another time because it's considerably trickier. It also adds a build rule for src/libguestfs.la so it can be rebuilt as required from other directories. It does this by creating a top level make file, subdir-rules.mk, which can be included from sub-directories. sub-directories need to define 'generator_built' to include local files which are built by generator.ml, and they will be updated automatically. This fixes parallel make, and will automatically re-create generated files when make is run from any directory. It also fixes the problem which efad4f53 was targetting. Specifically, src/guestfs_protocol.(c|h) had an erroneous dependency on stamp-generator, and therefore generator.ml, despite not being directly created by it. This caused them to be recreated every time generator.ml ran rather than only when src/guestfs_protocol.x was updated, which cascaded into a daemon and therefore appliance update. This patch also changes the contents of the distribution tarball by including files created by rpcgen.
* syntax-check: expand TABs in generator.mlJim Meyering2009-11-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | Jim Meyering wrote: >>From 6f128e90afb055f9899011c4a592eb289e678936 Mon Sep 17 00:00:00 2001 > From: Jim Meyering <meyering@redhat.com> > Date: Thu, 19 Nov 2009 11:39:10 +0100 > Subject: [PATCH libguestfs] syntax-check: expand TABs in generator.ml > > * src/generator.ml: Expand leading TABs to spaces. That was incomplete. Please use the following instead. With it, now, "make syntax-check" now passes once again. >From 716a30d0b692972aac8fbea1fb7ad3318ab3a0d8 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@redhat.com> Date: Thu, 19 Nov 2009 11:39:10 +0100 Subject: [PATCH libguestfs] syntax-check: expand leading TABs * src/generator.ml: Expand leading TABs to spaces. * fuse/test-fuse.sh: Likewise.
* fuse/RHEL: Don't require UTIME_{NOW,OMIT} to be defined.Richard Jones2009-11-181-0/+8
| | | | | These macros don't exist on RHEL/CentOS 5.4. If the feature is missing then just don't implement it in the FUSE layer.
* fuse: Add test-fuse.sh to EXTRA_DIST.Richard Jones2009-11-181-1/+1
|
* generator: Fix API of functions that return RBufferOutRichard Jones2009-11-181-7/+1
| | | | | | | | | | | | | | | | | | | | | (NB: The API / ABI doesn't actually change here - it's just made much simpler to use). The API for RBufferOut functions was unexpectedly hard to use in the case where a zero-length buffer might be returned. For discussion on this see: https://www.redhat.com/archives/libguestfs/2009-November/thread.html#00115 This commit ensures that in the zero-length buffer case, the return value is never NULL. Thus code is now able to just check if the return value == NULL to indicate an error, which is simpler for all concerned. The implementation of this is, however, more complex because we have to be careful about this case inside both the daemon and the library code, which is what this commit does. This has passed a full round of tests.
* fuse: Add tests for guestmount.Richard Jones2009-11-172-0/+226
| | | | | This script contains non-exhaustive tests for the system calls implemented by guestmount.
* fuse: Fix read for empty files.Richard Jones2009-11-171-1/+7
| | | | | Error handling for the guestfs_pread call was incorrect, which meant that empty files could produce spurious error messages.
* fuse: Fix cache invalidation in rename operation.Richard Jones2009-11-171-0/+1
| | | | | We need to invalidate both parameters, otherwise the old (moved) file can appear that it still exists after the move.
* fuse: Fix hard link creation.Richard Jones2009-11-171-1/+2
| | | | | The parameters were swapped. We also need to invalidate the cache for both parameters.
* fuse: Fix symlink creation (RHBZ#538069).Richard Jones2009-11-171-1/+1
| | | | The parameters were swapped, preventing symlinks from being created.
* Don't export STREQ and friends in <guestfs.h>Richard Jones2009-11-105-25/+61
| | | | | Move these to private header file(s) and other places as required since these aren't part of the public API.
* avoid "syntax-check" failure: hide cast of argument to freeJim Meyering2009-11-101-2/+4
| | | | | * fuse/guestmount.c (fg_readlink): Perform cast in a separate statement to hide it from "make syntax-check".
* use STREQ, not strcmp: part 1Jim Meyering2009-11-092-9/+9
| | | | | git grep -l 'strcmp *([^=]*== *0'|xargs \ perl -pi -e 's/\bstrcmp( *\(.*?\)) *== *0/STREQ$1/g'
* indent with spaces, not TABsJim Meyering2009-11-091-1/+1
| | | | | | | | | | | * HACKING: Expand indentation TABs. * configure.ac: Likewise. * daemon/daemon.h: Likewise. * daemon/guestfsd.c: Likewise. * fuse/guestmount.c: Likewise. * hivex/LICENSE: Likewise. * src/generator.ml: Likewise. * tools/virt-win-reg: Likewise.
* fix doc typoJim Meyering2009-11-091-1/+1
| | | | * fuse/guestmount.pod: Avoid "the the".
* Fixes for compiling on 32 bit.Richard W.M. Jones2009-11-061-1/+1
|
* Fix EXTRA_DIST line in fuse/Makefile.am.Richard Jones2009-11-031-1/+1
|
* Comment out code which provokes strange gcc optimization error.Richard Jones2009-11-031-0/+5
|
* FUSE filesystem support.Richard Jones2009-11-035-0/+1882
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).