All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix minios bug/build problem introduced in c/s 22799
@ 2011-01-26 21:17 John Weekes
  0 siblings, 0 replies; only message in thread
From: John Weekes @ 2011-01-26 21:17 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com

[-- Attachment #1: Type: text/plain, Size: 1077 bytes --]

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>


diff -r b59f04eb8978 extras/mini-os/lib/sys.c
--- a/extras/mini-os/lib/sys.c  Fri Jan 21 18:06:23 2011 +0000
+++ b/extras/mini-os/lib/sys.c  Tue Jan 25 15:18:05 2011 -0500
@@ -178,10 +178,10 @@
      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 @@
                  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;
              }



[-- Attachment #2: sys.patch --]
[-- Type: text/x-patch, Size: 829 bytes --]

diff -r b59f04eb8978 extras/mini-os/lib/sys.c
--- a/extras/mini-os/lib/sys.c  Fri Jan 21 18:06:23 2011 +0000
+++ b/extras/mini-os/lib/sys.c  Tue Jan 25 15:18:05 2011 -0500
@@ -178,10 +178,10 @@
     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 @@
                 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;
             }

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-26 21:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-26 21:17 [PATCH] Fix minios bug/build problem introduced in c/s 22799 John Weekes

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.