Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/am-utils/dist/amd fix 32 bit build.



details:   https://anonhg.NetBSD.org/src/rev/bef4c3a26628
branches:  trunk
changeset: 335633:bef4c3a26628
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jan 18 16:37:05 2015 +0000

description:
fix 32 bit build.

diffstat:

 external/bsd/am-utils/dist/amd/readdir.c |  31 ++++++++++++++++++-------------
 1 files changed, 18 insertions(+), 13 deletions(-)

diffs (93 lines):

diff -r 932a27ad5149 -r bef4c3a26628 external/bsd/am-utils/dist/amd/readdir.c
--- a/external/bsd/am-utils/dist/amd/readdir.c  Sun Jan 18 16:27:36 2015 +0000
+++ b/external/bsd/am-utils/dist/amd/readdir.c  Sun Jan 18 16:37:05 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: readdir.c,v 1.3 2015/01/17 17:46:31 christos Exp $     */
+/*     $NetBSD: readdir.c,v 1.4 2015/01/18 16:37:05 christos Exp $     */
 
 /*
  * Copyright (c) 1997-2014 Erez Zadok
@@ -636,7 +636,7 @@
 
 /* This one is called only if map is browsable */
 static int
-amfs_readdir3_browsable(am_node *mp, am_cookie3 cookie,
+amfs_readdir3_browsable(am_node *mp, voidp cookie,
                        am_dirlist3 *dp, am_entry3 *ep, u_int count,
                        int fully_browsable)
 {
@@ -648,7 +648,8 @@
   dp->eof = FALSE;             /* assume readdir not done */
 
   if (amuDebug(D_READDIR))
-    plog(XLOG_DEBUG, "amfs_readdir3_browsable gen=%lu, count=%d", gen, count);
+    plog(XLOG_DEBUG, "%s: gen=%llu, count=%d", __func__,
+       (unsigned long long)gen, count);
 
   if (gen == 0) {
     size_t needed = needroom3();
@@ -733,8 +734,9 @@
       for (j = 0, ne = te; ne; ne = ne->ne_nextentry)
        plog(XLOG_DEBUG, "gen2 key %4d \"%s\"", j++, ne->name);
       for (j = 0, ne = ep; ne; ne = ne->ne_nextentry) {
-       plog(XLOG_DEBUG, "gen2+ key %4d \"%s\" fi=%lu ck=%lu",
-            j++, ne->name, ne->fileid, ne->cookie);
+       plog(XLOG_DEBUG, "gen2+ key %4d \"%s\" fi=%llu ck=%llu",
+            j++, ne->name, (unsigned long long)ne->fileid,
+            (unsigned long long)ne->cookie);
       }
       plog(XLOG_DEBUG, "EOF is %d", dp->eof);
     }
@@ -794,14 +796,15 @@
 }
 
 static int
-amfs_readdir3(am_node *mp, am_cookie3 cookie,
+amfs_readdir3(am_node *mp, voidp cookie,
              am_dirlist3 *dp, am_entry3 *ep, u_int count)
 {
   uint64 gen = *(uint64 *) cookie;
   am_node *xp;
 
   if (amuDebug(D_READDIR))
-    plog(XLOG_DEBUG, "amfs_readdir3 gen=%lu, count=%d", gen, count);
+    plog(XLOG_DEBUG, "%s: gen=%llu, count=%d", __func__,
+       (unsigned long long)gen, count);
 
   dp->eof = FALSE;             /* assume readdir not done */
 
@@ -848,8 +851,9 @@
       am_entry3 *ne;
       int j;
       for (j = 0, ne = ep; ne; ne = ne->nextentry) {
-       plog(XLOG_DEBUG, "gen1 key %4d \"%s\" fi=%lu ck=%lu",
-            j++, ne->name, ne->fileid, ne->cookie);
+       plog(XLOG_DEBUG, "gen1 key %4d \"%s\" fi=%llu ck=%llu",
+            j++, ne->name, (unsigned long long)ne->fileid,
+            (unsigned long long)ne->cookie);
       }
     }
     return 0;
@@ -908,8 +912,9 @@
       am_entry3 *ne;
       int j;
       for (j = 0, ne = ep; ne; ne = ne->nextentry) {
-       plog(XLOG_DEBUG, "gen2 key %4d \"%s\" fi=%lu ck=%lu",
-            j++, ne->name, ne->fileid, ne->cookie);
+       plog(XLOG_DEBUG, "gen2 key %4d \"%s\" fi=%llu ck=%llu",
+            j++, ne->name, (unsigned long long)ne->fileid,
+            (unsigned long long)ne->cookie);
       }
     }
     return 0;
@@ -945,8 +950,8 @@
       return amfs_readdir(mp, cookie, dp, ep, count);
   } else {
     if (browsable)
-      return amfs_readdir3_browsable(mp, (am_cookie3) cookie, dp, ep, count, full);
+      return amfs_readdir3_browsable(mp, cookie, dp, ep, count, full);
     else
-      return amfs_readdir3(mp, (am_cookie3) cookie, dp, ep, count);
+      return amfs_readdir3(mp, cookie, dp, ep, count);
   }
 }



Home | Main Index | Thread Index | Old Index