[libvirt] [PATCH 3/4] Rename hash.h and hash.c to virhash.h and virhash.c

Eric Blake eblake at redhat.com
Wed Jan 25 18:44:56 UTC 2012


On 01/25/2012 09:38 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> In preparation for the patch to include Murmurhash3, which
> introduces a virhashcode.h and virhashcode.c files, rename
> the existing hash.h and hash.c to virhash.h and virhash.c
> respectively.
> ---
>  po/POTFILES.in                      |    2 +-
>  src/Makefile.am                     |    2 +-
>  src/conf/domain_conf.h              |    2 +-
>  src/conf/nwfilter_conf.h            |    2 +-
>  src/conf/nwfilter_params.h          |    2 +-
>  src/cpu/cpu_generic.c               |    2 +-
>  src/qemu/qemu_monitor.h             |    2 +-
>  src/qemu/qemu_monitor_text.h        |    1 -
>  src/uml/uml_conf.h                  |    2 +-
>  src/util/cgroup.c                   |    2 +-
>  src/util/{hash.c => virhash.c}      |    2 +-
>  src/util/{hash.h => virhash.h}      |    0
>  src/xen/xen_driver.h                |    2 +-
>  src/xen/xm_internal.c               |    2 +-
>  tests/Makefile.am                   |   10 +++++-----
>  tests/{hashdata.h => virhashdata.h} |    0
>  tests/{hashtest.c => virhashtest.c} |    4 ++--

Gotta love git diffs of a file rename :)

> +++ b/src/qemu/qemu_monitor_text.h
> @@ -28,7 +28,6 @@
>  # include "internal.h"
>  
>  # include "qemu_monitor.h"
> -# include "hash.h"
>  

Huh - wonder why we had a stale header.

Recently, there was talk on the gnulib list about generalizing the
useless-include syntax checker to be extensible to arbitrary headers,
although there is nothing yet concrete from that discussion.  If it ever
materializes, we could use it for our own headers to catch dead includes
like this one.

> diff --git a/src/util/hash.c b/src/util/virhash.c
> similarity index 99%
> rename from src/util/hash.c
> rename to src/util/virhash.c

Missing a change in the comment header.

ACK - here's my trivial contribution:

diff --git i/src/util/virhash.c w/src/util/virhash.c
index 7294c7e..8eff50b 100644
--- i/src/util/virhash.c
+++ w/src/util/virhash.c
@@ -1,9 +1,9 @@
 /*
- * hash.c: chained hash tables for domain and domain/connection
deallocations
+ * virhash.c: chained hash tables for domain and domain/connection
deallocations
  *
  * Reference: Your favorite introductory book on algorithms
  *
- * Copyright (C) 2011 Red Hat, Inc.
+ * Copyright (C) 2011-2012 Red Hat, Inc.
  * Copyright (C) 2000 Bjorn Reese and Daniel Veillard.
  *
  * Permission to use, copy, modify, and distribute this software for any


-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120125/18eb58b0/attachment-0001.sig>


More information about the libvir-list mailing list