Re: [PATCH 1/3] PHYP: Separating UUID functions in another file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/19/2010 07:37 PM, Eric Blake wrote:
On 11/19/2010 07:55 AM, Eduardo Otubo wrote:
I am moving all the UUID handling functions to phyp_uuid.[ch] files in
order not to bloat the main files phyp_driver.[ch] too much. Doing this
for two reasons:

     1) Network management in pHyp does not have a UUID.
     2) Need to create another set of functions to manage it.

I also modified some functions to support two types of execution:
DOMAIN and NET, so I can re-use the base common functions.
---
  po/POTFILES.in         |    1 +
  src/Makefile.am        |    3 +-
  src/phyp/phyp_driver.c |  464 +---------------------------------
  src/phyp/phyp_driver.h |   41 +++
  src/phyp/phyp_uuid.c   |  657 ++++++++++++++++++++++++++++++++++++++++++++++++
  src/phyp/phyp_uuid.h   |   36 +++
  6 files changed, 742 insertions(+), 460 deletions(-)
  create mode 100644 src/phyp/phyp_uuid.c
  create mode 100644 src/phyp/phyp_uuid.h


[I've rearranged my review a bit; .h before .c]

diff --git a/src/phyp/phyp_uuid.h b/src/phyp/phyp_uuid.h
new file mode 100644
index 0000000..ddf28f4
--- /dev/null
+++ b/src/phyp/phyp_uuid.h
@@ -0,0 +1,36 @@
+
+/*
+ * Copyright (C) 2010 Red Hat, Inc.
+ * Copyright IBM Corp. 2010
+ *
+ * phyp_uuid.c: set of functions to handle lpar uuid and network uuid
+ *              which does not have uuid itself, it must be artificially
+ *              created.
+ *
...
+
+#include<config.h>

While there are other counter-examples currently in libvirt.git, the
general rule of thumb tends to be that .c files should include config.h
first before any headers, and therefore .h files should not include it
(because it will already have been included by the .c file including
this .h).


And regarding all your comments, I'll fix and reply in my next patch using virInterface API. Thank you very much for all the comments. :)

Regards,

--
Eduardo Otubo
Software Engineer
Linux Technology Center
IBM Systems & Technology Group
Mobile: +55 19 8135 0885
eotubo@xxxxxxxxxxxxxxxxxx

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]