* [PATCH] libxl: rtc_timeoffset fix; uptime fix; typo corrections [not found] <1376600108-22669-1-git-send-email-lists.xen@nuclearfallout.net> @ 2013-08-15 21:14 ` John Weekes 2013-08-16 9:53 ` George Dunlap 0 siblings, 1 reply; 3+ messages in thread From: John Weekes @ 2013-08-15 21:14 UTC (permalink / raw) To: xen-devel@lists.xensource.com Cc: Ian Jackson, Ian Campbell, Stefano Stabellini 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 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] libxl: rtc_timeoffset fix; uptime fix; typo corrections 2013-08-15 21:14 ` [PATCH] libxl: rtc_timeoffset fix; uptime fix; typo corrections John Weekes @ 2013-08-16 9:53 ` George Dunlap 2013-08-19 16:05 ` Ian Jackson 0 siblings, 1 reply; 3+ messages in thread From: George Dunlap @ 2013-08-16 9:53 UTC (permalink / raw) To: John Weekes Cc: xen-devel@lists.xensource.com, Ian Jackson, Ian Campbell, Stefano Stabellini On Thu, Aug 15, 2013 at 10:14 PM, John Weekes <lists.xen@nuclearfallout.net> wrote: > 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> Thanks for the fixes -- but this will need to be broken down into three separate patches. -George > --- > 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 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] libxl: rtc_timeoffset fix; uptime fix; typo corrections 2013-08-16 9:53 ` George Dunlap @ 2013-08-19 16:05 ` Ian Jackson 0 siblings, 0 replies; 3+ messages in thread From: Ian Jackson @ 2013-08-19 16:05 UTC (permalink / raw) To: George Dunlap Cc: xen-devel@lists.xensource.com, John Weekes, Ian Campbell, Stefano Stabellini George Dunlap writes ("Re: [Xen-devel] [PATCH] libxl: rtc_timeoffset fix; uptime fix; typo corrections"): > On Thu, Aug 15, 2013 at 10:14 PM, John Weekes > <lists.xen@nuclearfallout.net> wrote: > > 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. ... This part looks OK to me - rather surprisingly perhaps, given that it doesn't actually change at all the place where the number is converted from a string to an integer! The rest is fine too. > Thanks for the fixes -- but this will need to be broken down into > three separate patches. Yes. Thanks, Ian. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-19 16:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1376600108-22669-1-git-send-email-lists.xen@nuclearfallout.net>
2013-08-15 21:14 ` [PATCH] libxl: rtc_timeoffset fix; uptime fix; typo corrections John Weekes
2013-08-16 9:53 ` George Dunlap
2013-08-19 16:05 ` Ian Jackson
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.