On Tue, Nov 17, 2009 at 05:56:53PM +0000, Matthew Booth wrote:
On 17/11/09 17:06, Richard W.M. Jones wrote:
>> From 93514b1fdb56a0cb6b85b79aff9f08fbd71a9560 Mon Sep 17 00:00:00 2001
> From: Richard Jones<rjones(a)redhat.com>
> Date: Tue, 17 Nov 2009 16:59:52 +0000
> Subject: [PATCH 1/5] fuse: Fix symlink creation (RHBZ#538069).
>
> The parameters were swapped, preventing symlinks from being created.
> Furthermore, we need to invalidate the cache for both parameters.
> ---
> fuse/guestmount.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/fuse/guestmount.c b/fuse/guestmount.c
> index 739d8cb..8e081a6 100644
> --- a/fuse/guestmount.c
> +++ b/fuse/guestmount.c
> @@ -425,9 +425,10 @@ fg_symlink (const char *from, const char *to)
>
> if (read_only) return -EROFS;
>
> + dir_cache_invalidate (from);
As discussed on IRC, this isn't necessary (and could be confusing).
> dir_cache_invalidate (to);
>
> - r = guestfs_ln_s (g, to, from);
> + r = guestfs_ln_s (g, from, to);
> if (r == -1)
> return error ();
>
> -- 1.6.5.2
Apart from that, ACK.
Thanks - pushed without the extra cache invalidation, and also
tested this it's not necessary.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages.
http://et.redhat.com/~rjones/libguestfs/
See what it can do:
http://et.redhat.com/~rjones/libguestfs/recipes.html