1. 14 1月, 2015 3 次提交
    • M
      conf: Increase virNetDevBandwidthParse intelligence · a605025c
      Michal Privoznik 提交于
      There's this function virNetDevBandwidthParse which parses the
      bandwidth XML snippet. But it's not clever much. For the
      following XML it allocates the virNetDevBandwidth structure even
      though it's completely empty:
      
          <bandwidth>
          </bandwidth>
      
      Later in the code there are some places where we check if
      bandwidth was set or not. And since we obtained pointer from the
      parsing function we think that it is when in fact it isn't.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a605025c
    • D
      Give virDomainDef parser & formatter their own flags · 0ecd6851
      Daniel P. Berrange 提交于
      The virDomainDefParse* and virDomainDefFormat* methods both
      accept the VIR_DOMAIN_XML_* flags defined in the public API,
      along with a set of other VIR_DOMAIN_XML_INTERNAL_* flags
      defined in domain_conf.c.
      
      This is seriously confusing & error prone for a number of
      reasons:
      
       - VIR_DOMAIN_XML_SECURE, VIR_DOMAIN_XML_MIGRATABLE and
         VIR_DOMAIN_XML_UPDATE_CPU are only relevant for the
         formatting operation
       - Some of the VIR_DOMAIN_XML_INTERNAL_* flags only apply
         to parse or to format, but not both.
      
      This patch cleanly separates out the flags. There are two
      distint VIR_DOMAIN_DEF_PARSE_* and VIR_DOMAIN_DEF_FORMAT_*
      flags that are used by the corresponding methods. The
      VIR_DOMAIN_XML_* flags received via public API calls must
      be converted to the VIR_DOMAIN_DEF_FORMAT_* flags where
      needed.
      
      The various calls to virDomainDefParse which hardcoded the
      use of the VIR_DOMAIN_XML_INACTIVE flag change to use the
      VIR_DOMAIN_DEF_PARSE_INACTIVE flag.
      0ecd6851
    • D
      Decouple CPU XML formatting from domain XML public API flags · e34473c1
      Daniel P. Berrange 提交于
      The virCPUDefFormat* methods were relying on the VIR_DOMAIN_XML_*
      flag definitions. It is not desirable for low level internal
      functions to be coupled to flags for the public API, since they
      may need to be called from several different contexts where the
      flags would not be appropriate.
      e34473c1
  2. 13 1月, 2015 19 次提交
  3. 12 1月, 2015 9 次提交
  4. 09 1月, 2015 5 次提交
  5. 08 1月, 2015 4 次提交