Commit 3136f2b1 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] prepare for 32-bit dev_t: misc cleanups

parent 2d06a9e3
...@@ -28,9 +28,21 @@ ...@@ -28,9 +28,21 @@
#include "conv.h" #include "conv.h"
#define R4_DEV(DEV) ((DEV & 0xff) | ((DEV & 0xff00) << 10)) static inline u32 R4_DEV(dev_t DEV)
#define R4_MAJOR(DEV) (((DEV) >> 18) & 0x3fff) {
#define R4_MINOR(DEV) ((DEV) & 0x3ffff) return MINOR(DEV) | (MAJOR(DEV) << 18);
}
static inline unsigned R4_MAJOR(u32 DEV)
{
return (DEV >> 18) & 0x3fff;
}
static inline unsigned R4_MINOR(u32 DEV)
{
return DEV & 0x3ffff;
}
#define R3_VERSION 1 #define R3_VERSION 1
#define R4_VERSION 2 #define R4_VERSION 2
......
...@@ -200,7 +200,7 @@ static int bfs_statfs(struct super_block *s, struct kstatfs *buf) ...@@ -200,7 +200,7 @@ static int bfs_statfs(struct super_block *s, struct kstatfs *buf)
buf->f_bfree = buf->f_bavail = info->si_freeb; buf->f_bfree = buf->f_bavail = info->si_freeb;
buf->f_files = info->si_lasti + 1 - BFS_ROOT_INO; buf->f_files = info->si_lasti + 1 - BFS_ROOT_INO;
buf->f_ffree = info->si_freei; buf->f_ffree = info->si_freei;
buf->f_fsid.val[0] = s->s_dev; buf->f_fsid.val[0] = old_encode_dev(s->s_dev);
buf->f_namelen = BFS_NAMELEN; buf->f_namelen = BFS_NAMELEN;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment