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

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



# 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


 


Rackspace

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