[libvirt] [PATCH] Mention the min duration for nodesuspend explicitly

Nitesh Konkar posted 1 patch 7 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1486472025-22372-1-git-send-email-niteshkonkar.libvirt@gmail.com
src/util/virnodesuspend.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
[libvirt] [PATCH] Mention the min duration for nodesuspend explicitly
Posted by Nitesh Konkar 7 years, 2 months ago
Although currently this is documented in virsh man page
and virsh help, the expicit mention in the error message
is helful for tools using the API directly.

Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
---
 src/util/virnodesuspend.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/util/virnodesuspend.c b/src/util/virnodesuspend.c
index 8bb8d93..71b2d4c 100644
--- a/src/util/virnodesuspend.c
+++ b/src/util/virnodesuspend.c
@@ -76,7 +76,9 @@ static int virNodeSuspendSetNodeWakeup(unsigned long long alarmTime)
     int ret = -1;
 
     if (alarmTime < MIN_TIME_REQ_FOR_SUSPEND) {
-        virReportError(VIR_ERR_INVALID_ARG, "%s", _("Suspend duration is too short"));
+        virReportError(VIR_ERR_INVALID_ARG,
+                       _("Suspend duration is too short, must be at least %u seconds"),
+                       MIN_TIME_REQ_FOR_SUSPEND);
         return -1;
     }
 
-- 
2.1.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Mention the min duration for nodesuspend explicitly
Posted by John Ferlan 7 years, 2 months ago

On 02/07/2017 07:53 AM, Nitesh Konkar wrote:
> Although currently this is documented in virsh man page
> and virsh help, the expicit mention in the error message
> is helful for tools using the API directly.
> 
> Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
> ---
>  src/util/virnodesuspend.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

ACK and pushed,

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list