WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] fs-back: fix compilation error

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] fs-back: fix compilation error
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Tue, 22 Jul 2008 12:46:49 +0900
Cc: gm281@xxxxxxxxx, samuel.thibault@xxxxxxxxxxxxx
Delivery-date: Mon, 21 Jul 2008 20:47:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6i
# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1216698334 -32400
# Node ID ae4e27f3ad6f9fedb6ac89f8a4e2a3778ae6a757
# Parent  f95a37f2deab4a0624ff59585d2218c42cdcf4a8
fs-back: fix compilation error.

XC_PAGE_SIZE and XC_PAGE_MASK should be used instead of PAGE_SIZE
and PAGE_MASK.
This patch fixes the following compilation errors.

> fs-ops.c: In function dispatch_list:
> fs-ops.c:518: error: PAGE_SIZE undeclared (first use in this function)
> fs-ops.c:518: error: (Each undeclared identifier is reported only once
> fs-ops.c:518: error: for each function it appears in.)
> fs-ops.c:520: error: PAGE_MASK undeclared (first use in this function)

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff --git a/tools/fs-back/fs-backend.c b/tools/fs-back/fs-backend.c
--- a/tools/fs-back/fs-backend.c
+++ b/tools/fs-back/fs-backend.c
@@ -239,7 +239,7 @@
                                     mount->dom_id,
                                     mount->gref,
                                     PROT_READ | PROT_WRITE);
-    BACK_RING_INIT(&mount->ring, sring, PAGE_SIZE);
+    BACK_RING_INIT(&mount->ring, sring, XC_PAGE_SIZE);
     mount->nr_entries = mount->ring.nr_ents; 
     for (i = 0; i < MAX_FDS; i++)
         mount->fds[i] = -1;
diff --git a/tools/fs-back/fs-ops.c b/tools/fs-back/fs-ops.c
--- a/tools/fs-back/fs-ops.c
+++ b/tools/fs-back/fs-ops.c
@@ -515,9 +515,9 @@
     /* If there was any error with reading the directory, errno will be set */
     error_code = errno;
     /* Copy file names of the remaining non-NULL dirents into buf */
-    assert(NAME_MAX < PAGE_SIZE >> 1);
+    assert(NAME_MAX < XC_PAGE_SIZE >> 1);
     while(dirent != NULL && 
-            (PAGE_SIZE - ((unsigned long)buf & PAGE_MASK) > NAME_MAX))
+            (XC_PAGE_SIZE - ((unsigned long)buf & XC_PAGE_MASK) > NAME_MAX))
     {
         int curr_length = strlen(dirent->d_name) + 1;
         


-- 
yamahata

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] fs-back: fix compilation error, Isaku Yamahata <=