On 2012年08月31日 19:10, Osier Yang wrote:
Validates the wwn while parsing, error out if it's malformed.
* src/util/util.h: Declare virValidateWWN
* src/util/util.c: Implement virValidateWWN
* src/libvirt_private.syms: Export virValidateWWN.
* src/conf/domain_conf.h: New member 'wwn' for disk def.
* src/conf/domain_conf.c: Parse and format disk<wwn>
---
I made a memory leak in this patch, will squash the follow
diff in if pushing.
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index df6599a..40353a4 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -4063,6 +4063,7 @@ cleanup:
VIR_FREE(copy_on_read);
VIR_FREE(devaddr);
VIR_FREE(serial);
+ VIR_FREE(wwn);
virStorageEncryptionFree(encryption);
VIR_FREE(startupPolicy);