Index: trunk/src/sh_hash.c
===================================================================
--- trunk/src/sh_hash.c	(revision 34)
+++ trunk/src/sh_hash.c	(revision 40)
@@ -1998,4 +1998,6 @@
   p.linkmode    = (UINT32) buf->linkmode;
   p.hardlinks   = (UINT32) buf->hardlinks;
+  p.dev   = (UINT64) buf->dev;
+  p.rdev  = (UINT64) buf->rdev;
   p.mode  = (UINT32) buf->mode;
   p.ino   = (UINT32) buf->ino;
@@ -2059,6 +2061,10 @@
 #endif
 
-#ifndef PRIi64
-#define PRIi64 "lld"
+#ifndef PRIu64
+#ifdef  HAVE_LONG_32
+#define PRIu64 "llu"
+#else
+#define PRIu64 "lu"
+#endif
 #endif
 
@@ -2072,8 +2078,8 @@
 #ifdef SH_USE_XML
   sl_snprintf(form_rval, 80, _("%s%s%s%s%s"), 
-	      _("size_old=\"%"), PRIi64, _("\" size_new=\"%"), PRIi64, "\" ");
+	      _("size_old=\"%"), PRIu64, _("\" size_new=\"%"), PRIu64, "\" ");
 #else
   sl_snprintf(form_rval, 80, _("%s%s%s%s%s"), 
-	      _("size_old=<%"), PRIi64, _(">, size_new=<%"), PRIi64, ">, ");
+	      _("size_old=<%"), PRIu64, _(">, size_new=<%"), PRIu64, ">, ");
 #endif
 
@@ -2124,7 +2130,7 @@
 
   if (is_new)
-    format = _("hardlinks_new=\"%ld\" ");
-  else
-    format = _("hardlinks_old=\"%ld\" ");
+    format = _("hardlinks_new=\"%lu\" ");
+  else
+    format = _("hardlinks_old=\"%lu\" ");
   sl_snprintf(tmp, SH_BUFSIZE, format,
 	      (unsigned long) theFile->hardlinks);
@@ -2133,7 +2139,7 @@
 
   if (is_new)
-    format = _("idevice_new=\"%ld\" ");
-  else
-    format = _("idevice_old=\"%ld\" ");
+    format = _("idevice_new=\"%lu\" ");
+  else
+    format = _("idevice_old=\"%lu\" ");
   sl_snprintf(tmp, SH_BUFSIZE, format, (unsigned long) theFile->rdev);
   sl_strlcat(msg, tmp, SH_BUFSIZE); 
@@ -2141,9 +2147,23 @@
 
   if (is_new)
-    format = _("inode_new=\"%ld\" ");
-  else
-    format = _("inode_old=\"%ld\" ");
+    format = _("inode_new=\"%lu\" ");
+  else
+    format = _("inode_old=\"%lu\" ");
   sl_snprintf(tmp, SH_BUFSIZE, format, (unsigned long) theFile->ino);
   sl_strlcat(msg, tmp, SH_BUFSIZE); 
+
+  /* 
+   * also report device for prelude
+   */
+#if defined(HAVE_LIBPRELUDE) && defined(HAVE_LIBPRELUDE_9)
+  if (is_new)
+    format = _("dev_new=\"%lu,%lu\" ");
+  else
+    format = _("dev_old=\"%lu,%lu\" ");
+  sl_snprintf(tmp, SH_BUFSIZE, format,		      
+	      (unsigned long) major(theFile->dev),
+	      (unsigned long) minor(theFile->dev));
+  sl_strlcat(msg, tmp, SH_BUFSIZE);
+#endif
 
 
@@ -2261,7 +2281,7 @@
 
   if (is_new)
-    format = _("hardlinks_new=<%ld>, ");
-  else
-    format = _("hardlinks_old=<%ld>, ");
+    format = _("hardlinks_new=<%lu>, ");
+  else
+    format = _("hardlinks_old=<%lu>, ");
   sl_snprintf(tmp, SH_BUFSIZE, format,
 	      (unsigned long) theFile->hardlinks);
@@ -2270,7 +2290,7 @@
 
   if (is_new)
-    format = _("idevice_new=<%ld>, ");
-  else
-    format = _("idevice_old=<%ld>, ");
+    format = _("idevice_new=<%lu>, ");
+  else
+    format = _("idevice_old=<%lu>, ");
   sl_snprintf(tmp, SH_BUFSIZE, format, (unsigned long) theFile->rdev);
   sl_strlcat(msg, tmp, SH_BUFSIZE); 
