From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,29ee79a4bad3e6f1 X-Google-Attributes: gid111c93,public From: "His Holiness the Reverend Doktor Xenophon Fenderson, the Carbon(d)ated" Subject: Re: Mounting NTFS Date: 1998/04/28 Message-ID: #1/1 X-Deja-AN: 348602113 Sender: xenophon@deneb X-PGP-Key-URL: References: <3544aabc.0@oit.umass.edu> X-Day: Sun, 05 Jul 1998 07:00:00 X-yow: Inside, I'm already SOBBING! Comments: Hyperble mail buttons accepted, v04.01. X-Magic-Chicken: "Well...lucky bunny." X-Home-URL: X-Face: meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow meow X-Linux: Proud user of Linux since August 1994! Organization: First Church of B1FF and BRAK! (Reformed) Warnings-to: econommx@rose-hulman.edu X-Attribution: XF X-PGP-Key-ID: Length=1024; ID=0x44C9F871; Fprint="0F EF 86 8F 6C AB 19 63 E8 D7 A6 98 86 34 C2 DD" Reply-To: econommx@rose-hulman.edu Newsgroups: comp.os.linux.alpha >>>>> "MG" == Michael Gilbert writes: MG> When I try to mount the NTFS partition (read only, of course), MG> mount reports back that the kernel does not support NTFS. So, MG> what am I forgetting? As already mentioned, NTFS is currently only supported on Intel. I've submitted the following patch to the NTFS maintainer (and the kernel developers mailing list), but it hasn't yet been included in the kernel. I warn you now, I've only done limited testing (in both read-only and read/write modes). It seems to work for me, but I can't guarantee anything (of course). --- linux/fs/ntfs/types.h.orig Sat Mar 28 11:34:36 1998 +++ linux/fs/ntfs/types.h Sat Mar 28 23:07:36 1998 @@ -72,6 +72,64 @@ #define NTFS_PUTS24(p,v) NTFS_PUTU24(p,v) #define NTFS_PUTS32(p,v) NTFS_PUTU32(p,v) +#elif defined(alpha) || defined(__alpha__) + +/* unsigned integral types */ +#ifndef NTFS_INTEGRAL_TYPES +#define NTFS_INTEGRAL_TYPES +typedef unsigned char ntfs_u8; +typedef unsigned short ntfs_u16; +typedef unsigned int ntfs_u32; +typedef unsigned long ntfs_u64; +#endif + +/* unicode character type */ +#ifndef NTFS_WCHAR_T +#define NTFS_WCHAR_T +typedef unsigned short ntfs_wchar_t; +#endif +/* file offset */ +#ifndef NTFS_OFFSET_T +#define NTFS_OFFSET_T +typedef unsigned long ntfs_offset_t; +#endif +/* UTC */ +#ifndef NTFS_TIME64_T +#define NTFS_TIME64_T +typedef unsigned long ntfs_time64_t; +#endif +/* This is really unsigned long long. So we support only volumes up to 2 TB */ +#ifndef NTFS_CLUSTER_T +#define NTFS_CLUSTER_T +typedef unsigned int ntfs_cluster_t; +#endif + +/* Macros reading unsigned integers from a byte pointer */ +/* these should work for all little endian machines */ +#define NTFS_GETU8(p) (*(ntfs_u8*)(p)) +#define NTFS_GETU16(p) (*(ntfs_u16*)(p)) +#define NTFS_GETU24(p) (NTFS_GETU32(p) & 0xFFFFFF) +#define NTFS_GETU32(p) (*(ntfs_u32*)(p)) +#define NTFS_GETU64(p) (*(ntfs_u64*)(p)) + +/* Macros writing unsigned integers */ +#define NTFS_PUTU8(p,v) (*(ntfs_u8*)(p))=(v) +#define NTFS_PUTU16(p,v) (*(ntfs_u16*)(p))=(v) +#define NTFS_PUTU24(p,v) NTFS_PUTU16(p,(v) & 0xFFFF);\ + NTFS_PUTU8(((char*)p)+2,(v)>>16) +#define NTFS_PUTU32(p,v) (*(ntfs_u32*)(p))=(v) +#define NTFS_PUTU64(p,v) (*(ntfs_u64*)(p))=(v) + +/* Macros reading signed integers, returning int */ +#define NTFS_GETS8(p) ((int)(*(char*)(p))) +#define NTFS_GETS16(p) ((int)(*(short*)(p))) +#define NTFS_GETS24(p) (NTFS_GETU24(p) < 0x800000 ? (int)NTFS_GETU24(p) : (int)(NTFS_GETU24(p) | 0xFF000000)) + +#define NTFS_PUTS8(p,v) NTFS_PUTU8(p,v) +#define NTFS_PUTS16(p,v) NTFS_PUTU16(p,v) +#define NTFS_PUTS24(p,v) NTFS_PUTU24(p,v) +#define NTFS_PUTS32(p,v) NTFS_PUTU32(p,v) + #else #error Put your machine description here #endif -- His Holiness the Reverend Doktor Xenophon Fenderson, the Carbon(d)ated Discordian Episkopos of Ambidextrous Thinking and Licensed SubGenius Minister 'Salted Litter' of rhit.gas.stations.bigfoot / mhm 21x16 / K-RAD D00D "I'M SORRY MONKEYBOY, I'M AFRAID YOU CAN'T TOUCH THAT MONOLITH" -MegaHAL