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-changelog

[Xen-changelog] This fixes the "make check" feature of xenstore to prope

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] This fixes the "make check" feature of xenstore to properly compile with
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 22 Sep 2005 10:16:11 +0000
Delivery-date: Thu, 22 Sep 2005 10:25:37 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 52eb8504be717c1ee7371234696bf8fa45b2aea6
# Parent  a32ee93b3b336ce864e8fa28ca4bb5c001b7dfaf
This fixes the "make check" feature of xenstore to properly compile with
x86-64. When compiling you would get the following error since on x86-64
it was passing a long , when you are expecting an int.

Signed-off-by: Jerone Young <jyoung5@xxxxxxxxxx>

diff -r a32ee93b3b33 -r 52eb8504be71 tools/xenstore/xs_random.c
--- a/tools/xenstore/xs_random.c        Wed Sep 21 22:41:34 2005
+++ b/tools/xenstore/xs_random.c        Thu Sep 22 10:04:30 2005
@@ -74,9 +74,9 @@
 static void maybe_convert_to_directory(const char *filename)
 {
        struct stat st;
-       char *dirname = talloc_asprintf(filename, "%.*s", 
-                                       strrchr(filename, '/') - filename,
-                                       filename);
+       char *dirname = talloc_asprintf(
+               filename, "%.*s",
+               (int)(strrchr(filename, '/') - filename), filename);
        if (lstat(dirname, &st) == 0 && S_ISREG(st.st_mode))
                convert_to_dir(dirname);
 }
@@ -249,7 +249,7 @@
 
        /* Copy permissions from parent */
        command = talloc_asprintf(filename, "cp %.*s/.perms %s",
-                                 strrchr(filename, '/') - filename,
+                                 (int)(strrchr(filename, '/') - filename),
                                  filename, permfile);
        do_command(command);
 }      
@@ -308,7 +308,7 @@
        char *slash = strrchr(name + 1, '/');
        if (!slash)
                return talloc_strdup(name, "/");
-       return talloc_asprintf(name, "%.*s", slash-name, name);
+       return talloc_asprintf(name, "%.*s", (int)(slash-name), name);
 }
 
 static void make_dirs(const char *filename)
@@ -1063,7 +1063,8 @@
 
                ret = do_next_op(data->ops, h, i + data->seed, verbose);
                if (verbose)
-                       printf("-> %.*s\n", strchr(ret, '\n') - ret, ret);
+                       printf("-> %.*s\n",
+                              (int)(strchr(ret, '\n') - ret), ret);
                if (streq(ret, "FAILED:Bad file descriptor"))
                        goto out;
                if (kill(daemon_pid, 0) != 0)
@@ -1334,13 +1335,14 @@
 
                file = do_next_op(&file_ops, fileh, i+data->seed, verbose);
                if (verbose)
-                       printf("-> %.*s\n", strchr(file, '/') - file, file);
+                       printf("-> %.*s\n",
+                              (int)(strchr(file, '/') - file), file);
                
                if (verbose)
                        printf("XS: ");
                xs = do_next_op(&xs_ops, xsh, i+data->seed, verbose);
                if (verbose)
-                       printf("-> %.*s\n", strchr(xs, '/') - xs, xs);
+                       printf("-> %.*s\n", (int)(strchr(xs, '/') - xs), xs);
 
                if (!streq(file, xs))
                        goto out;
@@ -1508,7 +1510,8 @@
                        aborted++;
 
                if (verbose)
-                       printf("-> %.*s\n", strchr(ret, '\n') - ret, ret);
+                       printf("-> %.*s\n",
+                              (int)(strchr(ret, '\n') - ret), ret);
 
                talloc_free(ret);
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] This fixes the "make check" feature of xenstore to properly compile with, Xen patchbot -unstable <=