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

Re: [libvirt] [PATCH v3 04/21] LXC from native: migrate fstab and lxc.mount.entry



New Coverity complaint regarding this change ...

<...snip...>

>  virDomainDefPtr
>  lxcParseConfigString(const char *config)
>  {
> @@ -115,6 +343,7 @@ lxcParseConfigString(const char *config)
>                         _("failed to generate uuid"));
>          goto error;
>      }
> +
>      vmdef->id = -1;
>      vmdef->mem.max_balloon = 64 * 1024;
>  
> @@ -127,6 +356,8 @@ lxcParseConfigString(const char *config)
>       * minimum required to make XML parsing pass */
>      vmdef->maxvcpus = 1;
>  
> +    vmdef->nfss = 0;
> +
>      if (VIR_STRDUP(vmdef->os.type, "exe") < 0)
>          goto error;
>  
> @@ -142,6 +373,18 @@ lxcParseConfigString(const char *config)
>      if (lxcSetRootfs(vmdef, properties) < 0)
>          goto error;
>  
> +    /* Look for fstab: we shouldn't have it */
> +    if (virConfGetValue(properties, "lxc.mount")) {
> +        virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
> +                       _("lxc.mount found, use lxc.mount.entry lines instead"));
> +        goto error;
> +    }
> +
> +    /* Loop over lxc.mount.entry to add filesystem devices for them */
> +    value = virConfGetValue(properties, "lxc.mount.entry");

(1) Event returned_pointer: 	Pointer "value" returned by
"virConfGetValue(properties, "lxc.mount.entry")" is never used.


'value' is set, but never used.


John
> +    if (virConfWalk(properties, lxcFstabWalkCallback, vmdef) < 0)
> +        goto error;
> +
>      goto cleanup;
>  


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