Update of /cvsroot/linux-vax/kernel-2.5/fs/ods2
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7270
Modified Files:
ods2.h util.c
Log Message:
- Random stuff...
Index: util.c
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.5/fs/ods2/util.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- util.c 22 Sep 2004 07:14:35 -0000 1.8
+++ util.c 22 Sep 2004 09:13:39 -0000 1.9
@@ -97,6 +97,7 @@
u16 size = 0;
switch (fm2p->u1.fm1.fm2_v_format) {
+ /* FIXME: Use defines */
case 0: size = 1; break;
case 1: cnt = fm2p->u1.fm1.fm2_b_count1; lbn = (fm2p->u1.fm1.fm2_v_highlbn << 16) | fm2p->u1.fm1.fm2_w_lowlbn; size = 2; break;
case 2: cnt = fm2p->u1.fm2.fm2_v_count2; lbn = (le16_to_cpu(fm2p->u1.fm2.fm2_l_lbn2[1]) << 16) | le16_to_cpu(fm2p->u1.fm2.fm2_l_lbn2[0]); size = 3; break;
@@ -160,8 +161,7 @@
u32 lbn;
if ((lbn = vbn2lbn(sb, ods2fhp->map, vbn)) > 0) {
-
- if (ods2filep->bhp == NULL || GETBLKNO(sb, lbn) != ods2filep->bhp->b_blocknr) {
+ if (!ods2filep->bhp || GETBLKNO(sb, lbn) != ods2filep->bhp->b_blocknr) {
brelse(ods2filep->bhp);
ods2filep->bhp = NULL;
if ((ods2filep->bhp = sb_bread(sb, GETBLKNO(sb, lbn))) != NULL) {
@@ -176,6 +176,7 @@
}
}
}
+
return NULL;
}
@@ -208,12 +209,14 @@
* as well as for files created 1992 and 2003.
*
* FIXME: Needs 2.4.x i_[cma]time -> 2.6.x i_[cma]time porting!!!
+ * FIXME: "u16 *vms_timestamp" is an array in real life, which gets
+ * casted to a u64 later on...
*/
time_t
vms2unix_sec (u16 *vms_timestamp)
{
printk (KERN_ERR "%s probably isn't yet correct, because it uses 2.4.x style i_[mca]time!\n", __FUNCTION__);
- return ((u64)div64((le64_to_cpu(*(u64 *)&(vms_timestamp)) - 0x007c953d63a19980L) >> 7, 78125) + 2);
+ return (u64)div64((le64_to_cpu(*(u64 *)&(vms_timestamp)) - 0x007c953d63a19980L) >> 7, 78125) + 2;
}
long
Index: ods2.h
===================================================================
RCS file: /cvsroot/linux-vax/kernel-2.5/fs/ods2/ods2.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- ods2.h 22 Sep 2004 06:27:17 -0000 1.8
+++ ods2.h 22 Sep 2004 09:13:39 -0000 1.9
@@ -18,7 +18,9 @@
/*
* The following structures are defined in the book
- * "VMS File System Internals"
+ * "VMS File System Internals". Also, you can find quite some infos about
+ * the struct layouts at
+ * http://www.pi-net.dyndns.org/conan/sys$common/syslib/sys$lib_c.tlb .
*/
/*
@@ -26,7 +28,6 @@
*/
#define ODS2_SB(sb) (sb->s_fs_info)
-
/*
* This is the home block on a ODS2 disk.
*/
@@ -127,7 +128,7 @@
} u3;
u16 scb_w_writecnt;
char scb_t_volockname[12];
- u16 scb_q_mounttime[4];
+ u16 scb_q_mounttime[4]; // really __int64
u16 scb_w_backrev;
u64 scb_q_genernum;
u8 scb_b_reserved[446];
@@ -141,11 +142,12 @@
struct fi2def {
char fi2_t_filename[20];
u16 fi2_w_revision;
- u16 fi2_q_credate[4];
- u16 fi2_q_revdate[4];
- u16 fi2_q_expdate[4];
- u16 fi2_q_bakdate[4];
- char fi_2_filenameext[66];
+ u16 fi2_q_credate[4]; // really __int64
+ u16 fi2_q_revdate[4]; // really __int64
+ u16 fi2_q_expdate[4]; // really __int64
+ u16 fi2_q_bakdate[4]; // really __int64
+ char fi2_filenameext[66];
+ //char fi2_t_userlabel[80]; // from http://www.pi-net.dyndns.org/conan/sys$common/syslib/sys$lib_c.tlb?key=FI2DEF&title=Library%20/sys$common/syslib/sys$lib_c.tlb&referer=
};
/*
|