mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] linux/types.h: add sector_t and blkcnt_t types
@ 2016-02-11 14:53 yegorslists
  2016-02-11 14:53 ` [PATCH 2/2] linux/fs.h: add types and routines needed for SquashFS yegorslists
  2016-02-12  7:39 ` [PATCH 1/2] linux/types.h: add sector_t and blkcnt_t types Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: yegorslists @ 2016-02-11 14:53 UTC (permalink / raw)
  To: barebox

From: Yegor Yefremov <yegorslists@googlemail.com>

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
 include/linux/types.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/include/linux/types.h b/include/linux/types.h
index 9f8eb67..f64ec4a 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -157,6 +157,22 @@ typedef __u32 __bitwise __wsum;
 #define __aligned_be64 __be64 __attribute__((aligned(8)))
 #define __aligned_le64 __le64 __attribute__((aligned(8)))
 
+/**
+ * The type used for indexing onto a disc or disc partition.
+ *
+ * Linux always considers sectors to be 512 bytes long independently
+ * of the devices real block size.
+ *
+ * blkcnt_t is the type of the inode's block count.
+ */
+#ifdef CONFIG_LBDAF
+typedef u64 sector_t;
+typedef u64 blkcnt_t;
+#else
+typedef unsigned long sector_t;
+typedef unsigned long blkcnt_t;
+#endif
+
 /*
  * The type of an index into the pagecache.
  */
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-12  7:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-11 14:53 [PATCH 1/2] linux/types.h: add sector_t and blkcnt_t types yegorslists
2016-02-11 14:53 ` [PATCH 2/2] linux/fs.h: add types and routines needed for SquashFS yegorslists
2016-02-12  7:39 ` [PATCH 1/2] linux/types.h: add sector_t and blkcnt_t types Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox