[libvirt] [PATCH v2 1/4] conf: s/virDomainObjGetShortName/virDomainDefGetShortName/
John Ferlan
jferlan at redhat.com
Wed Nov 1 23:11:26 UTC 2017
On 10/24/2017 07:41 AM, Michal Privoznik wrote:
> This function works over domain definition and not domain object.
> Its name is thus misleading.
>
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
> src/conf/domain_conf.c | 4 ++--
> src/conf/domain_conf.h | 2 +-
> src/libvirt_private.syms | 2 +-
> src/qemu/qemu_conf.c | 2 +-
> src/qemu/qemu_domain.c | 4 ++--
> src/qemu/qemu_driver.c | 2 +-
> 6 files changed, 8 insertions(+), 8 deletions(-)
>
Reviewed-by: John Ferlan <jferlan at redhat.com>
John
BTW: I wonder if this function is somewhat broken - it's using def->id
in order to generate the output, right? Which means for paths generated
before the guest starts, they'll start with "-1"... IOW: Directory and
file names that start with "-".
This wasn't a problem originally (commit id a042275a) since the
resulting path had "domain-" prepended to it - resulting in
"domain--1-QEMUGuest1, for example).
Personally, this looks REALLY odd when (re)using for example with a
hugepage test where the path is "-mem-path
/dev/hugepages2M/libvirt/qemu/-1-QEMUGuest1".
OK - maybe it's just me, but seeing a filename start with "-" is really
painful because it's not just a simple task of "rm $file", since "-"
needs to escaped so as to not be considered an argument to rm <sigh>.
I know, send a patch or just grumble and let someone else do it ;-)
More information about the libvir-list
mailing list