Remove lfs-only inumber field (and its supporting union) from struct

ufs1_dinode.
This commit is contained in:
dholland 2013-06-09 17:55:46 +00:00
parent 7f3bb73875
commit 2fd49050f5
3 changed files with 11 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffs_bswap.c,v 1.36 2013/01/22 09:39:16 dholland Exp $ */
/* $NetBSD: ffs_bswap.c,v 1.37 2013/06/09 17:55:46 dholland Exp $ */
/*
* Copyright (c) 1998 Manuel Bouyer.
@ -30,7 +30,7 @@
#endif
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ffs_bswap.c,v 1.36 2013/01/22 09:39:16 dholland Exp $");
__KERNEL_RCSID(0, "$NetBSD: ffs_bswap.c,v 1.37 2013/06/09 17:55:46 dholland Exp $");
#include <sys/param.h>
#if defined(_KERNEL)
@ -119,8 +119,8 @@ ffs_dinode1_swap(struct ufs1_dinode *o, struct ufs1_dinode *n)
n->di_mode = bswap16(o->di_mode);
n->di_nlink = bswap16(o->di_nlink);
n->di_u.oldids[0] = bswap16(o->di_u.oldids[0]);
n->di_u.oldids[1] = bswap16(o->di_u.oldids[1]);
n->di_oldids[0] = bswap16(o->di_oldids[0]);
n->di_oldids[1] = bswap16(o->di_oldids[1]);
n->di_size = bswap64(o->di_size);
n->di_atime = bswap32(o->di_atime);
n->di_atimensec = bswap32(o->di_atimensec);

View File

@ -1,4 +1,4 @@
/* $NetBSD: dinode.h,v 1.23 2013/06/09 00:10:55 dholland Exp $ */
/* $NetBSD: dinode.h,v 1.24 2013/06/09 17:55:46 dholland Exp $ */
/*
* Copyright (c) 2002 Networks Associates Technology, Inc.
@ -82,10 +82,7 @@
struct ufs1_dinode {
u_int16_t di_mode; /* 0: IFMT, permissions; see below. */
int16_t di_nlink; /* 2: File link count. */
union {
u_int16_t oldids[2]; /* 4: Ffs: old user and group ids. */
u_int32_t inumber; /* 4: Lfs: inode number. */
} di_u;
u_int16_t di_oldids[2]; /* 4: Ffs: old user and group ids. */
u_int64_t di_size; /* 8: File byte count. */
int32_t di_atime; /* 16: Last access time. */
int32_t di_atimensec; /* 20: Last access time. */
@ -137,8 +134,8 @@ struct ufs2_dinode {
* dev_t value. Short symbolic links place their path in the
* di_db area.
*/
#define di_ogid di_u.oldids[1]
#define di_ouid di_u.oldids[0]
#define di_ogid di_oldids[1]
#define di_ouid di_oldids[0]
#define di_rdev di_db[0]
#define UFS1_MAXSYMLINKLEN ((UFS_NDADDR + UFS_NIADDR) * sizeof(int32_t))
#define UFS2_MAXSYMLINKLEN ((UFS_NDADDR + UFS_NIADDR) * sizeof(int64_t))

View File

@ -1,4 +1,4 @@
/* $NetBSD: inode.h,v 1.64 2012/11/19 00:36:21 jakllsch Exp $ */
/* $NetBSD: inode.h,v 1.65 2013/06/09 17:55:46 dholland Exp $ */
/*
* Copyright (c) 1982, 1989, 1993
@ -182,8 +182,8 @@ struct inode {
#define i_ffs1_rdev i_din.ffs1_din->di_rdev
#define i_ffs1_size i_din.ffs1_din->di_size
#define i_ffs1_uid i_din.ffs1_din->di_uid
#define i_ffs1_ouid i_din.ffs1_din->di_u.oldids[0]
#define i_ffs1_ogid i_din.ffs1_din->di_u.oldids[1]
#define i_ffs1_ouid i_din.ffs1_din->di_oldids[0]
#define i_ffs1_ogid i_din.ffs1_din->di_oldids[1]
#define i_ffs2_atime i_din.ffs2_din->di_atime
#define i_ffs2_atimensec i_din.ffs2_din->di_atimensec