[Libguestfs] [PATCH] supermin: Handle FTSENT.fts_info correctly -- it is not a bitmask.

Richard W.M. Jones rjones at redhat.com
Thu Mar 6 08:31:39 UTC 2014


On Wed, Mar 05, 2014 at 09:21:36PM +0100, Hilko Bengen wrote:
> Found by trying to build a simple appliance using
> 
>     $ supermin --prepare -o supermin.d dash
> 
> and adding a tarball containing a symbolic link (/init -> /bin/sh).
> This symbolic link was not transferred to the filesystem.
> ---
>  src/ext2fs-c.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/ext2fs-c.c b/src/ext2fs-c.c
> index 25f6788..4d1004c 100644
> --- a/src/ext2fs-c.c
> +++ b/src/ext2fs-c.c
> @@ -233,7 +233,7 @@ supermin_ext2fs_copy_dir_recursively_from_host (value fsv,
>        break;
>  
>      /* Ignore directories being visited in post-order. */
> -    if (entry->fts_info & FTS_DP)
> +    if (entry->fts_info == FTS_DP)
>        continue;
>  
>      /* Copy the file. */

ACK.

Was also a bug in the supermin 4 code which I blindly copied over ...

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW




More information about the Libguestfs mailing list