From: John Weekes <lists.xen@nuclearfallout.net>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [PATCH] libxl: rtc_timeoffset fix; uptime fix; typo corrections
Date: Thu, 15 Aug 2013 14:14:39 -0700 [thread overview]
Message-ID: <520D44BF.3020706@nuclearfallout.net> (raw)
In-Reply-To: <1376600108-22669-1-git-send-email-lists.xen@nuclearfallout.net>
rtc_timeoffset did not allow negative values to be specified;
fixing this required changing its type to a signed integer and
allowing negative numbers as values in the configuration file
without tripping an error message.
"xl uptime" needed to be modified to allow no arguments.
Minor typo fixes.
Signed-off-by: John Weekes <lists.xen@nuclearfallout.net>
---
tools/libxl/libxl.c | 8 ++++----
tools/libxl/libxl_types.idl | 2 +-
tools/libxl/libxlu_cfg_l.l | 2 +-
tools/libxl/xl_cmdimpl.c | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 81785df..57e6588 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -554,7 +554,7 @@ libxl_dominfo * libxl_list_domain(libxl_ctx *ctx, int *nb_domain_out)
ret = xc_domain_getinfolist(ctx->xch, 0, 1024, info);
if (ret<0) {
- LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "geting domain info list");
+ LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain info list");
free(ptr);
return NULL;
}
@@ -573,7 +573,7 @@ int libxl_domain_info(libxl_ctx *ctx, libxl_dominfo *info_r,
ret = xc_domain_getinfolist(ctx->xch, domid, 1, &xcinfo);
if (ret<0) {
- LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "geting domain info list");
+ LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain info list");
return ERROR_FAIL;
}
if (ret==0 || xcinfo.domain != domid) return ERROR_INVAL;
@@ -677,7 +677,7 @@ libxl_vminfo * libxl_list_vm(libxl_ctx *ctx, int *nb_vm_out)
ret = xc_domain_getinfolist(ctx->xch, 1, 1024, info);
if (ret<0) {
- LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "geting domain info list");
+ LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "getting domain info list");
return NULL;
}
for (idx = i = 0; i < ret; i++) {
@@ -1375,7 +1375,7 @@ void libxl__destroy_domid(libxl__egc *egc, libxl__destroy_domid_state *dis)
case 0:
break;
case ERROR_INVAL:
- LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "non-existant domain %d", domid);
+ LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "non-existent domain %d", domid);
default:
goto out;
}
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 85341a0..7252b1d 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -273,7 +273,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
("target_memkb", MemKB),
("video_memkb", MemKB),
("shadow_memkb", MemKB),
- ("rtc_timeoffset", uint32),
+ ("rtc_timeoffset", integer),
("exec_ssidref", uint32),
("localtime", libxl_defbool),
("disable_migrate", libxl_defbool),
diff --git a/tools/libxl/libxlu_cfg_l.l b/tools/libxl/libxlu_cfg_l.l
index e0ea8cf..8753b30 100644
--- a/tools/libxl/libxlu_cfg_l.l
+++ b/tools/libxl/libxlu_cfg_l.l
@@ -56,7 +56,7 @@ void xlu__cfg_yyset_column(int column_no, yyscan_t yyscanner);
yylval->string= xlu__cfgl_strdup(ctx,yytext);
GOT(IDENT);
}
-[0-9][0-9a-fx]* {
+-?[0-9][0-9a-fx]* {
yylval->string= xlu__cfgl_strdup(ctx,yytext);
GOT(NUMBER);
}
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 884f050..a71c3b1 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -6125,7 +6125,7 @@ int main_uptime(int argc, char **argv)
int nb_doms = 0;
int opt;
- SWITCH_FOREACH_OPT(opt, "s", NULL, "uptime", 1) {
+ SWITCH_FOREACH_OPT(opt, "s", NULL, "uptime", 0) {
case 's':
short_mode = 1;
break;
--
1.8.1.5
next parent reply other threads:[~2013-08-15 21:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1376600108-22669-1-git-send-email-lists.xen@nuclearfallout.net>
2013-08-15 21:14 ` John Weekes [this message]
2013-08-16 9:53 ` [PATCH] libxl: rtc_timeoffset fix; uptime fix; typo corrections George Dunlap
2013-08-19 16:05 ` Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=520D44BF.3020706@nuclearfallout.net \
--to=lists.xen@nuclearfallout.net \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.