[libvirt] [PATCH]lxc: fix an improper comment in lxc_process

From: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> Fix an improper comment when libvirt has released all resources for lxc. Then original comment says "stopped" rather than "released". Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- src/lxc/lxc_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index d07ff13..7746c9b 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -217,7 +217,7 @@ static void virLXCProcessCleanup(virLXCDriverPtr driver, virSystemdTerminateMachine(vm->def->name, "lxc", true); - /* now that we know it's stopped call the hook if present */ + /* The "release" hook cleans up additional resources */ if (virHookPresent(VIR_HOOK_DRIVER_LXC)) { char *xml = virDomainDefFormat(vm->def, 0); -- 1.8.2.1

On 14/10/13 14:22, Chen Hanxiao wrote:
From: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Fix an improper comment when libvirt has released all resources for lxc. Then original comment says "stopped" rather than "released".
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- src/lxc/lxc_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index d07ff13..7746c9b 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -217,7 +217,7 @@ static void virLXCProcessCleanup(virLXCDriverPtr driver, virSystemdTerminateMachine(vm->def->name, "lxc", true);
- /* now that we know it's stopped call the hook if present */
I see no problem here, given that "it" means the vm process here. It might be better to have a comma after "stopped" though, with explicitly pointing out what "it" stands for. I.e. /* now that we know the vm process is stopped, call the hook if present */ Osier

-----Original Message----- From: Osier Yang [mailto:jyang@redhat.com] Sent: Monday, October 14, 2013 3:34 PM To: Chen Hanxiao Cc: libvir-list@redhat.com Subject: Re: [libvirt] [PATCH]lxc: fix an improper comment in lxc_process
On 14/10/13 14:22, Chen Hanxiao wrote:
From: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Fix an improper comment when libvirt has released all resources for lxc. Then original comment says "stopped" rather than "released".
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- src/lxc/lxc_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index d07ff13..7746c9b 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -217,7 +217,7 @@ static void virLXCProcessCleanup(virLXCDriverPtr driver, virSystemdTerminateMachine(vm->def->name, "lxc", true);
- /* now that we know it's stopped call the hook if present */
I see no problem here, given that "it" means the vm process here. It might be better to have a comma after "stopped" though, with explicitly pointing out what "it" stands for. I.e.
In this function will handle two scenario: a) a LXC guest is stopped b) libvirt has released all resources But the comments are the SAME. That are not what intended. I think it's more clear if we could distinguish them.
/* now that we know the vm process is stopped, call the hook if present */
Osier

On 14/10/13 15:49, Chen Hanxiao wrote:
-----Original Message----- From: Osier Yang [mailto:jyang@redhat.com] Sent: Monday, October 14, 2013 3:34 PM To: Chen Hanxiao Cc: libvir-list@redhat.com Subject: Re: [libvirt] [PATCH]lxc: fix an improper comment in lxc_process
From: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
Fix an improper comment when libvirt has released all resources for lxc. Then original comment says "stopped" rather than "released".
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- src/lxc/lxc_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index d07ff13..7746c9b 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -217,7 +217,7 @@ static void virLXCProcessCleanup(virLXCDriverPtr driver, virSystemdTerminateMachine(vm->def->name, "lxc", true);
- /* now that we know it's stopped call the hook if present */ I see no problem here, given that "it" means the vm process here. It might be better to have a comma after "stopped" though, with explicitly
On 14/10/13 14:22, Chen Hanxiao wrote: pointing out what "it" stands for. I.e.
In this function will handle two scenario: a) a LXC guest is stopped b) libvirt has released all resources
But the comments are the SAME. That are not what intended. I think it's more clear if we could distinguish them.
Hm, I didn't notice it's the second "hook" call. ACK and pushed. Osier
participants (2)
-
Chen Hanxiao
-
Osier Yang