From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Weekes Subject: [PATCH] Fix minios bug/build problem introduced in c/s 22799 Date: Wed, 26 Jan 2011 13:17:40 -0800 Message-ID: <4D408F74.6010305@nuclearfallout.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030807050109060404080705" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --------------030807050109060404080705 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit With "debug=n", "make stubdom" currently fails in xen-unstable. This patch addresses this through minor fixups. Signed-off-by: John Weekes Acked-by: Stefano Stabellini 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; } --------------030807050109060404080705 Content-Type: text/x-patch; name="sys.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="sys.patch" 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; } --------------030807050109060404080705 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------030807050109060404080705--