Commit 18d0c6d3 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] prepare for 32-bit dev_t: stat()

	Added old_encode_dev() to assorted stat() variants.
	Fixed bug in s390 emulation on s390x: stat64() should never truncate
UID and GID.
	Ditto for i386 emulation on x86_64.
	Replaced dev_t in various struct stat with explicit integer type.
	Replaced __kernel_dev_t with __old_kernel_dev_t in dm-ioctl-v1.h
	Now we are free to change dev_t in any way we want - on all boundaries
we have explicit conversions.
	Took __kernel_dev_t definition to linux/types.h and changed it with
__u16.  We are ready to proceed to 32bit now.
parent 66c937f3
...@@ -186,13 +186,13 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat *ubuf) ...@@ -186,13 +186,13 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat *ubuf)
if (clear_user(ubuf, sizeof(*ubuf))) if (clear_user(ubuf, sizeof(*ubuf)))
return -EFAULT; return -EFAULT;
err = __put_user(stat->dev, &ubuf->st_dev); err = __put_user(old_encode_dev(stat->dev), &ubuf->st_dev);
err |= __put_user(stat->ino, &ubuf->st_ino); err |= __put_user(stat->ino, &ubuf->st_ino);
err |= __put_user(stat->mode, &ubuf->st_mode); err |= __put_user(stat->mode, &ubuf->st_mode);
err |= __put_user(stat->nlink, &ubuf->st_nlink); err |= __put_user(stat->nlink, &ubuf->st_nlink);
err |= __put_user(high2lowuid(stat->uid), &ubuf->st_uid); err |= __put_user(high2lowuid(stat->uid), &ubuf->st_uid);
err |= __put_user(high2lowgid(stat->gid), &ubuf->st_gid); err |= __put_user(high2lowgid(stat->gid), &ubuf->st_gid);
err |= __put_user(stat->rdev, &ubuf->st_rdev); err |= __put_user(old_encode_dev(stat->rdev), &ubuf->st_rdev);
err |= __put_user(stat->size, &ubuf->st_size); err |= __put_user(stat->size, &ubuf->st_size);
err |= __put_user(stat->atime.tv_sec, &ubuf->st_atime); err |= __put_user(stat->atime.tv_sec, &ubuf->st_atime);
err |= __put_user(stat->atime.tv_nsec, &ubuf->st_atime_nsec); err |= __put_user(stat->atime.tv_nsec, &ubuf->st_atime_nsec);
...@@ -2488,7 +2488,7 @@ putstat64 (struct stat64 *ubuf, struct kstat *kbuf) ...@@ -2488,7 +2488,7 @@ putstat64 (struct stat64 *ubuf, struct kstat *kbuf)
if (clear_user(ubuf, sizeof(*ubuf))) if (clear_user(ubuf, sizeof(*ubuf)))
return -EFAULT; return -EFAULT;
err = __put_user(kbuf->dev, &ubuf->st_dev); err = __put_user(old_encode_dev(kbuf->dev), &ubuf->st_dev);
err |= __put_user(kbuf->ino, &ubuf->__st_ino); err |= __put_user(kbuf->ino, &ubuf->__st_ino);
err |= __put_user(kbuf->ino, &ubuf->st_ino_lo); err |= __put_user(kbuf->ino, &ubuf->st_ino_lo);
err |= __put_user(kbuf->ino >> 32, &ubuf->st_ino_hi); err |= __put_user(kbuf->ino >> 32, &ubuf->st_ino_hi);
...@@ -2496,7 +2496,7 @@ putstat64 (struct stat64 *ubuf, struct kstat *kbuf) ...@@ -2496,7 +2496,7 @@ putstat64 (struct stat64 *ubuf, struct kstat *kbuf)
err |= __put_user(kbuf->nlink, &ubuf->st_nlink); err |= __put_user(kbuf->nlink, &ubuf->st_nlink);
err |= __put_user(kbuf->uid, &ubuf->st_uid); err |= __put_user(kbuf->uid, &ubuf->st_uid);
err |= __put_user(kbuf->gid, &ubuf->st_gid); err |= __put_user(kbuf->gid, &ubuf->st_gid);
err |= __put_user(kbuf->rdev, &ubuf->st_rdev); err |= __put_user(old_encode_dev(kbuf->rdev), &ubuf->st_rdev);
err |= __put_user(kbuf->size, &ubuf->st_size_lo); err |= __put_user(kbuf->size, &ubuf->st_size_lo);
err |= __put_user((kbuf->size >> 32), &ubuf->st_size_hi); err |= __put_user((kbuf->size >> 32), &ubuf->st_size_hi);
err |= __put_user(kbuf->atime.tv_sec, &ubuf->st_atime); err |= __put_user(kbuf->atime.tv_sec, &ubuf->st_atime);
......
...@@ -72,13 +72,13 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat *statbuf) ...@@ -72,13 +72,13 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat *statbuf)
struct compat_stat tmp; struct compat_stat tmp;
memset(&tmp, 0, sizeof(tmp)); memset(&tmp, 0, sizeof(tmp));
tmp.st_dev = stat->dev; tmp.st_dev = old_encode_dev(stat->dev);
tmp.st_ino = stat->ino; tmp.st_ino = stat->ino;
tmp.st_mode = stat->mode; tmp.st_mode = stat->mode;
tmp.st_nlink = stat->nlink; tmp.st_nlink = stat->nlink;
SET_STAT_UID(tmp, stat->uid); SET_STAT_UID(tmp, stat->uid);
SET_STAT_GID(tmp, stat->gid); SET_STAT_GID(tmp, stat->gid);
tmp.st_rdev = stat->rdev; tmp.st_rdev = old_encode_dev(stat->rdev);
tmp.st_size = stat->size; tmp.st_size = stat->size;
tmp.st_atime = stat->atime.tv_sec; tmp.st_atime = stat->atime.tv_sec;
tmp.st_mtime = stat->mtime.tv_sec; tmp.st_mtime = stat->mtime.tv_sec;
......
...@@ -124,13 +124,13 @@ static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf) ...@@ -124,13 +124,13 @@ static int cp_hpux_stat(struct kstat *stat, struct hpux_stat64 *statbuf)
struct hpux_stat64 tmp; struct hpux_stat64 tmp;
memset(&tmp, 0, sizeof(tmp)); memset(&tmp, 0, sizeof(tmp));
tmp.st_dev = stat->dev; tmp.st_dev = old_encode_dev(stat->dev);
tmp.st_ino = stat->ino; tmp.st_ino = stat->ino;
tmp.st_mode = stat->mode; tmp.st_mode = stat->mode;
tmp.st_nlink = stat->nlink; tmp.st_nlink = stat->nlink;
tmp.st_uid = stat->uid; tmp.st_uid = stat->uid;
tmp.st_gid = stat->gid; tmp.st_gid = stat->gid;
tmp.st_rdev = stat->rdev; tmp.st_rdev = old_encode_dev(stat->rdev);
tmp.st_size = stat->size; tmp.st_size = stat->size;
tmp.st_atime = stat->atime.tv_sec; tmp.st_atime = stat->atime.tv_sec;
tmp.st_mtime = stat->mtime.tv_sec; tmp.st_mtime = stat->mtime.tv_sec;
......
...@@ -442,13 +442,13 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat *statbuf) ...@@ -442,13 +442,13 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat *statbuf)
if (stat->size > MAX_NON_LFS) if (stat->size > MAX_NON_LFS)
return -EOVERFLOW; return -EOVERFLOW;
err = put_user(stat->dev, &statbuf->st_dev); err = put_user(old_encode_dev(stat->dev), &statbuf->st_dev);
err |= put_user(stat->ino, &statbuf->st_ino); err |= put_user(stat->ino, &statbuf->st_ino);
err |= put_user(stat->mode, &statbuf->st_mode); err |= put_user(stat->mode, &statbuf->st_mode);
err |= put_user(stat->nlink, &statbuf->st_nlink); err |= put_user(stat->nlink, &statbuf->st_nlink);
err |= put_user(0, &statbuf->st_reserved1); err |= put_user(0, &statbuf->st_reserved1);
err |= put_user(0, &statbuf->st_reserved2); err |= put_user(0, &statbuf->st_reserved2);
err |= put_user(stat->rdev, &statbuf->st_rdev); err |= put_user(old_encode_dev(stat->rdev), &statbuf->st_rdev);
err |= put_user(stat->size, &statbuf->st_size); err |= put_user(stat->size, &statbuf->st_size);
err |= put_user(stat->atime.tv_sec, &statbuf->st_atime); err |= put_user(stat->atime.tv_sec, &statbuf->st_atime);
err |= put_user(stat->atime.tv_nsec, &statbuf->st_atime_nsec); err |= put_user(stat->atime.tv_nsec, &statbuf->st_atime_nsec);
......
...@@ -751,13 +751,13 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat *statbuf) ...@@ -751,13 +751,13 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat *statbuf)
if (stat->size > MAX_NON_LFS) if (stat->size > MAX_NON_LFS)
return -EOVERFLOW; return -EOVERFLOW;
err = put_user(stat->dev, &statbuf->st_dev); err = put_user(old_encode_dev(stat->dev), &statbuf->st_dev);
err |= put_user(stat->ino, &statbuf->st_ino); err |= put_user(stat->ino, &statbuf->st_ino);
err |= put_user(stat->mode, &statbuf->st_mode); err |= put_user(stat->mode, &statbuf->st_mode);
err |= put_user(stat->nlink, &statbuf->st_nlink); err |= put_user(stat->nlink, &statbuf->st_nlink);
err |= put_user(stat->uid, &statbuf->st_uid); err |= put_user(stat->uid, &statbuf->st_uid);
err |= put_user(stat->gid, &statbuf->st_gid); err |= put_user(stat->gid, &statbuf->st_gid);
err |= put_user(stat->rdev, &statbuf->st_rdev); err |= put_user(old_encode_dev(stat->rdev), &statbuf->st_rdev);
err |= put_user(stat->size, &statbuf->st_size); err |= put_user(stat->size, &statbuf->st_size);
err |= put_user(stat->atime.tv_sec, &statbuf->st_atime); err |= put_user(stat->atime.tv_sec, &statbuf->st_atime);
err |= put_user(0, &statbuf->__unused1); err |= put_user(0, &statbuf->__unused1);
......
...@@ -1316,13 +1316,13 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat *statbuf) ...@@ -1316,13 +1316,13 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat *statbuf)
{ {
int err; int err;
err = put_user(stat->dev, &statbuf->st_dev); err = put_user(old_encode_dev(stat->dev), &statbuf->st_dev);
err |= put_user(stat->ino, &statbuf->st_ino); err |= put_user(stat->ino, &statbuf->st_ino);
err |= put_user(stat->mode, &statbuf->st_mode); err |= put_user(stat->mode, &statbuf->st_mode);
err |= put_user(stat->nlink, &statbuf->st_nlink); err |= put_user(stat->nlink, &statbuf->st_nlink);
err |= put_user(high2lowuid(stat->uid), &statbuf->st_uid); err |= put_user(high2lowuid(stat->uid), &statbuf->st_uid);
err |= put_user(high2lowgid(stat->gid), &statbuf->st_gid); err |= put_user(high2lowgid(stat->gid), &statbuf->st_gid);
err |= put_user(stat->rdev, &statbuf->st_rdev); err |= put_user(old_encode_dev(stat->rdev), &statbuf->st_rdev);
err |= put_user(stat->size, &statbuf->st_size); err |= put_user(stat->size, &statbuf->st_size);
err |= put_user(stat->atime.tv_sec, &statbuf->st_atime); err |= put_user(stat->atime.tv_sec, &statbuf->st_atime);
err |= put_user(stat->atime.tv_nsec, &statbuf->st_atime_nsec); err |= put_user(stat->atime.tv_nsec, &statbuf->st_atime_nsec);
...@@ -2543,8 +2543,7 @@ extern asmlinkage long sys32_sysctl(struct __sysctl_args32 *args) ...@@ -2543,8 +2543,7 @@ extern asmlinkage long sys32_sysctl(struct __sysctl_args32 *args)
} }
struct stat64_emu31 { struct stat64_emu31 {
unsigned char __pad0[6]; unsigned long long st_dev;
unsigned short st_dev;
unsigned int __pad1; unsigned int __pad1;
#define STAT64_HAS_BROKEN_ST_INO 1 #define STAT64_HAS_BROKEN_ST_INO 1
u32 __st_ino; u32 __st_ino;
...@@ -2552,8 +2551,7 @@ struct stat64_emu31 { ...@@ -2552,8 +2551,7 @@ struct stat64_emu31 {
unsigned int st_nlink; unsigned int st_nlink;
u32 st_uid; u32 st_uid;
u32 st_gid; u32 st_gid;
unsigned char __pad2[6]; unsigned long long st_rdev;
unsigned short st_rdev;
unsigned int __pad3; unsigned int __pad3;
long st_size; long st_size;
u32 st_blksize; u32 st_blksize;
...@@ -2569,93 +2567,55 @@ struct stat64_emu31 { ...@@ -2569,93 +2567,55 @@ struct stat64_emu31 {
unsigned long st_ino; unsigned long st_ino;
}; };
static inline int static int cp_stat64(struct stat64_emu31 *ubuf, struct kstat *stat)
putstat64 (struct stat64_emu31 *ubuf, struct stat *kbuf)
{ {
struct stat64_emu31 tmp; struct stat64_emu31 tmp;
memset(&tmp, 0, sizeof(tmp));
tmp.st_dev = (unsigned short)kbuf->st_dev; memset(&tmp, 0, sizeof(tmp));
tmp.st_ino = kbuf->st_ino;
tmp.__st_ino = (u32)kbuf->st_ino;
tmp.st_mode = kbuf->st_mode;
tmp.st_nlink = (unsigned int)kbuf->st_nlink;
tmp.st_uid = kbuf->st_uid;
tmp.st_gid = kbuf->st_gid;
tmp.st_rdev = (unsigned short)kbuf->st_rdev;
tmp.st_size = kbuf->st_size;
tmp.st_blksize = (u32)kbuf->st_blksize;
tmp.st_blocks = (u32)kbuf->st_blocks;
tmp.st_atime = (u32)kbuf->st_atime;
tmp.st_mtime = (u32)kbuf->st_mtime;
tmp.st_ctime = (u32)kbuf->st_ctime;
return copy_to_user(ubuf,&tmp,sizeof(tmp)) ? -EFAULT : 0; tmp.st_dev = old_encode_dev(stat->dev);
} tmp.st_ino = stat->ino;
tmp.__st_ino = (u32)stat->ino;
tmp.st_mode = stat->mode;
tmp.st_nlink = (unsigned int)stat->nlink;
tmp.uid = stat->uid;
tmp.gid = stat->gid;
tmp.st_rdev = old_encode_dev(stat->rdev);
tmp.st_size = stat->st_size;
tmp.st_blksize = (u32)stat->blksize;
tmp.st_blocks = (u32)stat->blocks;
tmp.st_atime = (u32)stat->atime.tv_sec;
tmp.st_mtime = (u32)stat->mtime.tv_sec;
tmp.st_ctime = (u32)stat->ctime.tv_sec;
extern asmlinkage long sys_newstat(char * filename, struct stat * statbuf); return copy_to_user(ubuf,&tmp,sizeof(tmp)) ? -EFAULT : 0;
}
asmlinkage long sys32_stat64(char * filename, struct stat64_emu31 * statbuf, long flags) asmlinkage long sys32_stat64(char * filename, struct stat64_emu31 * statbuf, long flags)
{ {
int ret; struct kstat stat;
struct stat s; int ret = vfs_stat(filename, &stat);
char * tmp; if (!ret)
int err; ret = cp_stat64(statbuf, &stat);
mm_segment_t old_fs = get_fs(); return ret;
tmp = getname(filename);
err = PTR_ERR(tmp);
if (IS_ERR(tmp))
return err;
set_fs (KERNEL_DS);
ret = sys_newstat(tmp, &s);
set_fs (old_fs);
putname(tmp);
if (putstat64 (statbuf, &s))
return -EFAULT;
return ret;
} }
extern asmlinkage long sys_newlstat(char * filename, struct stat * statbuf);
asmlinkage long sys32_lstat64(char * filename, struct stat64_emu31 * statbuf, long flags) asmlinkage long sys32_lstat64(char * filename, struct stat64_emu31 * statbuf, long flags)
{ {
int ret; struct kstat stat;
struct stat s; int ret = vfs_lstat(filename, &stat);
char * tmp; if (!ret)
int err; ret = cp_stat64(statbuf, &stat);
mm_segment_t old_fs = get_fs(); return ret;
tmp = getname(filename);
err = PTR_ERR(tmp);
if (IS_ERR(tmp))
return err;
set_fs (KERNEL_DS);
ret = sys_newlstat(tmp, &s);
set_fs (old_fs);
putname(tmp);
if (putstat64 (statbuf, &s))
return -EFAULT;
return ret;
} }
extern asmlinkage long sys_newfstat(unsigned int fd, struct stat * statbuf);
asmlinkage long sys32_fstat64(unsigned long fd, struct stat64_emu31 * statbuf, long flags) asmlinkage long sys32_fstat64(unsigned long fd, struct stat64_emu31 * statbuf, long flags)
{ {
int ret; struct kstat stat;
struct stat s; int ret = vfs_fstat(fd, &stat);
mm_segment_t old_fs = get_fs(); if (!ret)
ret = cp_stat64(statbuf, &stat);
set_fs (KERNEL_DS); return ret;
ret = sys_newfstat(fd, &s);
set_fs (old_fs);
if (putstat64 (statbuf, &s))
return -EFAULT;
return ret;
} }
/* /*
......
...@@ -1307,13 +1307,13 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat *statbuf) ...@@ -1307,13 +1307,13 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat *statbuf)
if (stat->size > MAX_NON_LFS) if (stat->size > MAX_NON_LFS)
return -EOVERFLOW; return -EOVERFLOW;
err = put_user(stat->dev, &statbuf->st_dev); err = put_user(old_encode_dev(stat->dev), &statbuf->st_dev);
err |= put_user(stat->ino, &statbuf->st_ino); err |= put_user(stat->ino, &statbuf->st_ino);
err |= put_user(stat->mode, &statbuf->st_mode); err |= put_user(stat->mode, &statbuf->st_mode);
err |= put_user(stat->nlink, &statbuf->st_nlink); err |= put_user(stat->nlink, &statbuf->st_nlink);
err |= put_user(high2lowuid(stat->uid), &statbuf->st_uid); err |= put_user(high2lowuid(stat->uid), &statbuf->st_uid);
err |= put_user(high2lowgid(stat->gid), &statbuf->st_gid); err |= put_user(high2lowgid(stat->gid), &statbuf->st_gid);
err |= put_user(stat->rdev, &statbuf->st_rdev); err |= put_user(old_encode_dev(stat->rdev), &statbuf->st_rdev);
err |= put_user(stat->size, &statbuf->st_size); err |= put_user(stat->size, &statbuf->st_size);
err |= put_user(stat->atime.tv_sec, &statbuf->st_atime); err |= put_user(stat->atime.tv_sec, &statbuf->st_atime);
err |= put_user(0, &statbuf->__unused1); err |= put_user(0, &statbuf->__unused1);
......
...@@ -89,27 +89,16 @@ ...@@ -89,27 +89,16 @@
#define low2highgid(gid) ((gid) == (u16)-1) ? (gid_t)-1 : (gid_t)(gid) #define low2highgid(gid) ((gid) == (u16)-1) ? (gid_t)-1 : (gid_t)(gid)
extern int overflowuid,overflowgid; extern int overflowuid,overflowgid;
extern asmlinkage long sys_newstat(char * filename, struct stat * statbuf);
extern asmlinkage long sys_newlstat(char * filename, struct stat * statbuf);
extern asmlinkage long sys_newfstat(unsigned int fd, struct stat * statbuf);
extern asmlinkage long sys_newstat(char * filename, struct stat * statbuf);
extern asmlinkage long sys_newlstat(char * filename, struct stat * statbuf);
extern asmlinkage long sys_newfstat(unsigned int fd, struct stat * statbuf);
int cp_compat_stat(struct kstat *kbuf, struct compat_stat *ubuf) int cp_compat_stat(struct kstat *kbuf, struct compat_stat *ubuf)
{ {
if (verify_area(VERIFY_WRITE, ubuf, sizeof(struct compat_stat)) || if (verify_area(VERIFY_WRITE, ubuf, sizeof(struct compat_stat)) ||
__put_user (kbuf->dev, &ubuf->st_dev) || __put_user (old_encode_dev(kbuf->dev), &ubuf->st_dev) ||
__put_user (kbuf->ino, &ubuf->st_ino) || __put_user (kbuf->ino, &ubuf->st_ino) ||
__put_user (kbuf->mode, &ubuf->st_mode) || __put_user (kbuf->mode, &ubuf->st_mode) ||
__put_user (kbuf->nlink, &ubuf->st_nlink) || __put_user (kbuf->nlink, &ubuf->st_nlink) ||
__put_user (kbuf->uid, &ubuf->st_uid) || __put_user (kbuf->uid, &ubuf->st_uid) ||
__put_user (kbuf->gid, &ubuf->st_gid) || __put_user (kbuf->gid, &ubuf->st_gid) ||
__put_user (kbuf->rdev, &ubuf->st_rdev) || __put_user (old_encode_dev(kbuf->rdev), &ubuf->st_rdev) ||
__put_user (kbuf->size, &ubuf->st_size) || __put_user (kbuf->size, &ubuf->st_size) ||
__put_user (kbuf->atime.tv_sec, &ubuf->st_atime) || __put_user (kbuf->atime.tv_sec, &ubuf->st_atime) ||
__put_user (kbuf->atime.tv_nsec, &ubuf->st_atime_nsec) || __put_user (kbuf->atime.tv_nsec, &ubuf->st_atime_nsec) ||
...@@ -127,26 +116,26 @@ int cp_compat_stat(struct kstat *kbuf, struct compat_stat *ubuf) ...@@ -127,26 +116,26 @@ int cp_compat_stat(struct kstat *kbuf, struct compat_stat *ubuf)
support for 64bit inode numbers. */ support for 64bit inode numbers. */
static int static int
putstat64(struct stat64 *ubuf, struct stat *kbuf) cp_stat64(struct stat64 *ubuf, struct kstat *stat)
{ {
if (verify_area(VERIFY_WRITE, ubuf, sizeof(struct stat64)) || if (verify_area(VERIFY_WRITE, ubuf, sizeof(struct stat64)) ||
__put_user (kbuf->st_dev, &ubuf->st_dev) || __put_user(old_encode_dev(stat->dev), &ubuf->st_dev) ||
__put_user (kbuf->st_ino, &ubuf->__st_ino) || __put_user (stat->ino, &ubuf->__st_ino) ||
__put_user (kbuf->st_ino, &ubuf->st_ino) || __put_user (stat->ino, &ubuf->st_ino) ||
__put_user (kbuf->st_mode, &ubuf->st_mode) || __put_user (stat->mode, &ubuf->st_mode) ||
__put_user (kbuf->st_nlink, &ubuf->st_nlink) || __put_user (stat->nlink, &ubuf->st_nlink) ||
__put_user (kbuf->st_uid, &ubuf->st_uid) || __put_user (stat->uid, &ubuf->st_uid) ||
__put_user (kbuf->st_gid, &ubuf->st_gid) || __put_user (stat->gid, &ubuf->st_gid) ||
__put_user (kbuf->st_rdev, &ubuf->st_rdev) || __put_user (old_encode_dev(stat->rdev), &ubuf->st_rdev) ||
__put_user (kbuf->st_size, &ubuf->st_size) || __put_user (stat->size, &ubuf->st_size) ||
__put_user (kbuf->st_atime, &ubuf->st_atime) || __put_user (stat->atime.tv_sec, &ubuf->st_atime) ||
__put_user (kbuf->st_atime_nsec, &ubuf->st_atime_nsec) || __put_user (stat->atime.tv_nsec, &ubuf->st_atime_nsec) ||
__put_user (kbuf->st_mtime, &ubuf->st_mtime) || __put_user (stat->mtime.tv_sec, &ubuf->st_mtime) ||
__put_user (kbuf->st_mtime_nsec, &ubuf->st_mtime_nsec) || __put_user (stat->mtime.tv_nsec, &ubuf->st_mtime_nsec) ||
__put_user (kbuf->st_ctime, &ubuf->st_ctime) || __put_user (stat->ctime.tv_sec, &ubuf->st_ctime) ||
__put_user (kbuf->st_ctime_nsec, &ubuf->st_ctime_nsec) || __put_user (stat->ctime.tv_nsec, &ubuf->st_ctime_nsec) ||
__put_user (kbuf->st_blksize, &ubuf->st_blksize) || __put_user (stat->blksize, &ubuf->st_blksize) ||
__put_user (kbuf->st_blocks, &ubuf->st_blocks)) __put_user (stat->blocks, &ubuf->st_blocks))
return -EFAULT; return -EFAULT;
return 0; return 0;
} }
...@@ -154,50 +143,33 @@ putstat64(struct stat64 *ubuf, struct stat *kbuf) ...@@ -154,50 +143,33 @@ putstat64(struct stat64 *ubuf, struct stat *kbuf)
asmlinkage long asmlinkage long
sys32_stat64(char * filename, struct stat64 *statbuf) sys32_stat64(char * filename, struct stat64 *statbuf)
{ {
int ret; struct kstat stat;
struct stat s; int ret = vfs_stat(filename, &stat);
mm_segment_t old_fs = get_fs(); if (!ret)
ret = cp_stat64(statbuf, &stat);
set_fs (KERNEL_DS);
ret = sys_newstat(filename, &s);
set_fs (old_fs);
if (putstat64 (statbuf, &s))
return -EFAULT;
return ret; return ret;
} }
asmlinkage long asmlinkage long
sys32_lstat64(char * filename, struct stat64 *statbuf) sys32_lstat64(char * filename, struct stat64 *statbuf)
{ {
int ret; struct kstat stat;
struct stat s; int ret = vfs_lstat(filename, &stat);
mm_segment_t old_fs = get_fs(); if (!ret)
ret = cp_stat64(statbuf, &stat);
set_fs (KERNEL_DS);
ret = sys_newlstat(filename, &s);
set_fs (old_fs);
if (putstat64 (statbuf, &s))
return -EFAULT;
return ret; return ret;
} }
asmlinkage long asmlinkage long
sys32_fstat64(unsigned int fd, struct stat64 *statbuf) sys32_fstat64(unsigned int fd, struct stat64 *statbuf)
{ {
int ret; struct kstat stat;
struct stat s; int ret = vfs_fstat(fd, &stat);
mm_segment_t old_fs = get_fs(); if (!ret)
ret = cp_stat64(statbuf, &stat);
set_fs (KERNEL_DS);
ret = sys_newfstat(fd, &s);
set_fs (old_fs);
if (putstat64 (statbuf, &s))
return -EFAULT;
return ret; return ret;
} }
/* /*
* Linux/i386 didn't use to be able to handle more than * Linux/i386 didn't use to be able to handle more than
* 4 system call parameters, so these system calls used a memory * 4 system call parameters, so these system calls used a memory
......
...@@ -117,13 +117,13 @@ static int cp_old_stat(struct kstat *stat, struct __old_kernel_stat __user * sta ...@@ -117,13 +117,13 @@ static int cp_old_stat(struct kstat *stat, struct __old_kernel_stat __user * sta
} }
memset(&tmp, 0, sizeof(struct __old_kernel_stat)); memset(&tmp, 0, sizeof(struct __old_kernel_stat));
tmp.st_dev = stat->dev; tmp.st_dev = old_encode_dev(stat->dev);
tmp.st_ino = stat->ino; tmp.st_ino = stat->ino;
tmp.st_mode = stat->mode; tmp.st_mode = stat->mode;
tmp.st_nlink = stat->nlink; tmp.st_nlink = stat->nlink;
SET_OLDSTAT_UID(tmp, stat->uid); SET_OLDSTAT_UID(tmp, stat->uid);
SET_OLDSTAT_GID(tmp, stat->gid); SET_OLDSTAT_GID(tmp, stat->gid);
tmp.st_rdev = stat->rdev; tmp.st_rdev = old_encode_dev(stat->rdev);
#if BITS_PER_LONG == 32 #if BITS_PER_LONG == 32
if (stat->size > MAX_NON_LFS) if (stat->size > MAX_NON_LFS)
return -EOVERFLOW; return -EOVERFLOW;
...@@ -173,13 +173,13 @@ static int cp_new_stat(struct kstat *stat, struct stat __user *statbuf) ...@@ -173,13 +173,13 @@ static int cp_new_stat(struct kstat *stat, struct stat __user *statbuf)
struct stat tmp; struct stat tmp;
memset(&tmp, 0, sizeof(tmp)); memset(&tmp, 0, sizeof(tmp));
tmp.st_dev = stat->dev; tmp.st_dev = old_encode_dev(stat->dev);
tmp.st_ino = stat->ino; tmp.st_ino = stat->ino;
tmp.st_mode = stat->mode; tmp.st_mode = stat->mode;
tmp.st_nlink = stat->nlink; tmp.st_nlink = stat->nlink;
SET_STAT_UID(tmp, stat->uid); SET_STAT_UID(tmp, stat->uid);
SET_STAT_GID(tmp, stat->gid); SET_STAT_GID(tmp, stat->gid);
tmp.st_rdev = stat->rdev; tmp.st_rdev = old_encode_dev(stat->rdev);
#if BITS_PER_LONG == 32 #if BITS_PER_LONG == 32
if (stat->size > MAX_NON_LFS) if (stat->size > MAX_NON_LFS)
return -EOVERFLOW; return -EOVERFLOW;
...@@ -263,7 +263,7 @@ static long cp_new_stat64(struct kstat *stat, struct stat64 __user *statbuf) ...@@ -263,7 +263,7 @@ static long cp_new_stat64(struct kstat *stat, struct stat64 __user *statbuf)
struct stat64 tmp; struct stat64 tmp;
memset(&tmp, 0, sizeof(struct stat64)); memset(&tmp, 0, sizeof(struct stat64));
tmp.st_dev = stat->dev; tmp.st_dev = old_encode_dev(stat->dev);
tmp.st_ino = stat->ino; tmp.st_ino = stat->ino;
#ifdef STAT64_HAS_BROKEN_ST_INO #ifdef STAT64_HAS_BROKEN_ST_INO
tmp.__st_ino = stat->ino; tmp.__st_ino = stat->ino;
...@@ -272,7 +272,7 @@ static long cp_new_stat64(struct kstat *stat, struct stat64 __user *statbuf) ...@@ -272,7 +272,7 @@ static long cp_new_stat64(struct kstat *stat, struct stat64 __user *statbuf)
tmp.st_nlink = stat->nlink; tmp.st_nlink = stat->nlink;
tmp.st_uid = stat->uid; tmp.st_uid = stat->uid;
tmp.st_gid = stat->gid; tmp.st_gid = stat->gid;
tmp.st_rdev = stat->rdev; tmp.st_rdev = old_encode_dev(stat->rdev);
tmp.st_atime = stat->atime.tv_sec; tmp.st_atime = stat->atime.tv_sec;
tmp.st_atime_nsec = stat->atime.tv_nsec; tmp.st_atime_nsec = stat->atime.tv_nsec;
tmp.st_mtime = stat->mtime.tv_sec; tmp.st_mtime = stat->mtime.tv_sec;
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* assume GCC is being used. * assume GCC is being used.
*/ */
typedef unsigned int __kernel_dev_t;
typedef unsigned int __kernel_ino_t; typedef unsigned int __kernel_ino_t;
typedef unsigned int __kernel_mode_t; typedef unsigned int __kernel_mode_t;
typedef unsigned int __kernel_nlink_t; typedef unsigned int __kernel_nlink_t;
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
* assume GCC is being used. * assume GCC is being used.
*/ */
typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t; typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t; typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t; typedef unsigned short __kernel_nlink_t;
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
* assume GCC is being used. * assume GCC is being used.
*/ */
typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t; typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t; typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t; typedef unsigned short __kernel_nlink_t;
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
* assume GCC is being used. * assume GCC is being used.
*/ */
typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t; typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t; typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t; typedef unsigned short __kernel_nlink_t;
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* assume GCC is being used. * assume GCC is being used.
*/ */
typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t; typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t; typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t; typedef unsigned short __kernel_nlink_t;
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* assume GCC is being used. * assume GCC is being used.
*/ */
typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t; typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t; typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t; typedef unsigned short __kernel_nlink_t;
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
* David Mosberger-Tang <davidm@hpl.hp.com> * David Mosberger-Tang <davidm@hpl.hp.com>
*/ */
typedef unsigned int __kernel_dev_t;
typedef unsigned int __kernel_ino_t; typedef unsigned int __kernel_ino_t;
typedef unsigned int __kernel_mode_t; typedef unsigned int __kernel_mode_t;
typedef unsigned int __kernel_nlink_t; typedef unsigned int __kernel_nlink_t;
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* assume GCC is being used. * assume GCC is being used.
*/ */
typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t; typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t; typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t; typedef unsigned short __kernel_nlink_t;
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
* assume GCC is being used. * assume GCC is being used.
*/ */
typedef unsigned int __kernel_dev_t;
typedef unsigned long __kernel_ino_t; typedef unsigned long __kernel_ino_t;
typedef unsigned int __kernel_mode_t; typedef unsigned int __kernel_mode_t;
#if (_MIPS_SZLONG == 32) #if (_MIPS_SZLONG == 32)
......
...@@ -16,14 +16,14 @@ ...@@ -16,14 +16,14 @@
#if (_MIPS_SIM == _MIPS_SIM_ABI32) || (_MIPS_SIM == _MIPS_SIM_NABI32) #if (_MIPS_SIM == _MIPS_SIM_ABI32) || (_MIPS_SIM == _MIPS_SIM_NABI32)
struct stat { struct stat {
dev_t st_dev; unsigned st_dev;
long st_pad1[3]; /* Reserved for network id */ long st_pad1[3]; /* Reserved for network id */
ino_t st_ino; ino_t st_ino;
mode_t st_mode; mode_t st_mode;
nlink_t st_nlink; nlink_t st_nlink;
uid_t st_uid; uid_t st_uid;
gid_t st_gid; gid_t st_gid;
dev_t st_rdev; unsigned st_rdev;
long st_pad2[2]; long st_pad2[2];
off_t st_size; off_t st_size;
long st_pad3; long st_pad3;
...@@ -90,7 +90,7 @@ struct stat64 { ...@@ -90,7 +90,7 @@ struct stat64 {
/* The memory layout is the same as of struct stat64 of the 32-bit kernel. */ /* The memory layout is the same as of struct stat64 of the 32-bit kernel. */
struct stat { struct stat {
dev_t st_dev; unsigned int st_dev;
unsigned int st_pad0[3]; /* Reserved for st_dev expansion */ unsigned int st_pad0[3]; /* Reserved for st_dev expansion */
unsigned long st_ino; unsigned long st_ino;
...@@ -101,7 +101,7 @@ struct stat { ...@@ -101,7 +101,7 @@ struct stat {
uid_t st_uid; uid_t st_uid;
gid_t st_gid; gid_t st_gid;
dev_t st_rdev; unsigned int st_rdev;
unsigned int st_pad1[3]; /* Reserved for st_rdev expansion */ unsigned int st_pad1[3]; /* Reserved for st_rdev expansion */
off_t st_size; off_t st_size;
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
* be a little careful about namespace pollution etc. Also, we cannot * be a little careful about namespace pollution etc. Also, we cannot
* assume GCC is being used. * assume GCC is being used.
*/ */
typedef unsigned int __kernel_dev_t;
typedef unsigned long __kernel_ino_t; typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t; typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t; typedef unsigned short __kernel_nlink_t;
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
#include <linux/types.h> #include <linux/types.h>
struct stat { struct stat {
dev_t st_dev; /* dev_t is 32 bits on parisc */ unsigned int st_dev; /* dev_t is 32 bits on parisc */
ino_t st_ino; /* 32 bits */ ino_t st_ino; /* 32 bits */
mode_t st_mode; /* 16 bits */ mode_t st_mode; /* 16 bits */
nlink_t st_nlink; /* 16 bits */ nlink_t st_nlink; /* 16 bits */
unsigned short st_reserved1; /* old st_uid */ unsigned short st_reserved1; /* old st_uid */
unsigned short st_reserved2; /* old st_gid */ unsigned short st_reserved2; /* old st_gid */
dev_t st_rdev; unsigned int st_rdev;
off_t st_size; off_t st_size;
time_t st_atime; time_t st_atime;
unsigned int st_atime_nsec; unsigned int st_atime_nsec;
...@@ -21,12 +21,12 @@ struct stat { ...@@ -21,12 +21,12 @@ struct stat {
int st_blksize; int st_blksize;
int st_blocks; int st_blocks;
unsigned int __unused1; /* ACL stuff */ unsigned int __unused1; /* ACL stuff */
dev_t __unused2; /* network */ unsigned int __unused2; /* network */
ino_t __unused3; /* network */ ino_t __unused3; /* network */
unsigned int __unused4; /* cnodes */ unsigned int __unused4; /* cnodes */
unsigned short __unused5; /* netsite */ unsigned short __unused5; /* netsite */
short st_fstype; short st_fstype;
dev_t st_realdev; unsigned int st_realdev;
unsigned short st_basemode; unsigned short st_basemode;
unsigned short st_spareshort; unsigned short st_spareshort;
uid_t st_uid; uid_t st_uid;
...@@ -39,13 +39,13 @@ struct stat { ...@@ -39,13 +39,13 @@ struct stat {
typedef __kernel_off64_t off64_t; typedef __kernel_off64_t off64_t;
struct hpux_stat64 { struct hpux_stat64 {
dev_t st_dev; /* dev_t is 32 bits on parisc */ unsigned int st_dev; /* dev_t is 32 bits on parisc */
ino_t st_ino; /* 32 bits */ ino_t st_ino; /* 32 bits */
mode_t st_mode; /* 16 bits */ mode_t st_mode; /* 16 bits */
nlink_t st_nlink; /* 16 bits */ nlink_t st_nlink; /* 16 bits */
unsigned short st_reserved1; /* old st_uid */ unsigned short st_reserved1; /* old st_uid */
unsigned short st_reserved2; /* old st_gid */ unsigned short st_reserved2; /* old st_gid */
dev_t st_rdev; unsigned int st_rdev;
off64_t st_size; off64_t st_size;
time_t st_atime; time_t st_atime;
unsigned int st_spare1; unsigned int st_spare1;
...@@ -56,12 +56,12 @@ struct hpux_stat64 { ...@@ -56,12 +56,12 @@ struct hpux_stat64 {
int st_blksize; int st_blksize;
__u64 st_blocks; __u64 st_blocks;
unsigned int __unused1; /* ACL stuff */ unsigned int __unused1; /* ACL stuff */
dev_t __unused2; /* network */ unsigned int __unused2; /* network */
ino_t __unused3; /* network */ ino_t __unused3; /* network */
unsigned int __unused4; /* cnodes */ unsigned int __unused4; /* cnodes */
unsigned short __unused5; /* netsite */ unsigned short __unused5; /* netsite */
short st_fstype; short st_fstype;
dev_t st_realdev; unsigned int st_realdev;
unsigned short st_basemode; unsigned short st_basemode;
unsigned short st_spareshort; unsigned short st_spareshort;
uid_t st_uid; uid_t st_uid;
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* assume GCC is being used. * assume GCC is being used.
*/ */
typedef unsigned int __kernel_dev_t;
typedef unsigned long __kernel_ino_t; typedef unsigned long __kernel_ino_t;
typedef unsigned int __kernel_mode_t; typedef unsigned int __kernel_mode_t;
typedef unsigned short __kernel_nlink_t; typedef unsigned short __kernel_nlink_t;
......
...@@ -22,13 +22,13 @@ struct __old_kernel_stat { ...@@ -22,13 +22,13 @@ struct __old_kernel_stat {
#define STAT_HAVE_NSEC 1 #define STAT_HAVE_NSEC 1
struct stat { struct stat {
dev_t st_dev; unsigned st_dev;
ino_t st_ino; ino_t st_ino;
mode_t st_mode; mode_t st_mode;
nlink_t st_nlink; nlink_t st_nlink;
uid_t st_uid; uid_t st_uid;
gid_t st_gid; gid_t st_gid;
dev_t st_rdev; unsigned st_rdev;
off_t st_size; off_t st_size;
unsigned long st_blksize; unsigned long st_blksize;
unsigned long st_blocks; unsigned long st_blocks;
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
typedef unsigned long __kernel_dev_t;
typedef unsigned long __kernel_ino_t; typedef unsigned long __kernel_ino_t;
typedef unsigned long __kernel_nlink_t; typedef unsigned long __kernel_nlink_t;
typedef unsigned int __kernel_mode_t; typedef unsigned int __kernel_mode_t;
......
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
#include <linux/types.h> #include <linux/types.h>
struct stat { struct stat {
dev_t st_dev; unsigned long st_dev;
ino_t st_ino; ino_t st_ino;
nlink_t st_nlink; nlink_t st_nlink;
mode_t st_mode; mode_t st_mode;
uid_t st_uid; uid_t st_uid;
gid_t st_gid; gid_t st_gid;
dev_t st_rdev; unsigned long st_rdev;
off_t st_size; off_t st_size;
unsigned long st_blksize; unsigned long st_blksize;
unsigned long st_blocks; unsigned long st_blocks;
......
...@@ -34,7 +34,6 @@ typedef long long __kernel_loff_t; ...@@ -34,7 +34,6 @@ typedef long long __kernel_loff_t;
#ifndef __s390x__ #ifndef __s390x__
typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t; typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t; typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t; typedef unsigned short __kernel_nlink_t;
...@@ -51,7 +50,6 @@ typedef unsigned short __kernel_old_dev_t; ...@@ -51,7 +50,6 @@ typedef unsigned short __kernel_old_dev_t;
#else /* __s390x__ */ #else /* __s390x__ */
typedef unsigned int __kernel_dev_t;
typedef unsigned int __kernel_ino_t; typedef unsigned int __kernel_ino_t;
typedef unsigned int __kernel_mode_t; typedef unsigned int __kernel_mode_t;
typedef unsigned int __kernel_nlink_t; typedef unsigned int __kernel_nlink_t;
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* assume GCC is being used. * assume GCC is being used.
*/ */
typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t; typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t; typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t; typedef unsigned short __kernel_nlink_t;
......
...@@ -17,7 +17,6 @@ typedef int __kernel_pid_t; ...@@ -17,7 +17,6 @@ typedef int __kernel_pid_t;
typedef unsigned short __kernel_ipc_pid_t; typedef unsigned short __kernel_ipc_pid_t;
typedef unsigned short __kernel_uid_t; typedef unsigned short __kernel_uid_t;
typedef unsigned short __kernel_gid_t; typedef unsigned short __kernel_gid_t;
typedef unsigned short __kernel_dev_t;
typedef unsigned long __kernel_ino_t; typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t; typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_umode_t; typedef unsigned short __kernel_umode_t;
......
...@@ -16,7 +16,6 @@ typedef int __kernel_pid_t; ...@@ -16,7 +16,6 @@ typedef int __kernel_pid_t;
typedef int __kernel_ipc_pid_t; typedef int __kernel_ipc_pid_t;
typedef unsigned int __kernel_uid_t; typedef unsigned int __kernel_uid_t;
typedef unsigned int __kernel_gid_t; typedef unsigned int __kernel_gid_t;
typedef unsigned int __kernel_dev_t;
typedef unsigned long __kernel_ino_t; typedef unsigned long __kernel_ino_t;
typedef unsigned int __kernel_mode_t; typedef unsigned int __kernel_mode_t;
typedef unsigned short __kernel_umode_t; typedef unsigned short __kernel_umode_t;
......
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
#include <linux/types.h> #include <linux/types.h>
struct stat { struct stat {
dev_t st_dev; unsigned st_dev;
ino_t st_ino; ino_t st_ino;
mode_t st_mode; mode_t st_mode;
short st_nlink; short st_nlink;
uid_t st_uid; uid_t st_uid;
gid_t st_gid; gid_t st_gid;
dev_t st_rdev; unsigned st_rdev;
off_t st_size; off_t st_size;
time_t st_atime; time_t st_atime;
time_t st_mtime; time_t st_mtime;
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#ifndef __V850_POSIX_TYPES_H__ #ifndef __V850_POSIX_TYPES_H__
#define __V850_POSIX_TYPES_H__ #define __V850_POSIX_TYPES_H__
typedef unsigned int __kernel_dev_t;
typedef unsigned long __kernel_ino_t; typedef unsigned long __kernel_ino_t;
typedef unsigned long long __kernel_ino64_t; typedef unsigned long long __kernel_ino64_t;
typedef unsigned int __kernel_mode_t; typedef unsigned int __kernel_mode_t;
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
* assume GCC is being used. * assume GCC is being used.
*/ */
typedef unsigned long __kernel_dev_t;
typedef unsigned long __kernel_ino_t; typedef unsigned long __kernel_ino_t;
typedef unsigned int __kernel_mode_t; typedef unsigned int __kernel_mode_t;
typedef unsigned long __kernel_nlink_t; typedef unsigned long __kernel_nlink_t;
......
...@@ -50,7 +50,7 @@ struct dm_ioctl { ...@@ -50,7 +50,7 @@ struct dm_ioctl {
uint32_t open_count; /* out */ uint32_t open_count; /* out */
uint32_t flags; /* in/out */ uint32_t flags; /* in/out */
__kernel_dev_t dev; /* in/out */ __kernel_old_dev_t dev; /* in/out */
char name[DM_NAME_LEN]; /* device name */ char name[DM_NAME_LEN]; /* device name */
char uuid[DM_UUID_LEN]; /* unique identifier for char uuid[DM_UUID_LEN]; /* unique identifier for
...@@ -87,7 +87,7 @@ struct dm_target_spec { ...@@ -87,7 +87,7 @@ struct dm_target_spec {
struct dm_target_deps { struct dm_target_deps {
uint32_t count; uint32_t count;
__kernel_dev_t dev[0]; /* out */ __kernel_old_dev_t dev[0]; /* out */
}; };
/* /*
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
#ifndef __KERNEL_STRICT_NAMES #ifndef __KERNEL_STRICT_NAMES
typedef __u16 __kernel_dev_t;
typedef __kernel_fd_set fd_set; typedef __kernel_fd_set fd_set;
typedef __kernel_dev_t dev_t; typedef __kernel_dev_t dev_t;
typedef __kernel_ino_t ino_t; typedef __kernel_ino_t ino_t;
......
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