Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs - Add e2di_version, e2di_nblock_high, e2di_facl_high...
details: https://anonhg.NetBSD.org/src/rev/a029d12814d4
branches: trunk
changeset: 782758:a029d12814d4
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Mon Nov 19 00:36:21 2012 +0000
description:
- Add e2di_version, e2di_nblock_high, e2di_facl_high fields to ext2fs_dinode.
- Update i_e2fs_ aliases to match.
- ext2fs_bswap support for these ext2fs_dinode fields.
(e2di_version and e2di_facl_high replace previously reserved fields.
e2di_nblock_high was formerly e2di_nfrag and e2di_fsize, however these
are currently defined in e2fsprogs as only being relevant for HURD.)
diffstat:
sys/ufs/ext2fs/ext2fs_bswap.c | 7 +++++--
sys/ufs/ext2fs/ext2fs_dinode.h | 9 ++++-----
sys/ufs/ufs/inode.h | 7 ++++---
3 files changed, 13 insertions(+), 10 deletions(-)
diffs (87 lines):
diff -r e3537f7a3f75 -r a029d12814d4 sys/ufs/ext2fs/ext2fs_bswap.c
--- a/sys/ufs/ext2fs/ext2fs_bswap.c Mon Nov 19 00:25:29 2012 +0000
+++ b/sys/ufs/ext2fs/ext2fs_bswap.c Mon Nov 19 00:36:21 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_bswap.c,v 1.17 2012/11/18 17:59:56 jakllsch Exp $ */
+/* $NetBSD: ext2fs_bswap.c,v 1.18 2012/11/19 00:36:21 jakllsch Exp $ */
/*
* Copyright (c) 1997 Manuel Bouyer.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ext2fs_bswap.c,v 1.17 2012/11/18 17:59:56 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ext2fs_bswap.c,v 1.18 2012/11/19 00:36:21 jakllsch Exp $");
#include <sys/types.h>
#include <ufs/ext2fs/ext2fs.h>
@@ -109,10 +109,13 @@
new->e2di_dtime = bswap32(old->e2di_dtime);
new->e2di_nblock = bswap32(old->e2di_nblock);
new->e2di_flags = bswap32(old->e2di_flags);
+ new->e2di_version = bswap32(old->e2di_version);
new->e2di_gen = bswap32(old->e2di_gen);
new->e2di_facl = bswap32(old->e2di_facl);
new->e2di_dacl = bswap32(old->e2di_dacl);
new->e2di_faddr = bswap32(old->e2di_faddr);
+ new->e2di_nblock_high = bswap16(old->e2di_nblock_high);
+ new->e2di_facl_high = bswap16(old->e2di_facl_high);
new->e2di_uid_high = bswap16(old->e2di_uid_high);
new->e2di_gid_high = bswap16(old->e2di_gid_high);
memcpy(&new->e2di_blocks[0], &old->e2di_blocks[0],
diff -r e3537f7a3f75 -r a029d12814d4 sys/ufs/ext2fs/ext2fs_dinode.h
--- a/sys/ufs/ext2fs/ext2fs_dinode.h Mon Nov 19 00:25:29 2012 +0000
+++ b/sys/ufs/ext2fs/ext2fs_dinode.h Mon Nov 19 00:36:21 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ext2fs_dinode.h,v 1.23 2012/11/18 18:20:56 jakllsch Exp $ */
+/* $NetBSD: ext2fs_dinode.h,v 1.24 2012/11/19 00:36:21 jakllsch Exp $ */
/*
* Copyright (c) 1982, 1989, 1993
@@ -109,15 +109,14 @@
uint16_t e2di_nlink; /* 26: File link count */
uint32_t e2di_nblock; /* 28: Blocks count */
uint32_t e2di_flags; /* 32: Status flags (chflags) */
- uint32_t e2di_linux_reserved1; /* 36 */
+ uint32_t e2di_version; /* 36: was reserved1 */
uint32_t e2di_blocks[NDADDR+NIADDR]; /* 40: disk blocks */
uint32_t e2di_gen; /* 100: generation number */
uint32_t e2di_facl; /* 104: file ACL (not implemented) */
uint32_t e2di_dacl; /* 108: dir ACL (not implemented) */
uint32_t e2di_faddr; /* 112: fragment address */
- uint8_t e2di_nfrag; /* 116: fragment number */
- uint8_t e2di_fsize; /* 117: fragment size */
- uint16_t e2di_linux_reserved2; /* 118 */
+ uint16_t e2di_nblock_high; /* 116: Blocks count bits 47:32 */
+ uint16_t e2di_facl_high; /* 118: file ACL bits 47:32 */
uint16_t e2di_uid_high; /* 120: Owner UID top 16 bits */
uint16_t e2di_gid_high; /* 122: Owner GID top 16 bits */
uint32_t e2di_linux_reserved3; /* 124 */
diff -r e3537f7a3f75 -r a029d12814d4 sys/ufs/ufs/inode.h
--- a/sys/ufs/ufs/inode.h Mon Nov 19 00:25:29 2012 +0000
+++ b/sys/ufs/ufs/inode.h Mon Nov 19 00:36:21 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inode.h,v 1.63 2012/11/19 00:25:29 jakllsch Exp $ */
+/* $NetBSD: inode.h,v 1.64 2012/11/19 00:36:21 jakllsch Exp $ */
/*
* Copyright (c) 1982, 1989, 1993
@@ -220,14 +220,15 @@
#define i_e2fs_nlink i_din.e2fs_din->e2di_nlink
#define i_e2fs_nblock i_din.e2fs_din->e2di_nblock
#define i_e2fs_flags i_din.e2fs_din->e2di_flags
+#define i_e2fs_version i_din.e2fs_din->e2di_version
#define i_e2fs_blocks i_din.e2fs_din->e2di_blocks
#define i_e2fs_rdev i_din.e2fs_din->e2di_rdev
#define i_e2fs_gen i_din.e2fs_din->e2di_gen
#define i_e2fs_facl i_din.e2fs_din->e2di_facl
#define i_e2fs_dacl i_din.e2fs_din->e2di_dacl
#define i_e2fs_faddr i_din.e2fs_din->e2di_faddr
-#define i_e2fs_nfrag i_din.e2fs_din->e2di_nfrag
-#define i_e2fs_fsize i_din.e2fs_din->e2di_fsize
+#define i_e2fs_nblock_high i_din.e2fs_din->e2di_nblock_high
+#define i_e2fs_facl_high i_din.e2fs_din->e2di_facl_high
#define i_e2fs_uid_high i_din.e2fs_din->e2di_uid_high
#define i_e2fs_gid_high i_din.e2fs_din->e2di_gid_high
Home |
Main Index |
Thread Index |
Old Index