Define SECTOR_FMT to print sector_t in proper format
Signed-off-by: Dave Kleikamp <[email protected]>
Acked-by: Andreas Dilger <[email protected]>
---
linux-2.6.17-ming/include/asm-h8300/types.h | 1 +
linux-2.6.17-ming/include/asm-i386/types.h | 1 +
linux-2.6.17-ming/include/asm-mips/types.h | 5 +++++
linux-2.6.17-ming/include/asm-powerpc/types.h | 5 +++++
linux-2.6.17-ming/include/asm-s390/types.h | 5 +++++
linux-2.6.17-ming/include/asm-sh/types.h | 1 +
linux-2.6.17-ming/include/asm-x86_64/types.h | 1 +
linux-2.6.17-ming/include/linux/types.h | 1 +
8 files changed, 20 insertions(+)
diff -puN include/asm-h8300/types.h~sector_fmt include/asm-h8300/types.h
--- linux-2.6.17/include/asm-h8300/types.h~sector_fmt 2006-06-28 16:46:28.523183099 -0700
+++ linux-2.6.17-ming/include/asm-h8300/types.h 2006-06-28 16:46:28.552179772 -0700
@@ -57,6 +57,7 @@ typedef u32 dma_addr_t;
#define HAVE_SECTOR_T
typedef u64 sector_t;
+#define SECTOR_FMT "%llu"
#define HAVE_BLKCNT_T
typedef u64 blkcnt_t;
diff -puN include/asm-i386/types.h~sector_fmt include/asm-i386/types.h
--- linux-2.6.17/include/asm-i386/types.h~sector_fmt 2006-06-28 16:46:28.526182755 -0700
+++ linux-2.6.17-ming/include/asm-i386/types.h 2006-06-28 16:46:28.553179658 -0700
@@ -59,6 +59,7 @@ typedef u64 dma64_addr_t;
#ifdef CONFIG_LBD
typedef u64 sector_t;
+#define SECTOR_FMT "%llu"
#define HAVE_SECTOR_T
#endif
diff -puN include/asm-mips/types.h~sector_fmt include/asm-mips/types.h
--- linux-2.6.17/include/asm-mips/types.h~sector_fmt 2006-06-28 16:46:28.530182296 -0700
+++ linux-2.6.17-ming/include/asm-mips/types.h 2006-06-28 16:46:28.554179543 -0700
@@ -95,6 +95,11 @@ typedef unsigned long phys_t;
#ifdef CONFIG_LBD
typedef u64 sector_t;
+#if (_MIPS_SZLONG == 64)
+#define SECTOR_FMT "%lu"
+#else
+#define SECTOR_FMT "%llu"
+#endif
#define HAVE_SECTOR_T
#endif
diff -puN include/asm-powerpc/types.h~sector_fmt include/asm-powerpc/types.h
--- linux-2.6.17/include/asm-powerpc/types.h~sector_fmt 2006-06-28 16:46:28.534181837 -0700
+++ linux-2.6.17-ming/include/asm-powerpc/types.h 2006-06-28 16:46:28.554179543 -0700
@@ -99,6 +99,11 @@ typedef struct {
#ifdef CONFIG_LBD
typedef u64 sector_t;
+#ifdef __powerpc64__
+#define SECTOR_FMT "%lu"
+#else
+#define SECTOR_FMT "%llu"
+#endif
#define HAVE_SECTOR_T
#endif
diff -puN include/asm-s390/types.h~sector_fmt include/asm-s390/types.h
--- linux-2.6.17/include/asm-s390/types.h~sector_fmt 2006-06-28 16:46:28.537181493 -0700
+++ linux-2.6.17-ming/include/asm-s390/types.h 2006-06-28 16:46:28.555179428 -0700
@@ -89,6 +89,11 @@ typedef union {
#ifdef CONFIG_LBD
typedef u64 sector_t;
+#ifndef __s390x__
+#define SECTOR_FMT "%llu"
+#else
+#define SECTOR_FMT "%lu"
+#endif
#define HAVE_SECTOR_T
#endif
diff -puN include/asm-sh/types.h~sector_fmt include/asm-sh/types.h
--- linux-2.6.17/include/asm-sh/types.h~sector_fmt 2006-06-28 16:46:28.540181149 -0700
+++ linux-2.6.17-ming/include/asm-sh/types.h 2006-06-28 16:46:28.555179428 -0700
@@ -54,6 +54,7 @@ typedef u32 dma_addr_t;
#ifdef CONFIG_LBD
typedef u64 sector_t;
+#define SECTOR_FMT "%llu"
#define HAVE_SECTOR_T
#endif
diff -puN include/asm-x86_64/types.h~sector_fmt include/asm-x86_64/types.h
--- linux-2.6.17/include/asm-x86_64/types.h~sector_fmt 2006-06-28 16:46:28.543180805 -0700
+++ linux-2.6.17-ming/include/asm-x86_64/types.h 2006-06-28 16:46:28.556179313 -0700
@@ -49,6 +49,7 @@ typedef u64 dma64_addr_t;
typedef u64 dma_addr_t;
typedef u64 sector_t;
+#define SECTOR_FMT "%llu"
#define HAVE_SECTOR_T
#endif /* __ASSEMBLY__ */
diff -puN include/linux/types.h~sector_fmt include/linux/types.h
--- linux-2.6.17/include/linux/types.h~sector_fmt 2006-06-28 16:46:28.549180116 -0700
+++ linux-2.6.17-ming/include/linux/types.h 2006-06-28 16:46:28.557179199 -0700
@@ -134,6 +134,7 @@ typedef __s64 int64_t;
*/
#ifndef HAVE_SECTOR_T
typedef unsigned long sector_t;
+#define SECTOR_FMT "%lu"
#endif
#ifndef HAVE_BLKCNT_T
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]