@@ -2278,10 +2298,24 @@
 
   if (is_new)
-    format = _("inode_new=<%ld>, ");
-  else
-    format = _("inode_old=<%ld>, ");
+    format = _("inode_new=<%lu>, ");
+  else
+    format = _("inode_old=<%lu>, ");
   sl_snprintf(tmp, SH_BUFSIZE, format, (unsigned long) theFile->ino);
   sl_strlcat(msg, tmp, SH_BUFSIZE); 
 
+
+  /* 
+   * also report device for prelude
+   */
+#if defined(HAVE_LIBPRELUDE) && defined(HAVE_LIBPRELUDE_9)
+  if (is_new)
+    format = _("dev_new=<%lu,%lu>, ");
+  else
+    format = _("dev_old=<%lu,%lu>, ");
+  sl_snprintf(tmp, SH_BUFSIZE, format,		      
+	      (unsigned long) major(theFile->dev),
+	      (unsigned long) minor(theFile->dev));
+  sl_strlcat(msg, tmp, SH_BUFSIZE);
+#endif
 
   if (is_new)
@@ -2729,7 +2763,7 @@
 	  sl_snprintf(tmp, SH_BUFSIZE, 
 #ifdef SH_USE_XML
-		      _("hardlinks_old=\"%ld\" hardlinks_new=\"%ld\" "),
-#else
-		      _("hardlinks_old=<%ld>, hardlinks_new=<%ld>, "),
+		      _("hardlinks_old=\"%lu\" hardlinks_new=\"%lu\" "),
+#else
+		      _("hardlinks_old=<%lu>, hardlinks_new=<%lu>, "),
 #endif
 		      (unsigned long) p->theFile.hardlinks, 
@@ -2746,7 +2780,7 @@
 	  sl_snprintf(tmp, SH_BUFSIZE,
 #ifdef SH_USE_XML 
-		      _("device_old=\"%ld,%ld\" device_new=\"%ld,%ld\" idevice_old=\"%ld\" idevice_new=\"%ld\" "),
-#else
-		      _("device_old=<%ld,%ld>, device_new=<%ld,%ld>, "),
+		      _("device_old=\"%lu,%lu\" device_new=\"%lu,%lu\" idevice_old=\"%lu\" idevice_new=\"%lu\" "),
+#else
+		      _("device_old=<%lu,%lu>, device_new=<%lu,%lu>, "),
 #endif
 		      (unsigned long) major(p->theFile.rdev), 
@@ -2770,7 +2804,7 @@
 	  sl_snprintf(tmp, SH_BUFSIZE,
 #ifdef SH_USE_XML 
-		      _("inode_old=\"%ld\" inode_new=\"%ld\" "),
-#else
-		      _("inode_old=<%ld>, inode_new=<%ld>, "),
+		      _("inode_old=\"%lu\" inode_new=\"%lu\" "),
+#else
+		      _("inode_old=<%lu>, inode_new=<%lu>, "),
 #endif
 		      (unsigned long) p->theFile.ino, 
@@ -2779,7 +2813,36 @@
 #ifdef REPLACE_OLD
 	  if (sh.flag.reportonce == S_TRUE && sh.flag.update == S_FALSE)
-	    p->theFile.ino = theFile->ino;
-#endif
-	}
+	    {
+	      p->theFile.ino = theFile->ino;
+	      p->theFile.dev = theFile->dev;
+	    }
+#endif
+	}
+
+
+      /* 
+       * also report device for prelude
+       */
+#if defined(HAVE_LIBPRELUDE) && defined(HAVE_LIBPRELUDE_9)
+      if ((modi_mask & MODI_INO) != 0)
+	{
+	  sl_snprintf(tmp, SH_BUFSIZE,
+#ifdef SH_USE_XML 
+		      _("dev_old=\"%lu,%lu\" dev_new=\"%lu,%lu\" "),
+#else
+		      _("dev_old=<%lu,%lu>, dev_new=<%lu,%lu>, "),
+#endif
+		      (unsigned long) major(p->theFile.dev),
+		      (unsigned long) minor(p->theFile.dev),
+		      (unsigned long) major(theFile->dev),
+		      (unsigned long) minor(theFile->dev)
+		      );
+	  sl_strlcat(msg, tmp, SH_BUFSIZE); 
+#ifdef REPLACE_OLD
+	  if (sh.flag.reportonce == S_TRUE && sh.flag.update == S_FALSE)
+	    p->theFile.dev = theFile->dev;
+#endif
+	}
+#endif
 
       if (   ((modi_mask & MODI_USR) != 0)
@@ -2790,12 +2853,12 @@
 	{
 #ifdef SH_USE_XML
-	  sl_snprintf(tmp, SH_BUFSIZE, _("owner_old=\"%s\" owner_new=\"%s\" iowner_old=\"%ld\" iowner_new=\"%ld\" "),
-#else
-	  sl_snprintf(tmp, SH_BUFSIZE, _("owner_old=<%s>, owner_new=<%s>, "),
-#endif
-		      p->theFile.c_owner, theFile->c_owner
-#ifdef SH_USE_XML
-		      , (long) p->theFile.owner, (long) theFile->owner
-#endif
+	  sl_snprintf(tmp, SH_BUFSIZE, 
+		      _("owner_old=\"%s\" owner_new=\"%s\" iowner_old=\"%ld\" iowner_new=\"%ld\" "),
+#else
+	  sl_snprintf(tmp, SH_BUFSIZE, 
+		      _("owner_old=<%s>, owner_new=<%s>, iowner_old=<%ld>, iowner_new=<%ld>, "),
+#endif
+		      p->theFile.c_owner, theFile->c_owner, 
+		      (long) p->theFile.owner, (long) theFile->owner
 		      );
 	  sl_strlcat(msg, tmp, SH_BUFSIZE); 
@@ -2818,10 +2881,13 @@
 	{
 #ifdef SH_USE_XML
-	  sl_snprintf(tmp, SH_BUFSIZE, _("group_old=\"%s\" group_new=\"%s\" igroup_old=\"%ld\" igroup_new=\"%ld\" "),
+	  sl_snprintf(tmp, SH_BUFSIZE, 
+		      _("group_old=\"%s\" group_new=\"%s\" igroup_old=\"%ld\" igroup_new=\"%ld\" "),
 		      p->theFile.c_group, theFile->c_group,
 		      (long) p->theFile.group, (long) theFile->group);
 #else
-	  sl_snprintf(tmp, SH_BUFSIZE, _("group_old=<%s>, group_new=<%s>, "),
-		      p->theFile.c_group, theFile->c_group);
+	  sl_snprintf(tmp, SH_BUFSIZE, 
+		      _("group_old=<%s>, group_new=<%s>, igroup_old=<%ld>, igroup_new=<%ld>, "),
+		      p->theFile.c_group, theFile->c_group,
+		      (long) p->theFile.group, (long) theFile->group);
 #endif
 
@@ -3153,6 +3219,6 @@
   if (ListWithDelimiter == S_TRUE)
     {
-      printf(_("%7ld, %10s, %5d, %12s, %5d, %3d, %-8s, %5d, %-8s, %5d, "),
-	     (unsigned long) p->theFile.ino,
+      printf(_("%7ld, %7ld, %10s, %5d, %12s, %5d, %3d, %-8s, %5d, %-8s, %5d, "),
+	     (unsigned long) p->theFile.ino, (unsigned long) p->theFile.dev,
 	     p->theFile.c_mode, (int) p->theFile.mode,
 	     p->theFile.c_attributes, (int) p->theFile.attributes,
@@ -3163,6 +3229,6 @@
   else
     {
-      printf(_("%7ld %10s %5d %12s %5d %3d %-8s %5d %-8s %5d "),
-	     (unsigned long) p->theFile.ino,
+      printf(_("%7ld %7ld %10s %5d %12s %5d %3d %-8s %5d %-8s %5d "),
+	     (unsigned long) p->theFile.ino, (unsigned long) p->theFile.dev,
 	     p->theFile.c_mode, (int) p->theFile.mode,
 	     p->theFile.c_attributes, (int) p->theFile.attributes,
@@ -3173,7 +3239,7 @@
 
   if ('c' == p->theFile.c_mode[0] || 'b' == p->theFile.c_mode[0])
-    sl_snprintf(str, 80, "%"PRIi64, p->theFile.rdev);
-  else
-    sl_snprintf(str, 80, "%"PRIi64, p->theFile.size);
+    sl_snprintf(str, 80, "%"PRIu64, p->theFile.rdev);
+  else
+    sl_snprintf(str, 80, "%"PRIu64, p->theFile.size);
 
   printf( _(" %8s"), str);
