[Libguestfs] [PATCH 2/4] Make realpath mandatory

Richard W.M. Jones rjones at redhat.com
Tue May 20 20:41:10 UTC 2014


On Tue, May 20, 2014 at 07:54:46PM +0200, Pino Toscano wrote:
> It has been used unconditionally already for quite some time, so having
> just the "realpath" command conditional on the presence of it does not
> make much sense.
> 
> Drop the configure/build system handling of it, and make the "realpath"
> command no more optional (but keeping the "realpath" feature,
> unconditionally available now).

It would be good to mention commit a86eb0e0d2c67e2 in the
commit message.

Apart from that, ACK.

Rich.

>  configure.ac           |  1 -
>  daemon/realpath.c      | 14 --------------
>  generator/actions.ml   |  1 -
>  generator/optgroups.ml |  1 +
>  4 files changed, 1 insertion(+), 16 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 552ed77..f3fd10f 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -308,7 +308,6 @@ AC_CHECK_FUNCS([\
>      ntohs \
>      posix_fallocate \
>      posix_fadvise \
> -    realpath \
>      removexattr \
>      setitimer \
>      setxattr \
> diff --git a/daemon/realpath.c b/daemon/realpath.c
> index 99f5247..1e07291 100644
> --- a/daemon/realpath.c
> +++ b/daemon/realpath.c
> @@ -33,14 +33,6 @@
>  #include "optgroups.h"
>  #include "actions.h"
>  
> -#ifdef HAVE_REALPATH
> -
> -int
> -optgroup_realpath_available (void)
> -{
> -  return 1;
> -}
> -
>  char *
>  do_realpath (const char *path)
>  {
> @@ -57,12 +49,6 @@ do_realpath (const char *path)
>    return ret;			/* caller frees */
>  }
>  
> -#else /* !HAVE_REALPATH */
> -
> -OPTGROUP_REALPATH_NOT_AVAILABLE
> -
> -#endif /* !HAVE_REALPATH */
> -
>  static int find_path_element (int fd_cwd, int is_end, const char *name, char **name_ret);
>  
>  char *
> diff --git a/generator/actions.ml b/generator/actions.ml
> index 0826137..85503ce 100644
> --- a/generator/actions.ml
> +++ b/generator/actions.ml
> @@ -6665,7 +6665,6 @@ matching lines." };
>      name = "realpath";
>      style = RString "rpath", [Pathname "path"], [];
>      proc_nr = Some 163;
> -    optional = Some "realpath";
>      tests = [
>        InitISOFS, Always, TestResultString (
>          [["realpath"; "/../directory"]], "/directory"), []
> diff --git a/generator/optgroups.ml b/generator/optgroups.ml
> index a08f9c3..eb5ff74 100644
> --- a/generator/optgroups.ml
> +++ b/generator/optgroups.ml
> @@ -31,6 +31,7 @@ open Actions
>   * but libguestfs ought to provide them to the user.
>   *)
>  let internal_optgroups_available = [
> +  "realpath";
>  ]
>  
>  (* Create list of optional groups. *)
> -- 
> 1.9.0
> 
> _______________________________________________
> Libguestfs mailing list
> Libguestfs at redhat.com
> https://www.redhat.com/mailman/listinfo/libguestfs

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top




More information about the Libguestfs mailing list