On Monday 05 October 2015 13:50:06 Richard W.M. Jones wrote:
We don't support RHEL 5 upstream (see the 'oldlinux'
branch for a
version that works with RHEL 5). Therefore remove a bunch of hacks
that were only needed on RHEL 5.
---
Mostly LGTM, just two notes:
diff --git a/daemon/swap.c b/daemon/swap.c
index 26fe30d..9d7839e 100644
--- a/daemon/swap.c
+++ b/daemon/swap.c
@@ -38,26 +38,10 @@ GUESTFSD_EXT_CMD(str_swaplabel, swaplabel);
/* Confirmed this is true for Linux swap partitions from the Linux sources. */
#define SWAP_LABEL_MAX 16
-/* Convenient place to test for the later version of e2fsprogs
- * and util-linux which supports -U parameters to specify UUIDs.
- * (Not supported in RHEL 5).
- */
int
optgroup_linuxfsuuid_available (void)
{
- CLEANUP_FREE char *err = NULL;
- int av;
-
- /* Upstream util-linux have been gradually changing '--help' to go
- * from stderr to stdout, and changing the return code from 1 to 0.
- * Thus we need to fold stdout and stderr together, and ignore the
- * return code.
- */
- ignore_value (commandf (NULL, &err, COMMAND_FLAG_FOLD_STDOUT_ON_STDERR,
- str_mkswap, "--help", NULL));
-
- av = strstr (err, "-U") != NULL;
- return av;
+ return 1;
}
If the "linuxfsuuid" is now always available, then it could be retired:
- remove its dependency in actions (there are 5)
- adding it to the optgroups_retired list in generator/optgroups.ml
diff --git a/generator/ruby.ml b/generator/ruby.ml
index 87bb34a..cb187b0 100644
--- a/generator/ruby.ml
+++ b/generator/ruby.ml
@@ -84,20 +84,6 @@ let rec generate_ruby_c () =
#define RSTRING_PTR(r) (RSTRING((r))->ptr)
#endif
-/* For RHEL 5 (Ruby 1.8.5) */
-#ifndef HAVE_RB_HASH_LOOKUP
-VALUE
-rb_hash_lookup (VALUE hash, VALUE key)
-{
- volatile VALUE val;
-
- if (!st_lookup (RHASH(hash)->tbl, key, &val))
- return Qnil;
-
- return val;
-}
-#endif /* !HAVE_RB_HASH_LOOKUP */
The
have_func("rb_hash_lookup")
in ruby/ext/guestfs/extconf.rb.in could be removed then.
Thanks,
--
Pino Toscano