]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/mini-os.git/commitdiff
minios: Fix bug/build problem introduced in c/s 22799
authorJohn Weekes <lists.xen@nuclearfallout.net>
Thu, 27 Jan 2011 09:37:19 +0000 (09:37 +0000)
committerJohn Weekes <lists.xen@nuclearfallout.net>
Thu, 27 Jan 2011 09:37:19 +0000 (09:37 +0000)
With "debug=n", "make stubdom" currently fails in xen-unstable. This
patch addresses this through minor fixups.

Signed-off-by: John Weekes <lists.xen@nuclearfallout.net>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
lib/sys.c

index 7a49886e2dac7eeb09646d75d999b4540a5da9d9..b7b3aff50ac77a9ea50c41600dc682b532293e07 100644 (file)
--- a/lib/sys.c
+++ b/lib/sys.c
@@ -178,10 +178,10 @@ int posix_openpt(int flags)
     return(dev->fd);
 }
 
-int open_savefile(char *path, int save)
+int open_savefile(const char *path, int save)
 {
     struct consfront_dev *dev;
-    char *nodename[64];
+    char nodename[64];
 
     snprintf(nodename, sizeof(nodename), "device/console/%d", save ? SAVE_CONSOLE : RESTORE_CONSOLE);
 
@@ -286,7 +286,7 @@ int write(int fd, const void *buf, size_t nbytes)
                 while (nbytes > 0) {
                     ret = xencons_ring_send(files[fd].cons.dev, (char *)buf, nbytes);
                     nbytes -= ret;
-                    buf += ret;
+                    buf = (char *)buf + ret;
                 }
                 return tot - nbytes;
             }