[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
64-bit inode numbers and block counts
From: |
Mikulas Patocka |
Subject: |
64-bit inode numbers and block counts |
Date: |
Sat, 23 Oct 2004 21:29:18 +0200 (CEST) |
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");
- 64-bit inode numbers and block counts,
Mikulas Patocka <=