[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] libxl: rtc_timeoffset fix; uptime fix; typo corrections



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@xxxxxxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.