Hi

This little patch adds 64-bit inode support for stat utility (my system
has ino_t and st_blocks 64-bit).

As there are already a lot of fields with uintmax_t type and PRIuMAX
format, I think the patch won't cause any side effects.

Mikulas

--- STAT.C_     2004-10-23 21:12:11.000000000 +0100
+++ STAT.C      2004-10-23 21:17:27.000000000 +0100
@@ -459,8 +459,8 @@
       printf (pformat, (int) statbuf->st_dev);
       break;
     case 'i':
-      strcat (pformat, "d");
-      printf (pformat, (int) statbuf->st_ino);
+      strcat (pformat, PRIuMAX);
+      printf (pformat, (uintmax_t) statbuf->st_ino);
       break;
     case 'a':
       strcat (pformat, "o");
@@ -519,8 +519,8 @@
       printf (pformat, (unsigned int) ST_NBLOCKSIZE);
       break;
     case 'b':
-      strcat (pformat, "u");
-      printf (pformat, (unsigned int) ST_NBLOCKS (*statbuf));
+      strcat (pformat, PRIuMAX);
+      printf (pformat, (uintmax_t) ST_NBLOCKS (*statbuf));
       break;
     case 'o':
       strcat (pformat, "d");



_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to