From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 00:41:08 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A5A516A420 for ; Mon, 13 Feb 2006 00:41:08 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms048pub.verizon.net (vms048pub.verizon.net [206.46.252.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00B5843D49 for ; Mon, 13 Feb 2006 00:41:08 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from verizon.net ([141.153.249.154]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IUL00LKIOKHBOI1@vms048.mailsrvcs.net> for arch@freebsd.org; Sun, 12 Feb 2006 18:41:07 -0600 (CST) Date: Sun, 12 Feb 2006 19:41:04 -0500 From: Sergey Babkin Sender: root To: arch@freebsd.org Message-id: <43EFD5A0.83BB82C4@verizon.net> MIME-version: 1.0 X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.7-RELEASE i386) Content-type: text/plain; charset=koi8-r Content-transfer-encoding: 7bit X-Accept-Language: en, ru Cc: Subject: NTFS write support X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: babkin@users.sf.net List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 00:41:08 -0000 Hi, I've finally got Win XP as the second OS on my mahcine. The next thing I've found is that NTFS support still seems to be read-only, and it does not look like anybody is actively working on it. So adding the NTFS write support looks like an interesting project to undertake. Just in case, if anybody working on it already, please let me know. Any kinds of ready pointers to the good docs would be welcome. Or to the existing implementations too (Linux?). -SB From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 02:50:23 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 227ED16A420 for ; Mon, 13 Feb 2006 02:50:23 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id C728B43D45 for ; Mon, 13 Feb 2006 02:50:13 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id k1D2o7H9025428; Sun, 12 Feb 2006 19:50:09 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <43EFF3E2.90001@samsco.org> Date: Sun, 12 Feb 2006 19:50:10 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051230 X-Accept-Language: en-us, en MIME-Version: 1.0 To: babkin@users.sourceforge.net References: <43EFD5A0.83BB82C4@verizon.net> In-Reply-To: <43EFD5A0.83BB82C4@verizon.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org Cc: arch@freebsd.org Subject: Re: NTFS write support X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 02:50:23 -0000 Sergey Babkin wrote: > Hi, > > I've finally got Win XP as the second OS on my mahcine. The next > thing I've found is that NTFS support still seems to be read-only, > and it does not look like anybody is actively working on it. > So adding the NTFS write support looks like an interesting > project to undertake. > > Just in case, if anybody working on it already, please let me know. > Any kinds of ready pointers to the good docs would be welcome. > Or to the existing implementations too (Linux?). > > -SB I'm pretty sure that Microsoft makes the technical details available for NTFS, either from their website or from one of their DDKs. The hardest part is probably in dealing with their journal. Scott From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 07:25:20 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23BB616A420 for ; Mon, 13 Feb 2006 07:25:20 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8DD443D45 for ; Mon, 13 Feb 2006 07:25:19 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k1D7Oa8w031557; Mon, 13 Feb 2006 00:24:39 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 13 Feb 2006 00:24:36 -0700 (MST) Message-Id: <20060213.002436.125826215.imp@bsdimp.com> To: scottl@samsco.org From: "M. Warner Losh" In-Reply-To: <43EFF3E2.90001@samsco.org> References: <43EFD5A0.83BB82C4@verizon.net> <43EFF3E2.90001@samsco.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Mon, 13 Feb 2006 00:24:43 -0700 (MST) Cc: arch@freebsd.org, babkin@users.sourceforge.net Subject: Re: NTFS write support X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 07:25:20 -0000 In message: <43EFF3E2.90001@samsco.org> Scott Long writes: : Sergey Babkin wrote: : > Hi, : > : > I've finally got Win XP as the second OS on my mahcine. The next : > thing I've found is that NTFS support still seems to be read-only, : > and it does not look like anybody is actively working on it. : > So adding the NTFS write support looks like an interesting : > project to undertake. : > : > Just in case, if anybody working on it already, please let me know. : > Any kinds of ready pointers to the good docs would be welcome. : > Or to the existing implementations too (Linux?). : > : > -SB : : I'm pretty sure that Microsoft makes the technical details available : for NTFS, either from their website or from one of their DDKs. The : hardest part is probably in dealing with their journal. There's at least one book on the structure of ntfs. I used to have a copy, but I can't find it anymore... But the book wasn't enough to do an implementation... Warner From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 07:25:42 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45F8516A420; Mon, 13 Feb 2006 07:25:42 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id D280F43D45; Mon, 13 Feb 2006 07:25:41 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k1D7NAqN031556; Mon, 13 Feb 2006 00:23:17 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 13 Feb 2006 00:23:10 -0700 (MST) Message-Id: <20060213.002310.125802352.imp@bsdimp.com> To: ertr1013@student.uu.se From: "M. Warner Losh" In-Reply-To: <20060205220211.GA5151@falcon.midgard.homeip.net> References: <20060205084813.GN21806@wombat.fafoe.narf.at> <867j89n71d.fsf@xps.des.no> <20060205220211.GA5151@falcon.midgard.homeip.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Mon, 13 Feb 2006 00:23:18 -0700 (MST) Cc: des@des.no, stefanf@freebsd.org, arch@freebsd.org Subject: Re: [releng_6 tinderbox] failure on sparc64/sparc64 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 07:25:42 -0000 In message: <20060205220211.GA5151@falcon.midgard.homeip.net> Erik Trulsson writes: : On Sun, Feb 05, 2006 at 04:45:34PM +0100, Dag-Erling Sm=F8rgrav wrote= : : > Stefan Farfeleder writes: : > > On Sat, Feb 04, 2006 at 03:58:56PM -0700, M. Warner Losh wrote: : > > > This driver wants to access these structures as arrays of uint3= 2_t. : > > > It used to cast directly, but that isn't allowed. So, I've pas= sed : > > > the cast through a (void *). Is that allowed? Eg: : > > > = : > > > struct foo foo; : > > > ((uint32_t *)(void *)&foo)[3] =3D 12; : > > > = : > > > is that OK? : > > I'm afraid that only silences the warning without solving the und= erlying : > > problem. I don't think there's a Standard conforming way to trea= t a : > > struct foo as an uint32_t array. : > = : > A union should do the trick. : = : No, it will not. If you have a struct foo and try to access it as an= array : of int, the program will have unspecified (and maybe even undefined) : behaviour. It does not matter if you do it with a union or by castin= g : pointers. : = : In general, if you have an object of type X, then the only ways it ca= n be : accessed is either as an object of type X, or as an array of [unsigne= d] : char. = So the proper fix for the above code is: struct foo foo; uint32_t value[sizeof(foo) / sizeof(uint32_t)]; memcpy(value, &foo); // write out value one 32-bit word at a time Is that right? Or at least 'proper' here means defined. Warner = = From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 08:23:49 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6DCAC16A420; Mon, 13 Feb 2006 08:23:49 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B2E243D48; Mon, 13 Feb 2006 08:23:48 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) (authenticated bits=128) by igloo.linux.gr (8.13.5/8.13.5/Debian-3) with ESMTP id k1D8Lkbk025024 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 13 Feb 2006 10:21:48 +0200 Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id k1D8Lff5016649; Mon, 13 Feb 2006 10:21:41 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id k1D8LU07016608; Mon, 13 Feb 2006 10:21:30 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 13 Feb 2006 10:21:29 +0200 From: Giorgos Keramidas To: "M. Warner Losh" Message-ID: <20060213082129.GA13997@flame.pc> References: <20060205084813.GN21806@wombat.fafoe.narf.at> <867j89n71d.fsf@xps.des.no> <20060205220211.GA5151@falcon.midgard.homeip.net> <20060213.002310.125802352.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060213.002310.125802352.imp@bsdimp.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.353, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.85, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr Cc: arch@freebsd.org, stefanf@freebsd.org, des@des.no Subject: Re: [releng_6 tinderbox] failure on sparc64/sparc64 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 08:23:49 -0000 On 2006-02-13 00:23, "M. Warner Losh" wrote: > In message: <20060205220211.GA5151@falcon.midgard.homeip.net> > Erik Trulsson writes: > : On Sun, Feb 05, 2006 at 04:45:34PM +0100, Dag-Erling Sm?rgrav wrote: > : > Stefan Farfeleder writes: > : > > On Sat, Feb 04, 2006 at 03:58:56PM -0700, M. Warner Losh wrote: > : > > > This driver wants to access these structures as arrays of uint32_t. > : > > > It used to cast directly, but that isn't allowed. So, I've passed > : > > > the cast through a (void *). Is that allowed? Eg: > : > > > > : > > > struct foo foo; > : > > > ((uint32_t *)(void *)&foo)[3] = 12; > : > > > > : > > > is that OK? > : > > I'm afraid that only silences the warning without solving the underlying > : > > problem. I don't think there's a Standard conforming way to treat a > : > > struct foo as an uint32_t array. > : > > : > A union should do the trick. > : > : No, it will not. If you have a struct foo and try to access it as an array > : of int, the program will have unspecified (and maybe even undefined) > : behaviour. It does not matter if you do it with a union or by casting > : pointers. > : > : In general, if you have an object of type X, then the only ways it can be > : accessed is either as an object of type X, or as an array of [unsigned] > : char. > > So the proper fix for the above code is: > > struct foo foo; > uint32_t value[sizeof(foo) / sizeof(uint32_t)]; > > memcpy(value, &foo); > // write out value one 32-bit word at a time > > Is that right? Or at least 'proper' here means defined. AFAIK, yes. From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 08:34:31 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E78DC16A420; Mon, 13 Feb 2006 08:34:31 +0000 (GMT) (envelope-from cperciva@freebsd.org) Received: from pd4mo2so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 766D143D46; Mon, 13 Feb 2006 08:34:31 +0000 (GMT) (envelope-from cperciva@freebsd.org) Received: from pd4mr4so.prod.shaw.ca (pd4mr4so-qfe3.prod.shaw.ca [10.0.141.215]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IUM00A1IAHI2W40@l-daemon>; Mon, 13 Feb 2006 01:34:30 -0700 (MST) Received: from pn2ml3so.prod.shaw.ca ([10.0.121.147]) by pd4mr4so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IUM001QRAHIBE90@pd4mr4so.prod.shaw.ca>; Mon, 13 Feb 2006 01:34:30 -0700 (MST) Received: from [192.168.0.60] ([24.82.18.31]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IUM00H1PAHHHV30@l-daemon>; Mon, 13 Feb 2006 01:34:30 -0700 (MST) Date: Mon, 13 Feb 2006 00:34:28 -0800 From: Colin Percival In-reply-to: <20060213082129.GA13997@flame.pc> To: Giorgos Keramidas Message-id: <43F04494.4030900@freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Enigmail-Version: 0.94.0.0 References: <20060205084813.GN21806@wombat.fafoe.narf.at> <867j89n71d.fsf@xps.des.no> <20060205220211.GA5151@falcon.midgard.homeip.net> <20060213.002310.125802352.imp@bsdimp.com> <20060213082129.GA13997@flame.pc> User-Agent: Thunderbird 1.5 (X11/20060112) Cc: arch@freebsd.org, stefanf@freebsd.org, des@des.no Subject: Re: [releng_6 tinderbox] failure on sparc64/sparc64 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 08:34:32 -0000 Giorgos Keramidas wrote: > On 2006-02-13 00:23, "M. Warner Losh" wrote: >> struct foo foo; >> uint32_t value[sizeof(foo) / sizeof(uint32_t)]; >> >> memcpy(value, &foo); >> // write out value one 32-bit word at a time >> >> Is that right? Or at least 'proper' here means defined. > > AFAIK, yes. I agree that the behaviour of the above code is defined, but I'd be much happier if value[] was defined to be an array of length ((sizeof(foo) - 1) / sizeof(uint32_t) + 1), just in case sizeof(foo) happens to not be a multiple of 4. :-) Colin Percival From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 08:48:38 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3769516A420; Mon, 13 Feb 2006 08:48:38 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D99D43D64; Mon, 13 Feb 2006 08:48:30 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) (authenticated bits=128) by igloo.linux.gr (8.13.5/8.13.5/Debian-3) with ESMTP id k1D8mC9e027694 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 13 Feb 2006 10:48:13 +0200 Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id k1D8m3wP060279; Mon, 13 Feb 2006 10:48:03 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id k1D8m3MK060259; Mon, 13 Feb 2006 10:48:03 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 13 Feb 2006 10:48:02 +0200 From: Giorgos Keramidas To: Colin Percival Message-ID: <20060213084802.GA53779@flame.pc> References: <20060205084813.GN21806@wombat.fafoe.narf.at> <867j89n71d.fsf@xps.des.no> <20060205220211.GA5151@falcon.midgard.homeip.net> <20060213.002310.125802352.imp@bsdimp.com> <20060213082129.GA13997@flame.pc> <43F04494.4030900@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43F04494.4030900@freebsd.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.354, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.84, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr Cc: arch@freebsd.org, stefanf@freebsd.org, des@des.no Subject: Re: [releng_6 tinderbox] failure on sparc64/sparc64 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 08:48:38 -0000 On 2006-02-13 00:34, Colin Percival wrote: >Giorgos Keramidas wrote: >> On 2006-02-13 00:23, "M. Warner Losh" wrote: >>> struct foo foo; >>> uint32_t value[sizeof(foo) / sizeof(uint32_t)]; >>> >>> memcpy(value, &foo); >>> // write out value one 32-bit word at a time >>> >>> Is that right? Or at least 'proper' here means defined. >> >> AFAIK, yes. > > I agree that the behaviour of the above code is defined, but > I'd be much happier if value[] was defined to be an array of > length ((sizeof(foo) - 1) / sizeof(uint32_t) + 1), just in > case sizeof(foo) happens to not be a multiple of 4. :-) Good thinking. It's probably a good idea to avoid copying random garbage, and using something like: struct foo foo; uint32_t value[sizeof(uint32_t) * (sizeof(foo) / sizeof(uint32_t) + 1)]; and then copying only sizeof(foo) bytes. This is probably defined too and won't allow overflowing of value[], but I don't really want to know what it does on machines of varying endianess :-) - Giorgos From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 08:50:30 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3379216A420 for ; Mon, 13 Feb 2006 08:50:30 +0000 (GMT) (envelope-from rik@inse.ru) Received: from mail.inse.ru (inse.ru [144.206.128.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0134D43D4C for ; Mon, 13 Feb 2006 08:50:27 +0000 (GMT) (envelope-from rik@inse.ru) Received: from inse.ru (www.inse.ru [144.206.128.1]) by mail.inse.ru (Postfix) with ESMTP id 211CE33C46; Mon, 13 Feb 2006 11:50:26 +0300 (MSK) Message-ID: <43F04891.5030208@inse.ru> Date: Mon, 13 Feb 2006 11:51:29 +0300 From: Roman Kurakin User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.2.1) Gecko/20030426 X-Accept-Language: ru-ru, en MIME-Version: 1.0 To: babkin@users.sf.net References: <43EFD5A0.83BB82C4@verizon.net> In-Reply-To: <43EFD5A0.83BB82C4@verizon.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org Subject: Re: NTFS write support X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 08:50:30 -0000 Sergey Babkin: >Hi, > >I've finally got Win XP as the second OS on my mahcine. The next >thing I've found is that NTFS support still seems to be read-only, >and it does not look like anybody is actively working on it. >So adding the NTFS write support looks like an interesting >project to undertake. > >Just in case, if anybody working on it already, please let me know. >Any kinds of ready pointers to the good docs would be welcome. >Or to the existing implementations too (Linux?). > IIRC Linux has write support but code marked as "NEW" and thus not stable. As for me, I solved that problem by setting up FreeBSD and Win on separate machines. I've done this after interference between ntloader and sysinstall. rik > >-SB >_______________________________________________ >freebsd-arch@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-arch >To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" > > From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 09:28:42 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DEE6716A420 for ; Mon, 13 Feb 2006 09:28:42 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from www.ebusiness-leidinger.de (jojo.ms-net.de [84.16.236.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0873143D45 for ; Mon, 13 Feb 2006 09:28:41 +0000 (GMT) (envelope-from Alexander@Leidinger.net) Received: from Andro-Beta.Leidinger.net (p54A5E398.dip.t-dialin.net [84.165.227.152]) (authenticated bits=0) by www.ebusiness-leidinger.de (8.13.1/8.13.1) with ESMTP id k1D9GlMb025098; Mon, 13 Feb 2006 10:16:47 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from localhost (localhost [127.0.0.1]) by Andro-Beta.Leidinger.net (8.13.3/8.13.3) with ESMTP id k1D9SdUg072318; Mon, 13 Feb 2006 10:28:39 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Mon, 13 Feb 2006 10:28:38 +0100 Message-ID: <20060213102838.dhh4oj41ogs8gk0o@netchild.homeip.net> X-Priority: 3 (Normal) Date: Mon, 13 Feb 2006 10:28:38 +0100 From: Alexander Leidinger To: babkin@users.sourceforge.net References: <43EFD5A0.83BB82C4@verizon.net> In-Reply-To: <43EFD5A0.83BB82C4@verizon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.0.3) / FreeBSD-4.11 X-Virus-Scanned: by amavisd-new Cc: arch@freebsd.org Subject: Re: NTFS write support X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 09:28:43 -0000 Sergey Babkin wrote: > Hi, > > I've finally got Win XP as the second OS on my mahcine. The next > thing I've found is that NTFS support still seems to be read-only, > and it does not look like anybody is actively working on it. > So adding the NTFS write support looks like an interesting > project to undertake. > > Just in case, if anybody working on it already, please let me know. > Any kinds of ready pointers to the good docs would be welcome. > Or to the existing implementations too (Linux?). Have a look at the "fuse" port. There's ntfs support for fuse somewhere in ports too. Having a better native ntfs would be great, but beware, don't contaminate the current code with GPLed code. Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 Vegeterians beware! You are what you eat. From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 09:38:54 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC4AF16A420; Mon, 13 Feb 2006 09:38:54 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from mail18.syd.optusnet.com.au (mail18.syd.optusnet.com.au [211.29.132.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 96DD143D46; Mon, 13 Feb 2006 09:38:53 +0000 (GMT) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-19-236.belrs4.nsw.optusnet.com.au [220.239.19.236]) by mail18.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id k1D9cZ5G023458 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 13 Feb 2006 20:38:36 +1100 Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.4/8.13.4) with ESMTP id k1D9cZBf001396; Mon, 13 Feb 2006 20:38:35 +1100 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.4/8.13.4/Submit) id k1D9cY3n001395; Mon, 13 Feb 2006 20:38:34 +1100 (EST) (envelope-from peter) Date: Mon, 13 Feb 2006 20:38:34 +1100 From: Peter Jeremy To: Giorgos Keramidas Message-ID: <20060213093833.GB705@turion.vk2pj.dyndns.org> References: <20060205084813.GN21806@wombat.fafoe.narf.at> <867j89n71d.fsf@xps.des.no> <20060205220211.GA5151@falcon.midgard.homeip.net> <20060213.002310.125802352.imp@bsdimp.com> <20060213082129.GA13997@flame.pc> <43F04494.4030900@freebsd.org> <20060213084802.GA53779@flame.pc> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060213084802.GA53779@flame.pc> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.11 Cc: arch@freebsd.org, stefanf@freebsd.org, Colin Percival , des@des.no Subject: Re: [releng_6 tinderbox] failure on sparc64/sparc64 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 09:38:54 -0000 On Mon, 2006-Feb-13 10:48:02 +0200, Giorgos Keramidas wrote: >Good thinking. It's probably a good idea to avoid copying random >garbage, and using something like: > > struct foo foo; > uint32_t value[sizeof(uint32_t) * (sizeof(foo) / sizeof(uint32_t) + 1)]; That makes it about 4 times too large - you don't need to multiply by sizeof(uint32_t). >and then copying only sizeof(foo) bytes. And zeroing any remaining bytes to prevent uninitialised data leaking out of the kernel. >and won't allow overflowing of value[], but I don't really want to know >what it does on machines of varying endianess :-) No worse than trying to write (uint32_t *)&foo; BTW, the compiler is free to insert padding bytes into struct foo so it would need to be explicitly zeroed and then the required fields individually copied in. -- Peter Jeremy From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 09:41:13 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36CDD16A420; Mon, 13 Feb 2006 09:41:13 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id A552543D45; Mon, 13 Feb 2006 09:41:11 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) (authenticated bits=128) by igloo.linux.gr (8.13.5/8.13.5/Debian-3) with ESMTP id k1D9esWX032544 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 13 Feb 2006 11:40:56 +0200 Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id k1D9emrN043323; Mon, 13 Feb 2006 11:40:48 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id k1D9em4K043310; Mon, 13 Feb 2006 11:40:48 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Mon, 13 Feb 2006 11:40:47 +0200 From: Giorgos Keramidas To: Peter Jeremy Message-ID: <20060213094047.GA42056@flame.pc> References: <20060205084813.GN21806@wombat.fafoe.narf.at> <867j89n71d.fsf@xps.des.no> <20060205220211.GA5151@falcon.midgard.homeip.net> <20060213.002310.125802352.imp@bsdimp.com> <20060213082129.GA13997@flame.pc> <43F04494.4030900@freebsd.org> <20060213084802.GA53779@flame.pc> <20060213093833.GB705@turion.vk2pj.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060213093833.GB705@turion.vk2pj.dyndns.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.354, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.84, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr Cc: arch@freebsd.org, stefanf@freebsd.org, Colin Percival , des@des.no Subject: Re: [releng_6 tinderbox] failure on sparc64/sparc64 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 09:41:13 -0000 On 2006-02-13 20:38, Peter Jeremy wrote: > On Mon, 2006-Feb-13 10:48:02 +0200, Giorgos Keramidas wrote: > >Good thinking. It's probably a good idea to avoid copying random > >garbage, and using something like: > > > > struct foo foo; > > uint32_t value[sizeof(uint32_t) * (sizeof(foo) / sizeof(uint32_t) + 1)]; > > That makes it about 4 times too large - you don't need to multiply by > sizeof(uint32_t). Ugh! Yes, you're right of course :) From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 14:35:41 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B621516A420 for ; Mon, 13 Feb 2006 14:35:41 +0000 (GMT) (envelope-from pfgshield-freebsd@yahoo.com) Received: from web32909.mail.mud.yahoo.com (web32909.mail.mud.yahoo.com [68.142.206.56]) by mx1.FreeBSD.org (Postfix) with SMTP id 407B243D5F for ; Mon, 13 Feb 2006 14:35:40 +0000 (GMT) (envelope-from pfgshield-freebsd@yahoo.com) Received: (qmail 20284 invoked by uid 60001); 13 Feb 2006 14:35:40 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Reply-To:Subject:To:Cc:MIME-Version:Content-Type; b=SMQIX++E4v82/b9uwwjE2taMbERlcerMg5DCJCIbVyl8UaI3qIyA+3Gp1z+2gXE6HAJ5x3eIasGFL6jlDX2r96VR4MkDMqvTin53HCqebGYafY3jlSfAs/WDW6IOpNdFyU0JTRHVlsYFYBg+Z6x/zOLBSskjxxcxDwV6aE5rmv0= ; Message-ID: <20060213143540.20282.qmail@web32909.mail.mud.yahoo.com> Received: from [200.118.61.157] by web32909.mail.mud.yahoo.com via HTTP; Mon, 13 Feb 2006 15:35:40 CET Date: Mon, 13 Feb 2006 15:35:40 +0100 (CET) From: To: Sergey Babkin MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Cc: arch@freebsd.org Subject: Re: NTFS write support X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pfgshield-freebsd@yahoo.com List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 14:35:41 -0000 Hi; I think ntfsprogs (in the ports tree) does everything in userland, and they claim to have stable write support. The homepage is here: http://www.linux-ntfs.org/ They also have some documentation there. FWIW... I used Qtparted, a graphical ntfsresize tool, from a linux liveCD to open space from my Windows XP partition, After installing FreeBSD I found a beta, but BSD licensed, UFS implementation for Windows that has read-only support. cheers, Pedro. --- Pedro F. Giffuni M. Sc. Industrial Eng. University of Pittsburgh Mech. Eng. Universidad Nacional de Colombia --- Yahoo is powered by FreeBSD http://www.FreeBSD.org/ ___________________________________ Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive http://it.messenger.yahoo.com From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 14:53:10 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EBA4016A420 for ; Mon, 13 Feb 2006 14:53:10 +0000 (GMT) (envelope-from fjoe@neo.samodelkin.net) Received: from neo.samodelkin.net (samodelkin.net [195.62.0.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 81B7343D45 for ; Mon, 13 Feb 2006 14:53:10 +0000 (GMT) (envelope-from fjoe@neo.samodelkin.net) Received: by neo.samodelkin.net (Postfix, from userid 1000) id 91D9E17019; Mon, 13 Feb 2006 20:53:19 +0600 (NOVT) Date: Mon, 13 Feb 2006 20:53:19 +0600 From: Max Khon To: babkin@users.sf.net Message-ID: <20060213145319.GA49659@samodelkin.net> References: <43EFD5A0.83BB82C4@verizon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43EFD5A0.83BB82C4@verizon.net> User-Agent: Mutt/1.4.2i Cc: arch@freebsd.org Subject: Re: NTFS write support X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 14:53:11 -0000 Hi! On Sun, Feb 12, 2006 at 07:41:04PM -0500, Sergey Babkin wrote: > I've finally got Win XP as the second OS on my mahcine. The next > thing I've found is that NTFS support still seems to be read-only, > and it does not look like anybody is actively working on it. > So adding the NTFS write support looks like an interesting > project to undertake. > > Just in case, if anybody working on it already, please let me know. > Any kinds of ready pointers to the good docs would be welcome. > Or to the existing implementations too (Linux?). http://www.jankratochvil.net/project/captive/ /fjoe From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 15:18:37 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D79316A420 for ; Mon, 13 Feb 2006 15:18:37 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms048pub.verizon.net (vms048pub.verizon.net [206.46.252.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A5A343D58 for ; Mon, 13 Feb 2006 15:18:36 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms070.mailsrvcs.net ([192.168.1.3]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IUM00L6ZT6ZBRN3@vms048.mailsrvcs.net> for arch@freebsd.org; Mon, 13 Feb 2006 09:18:35 -0600 (CST) Date: Mon, 13 Feb 2006 09:18:35 -0600 (CST) From: Sergey Babkin To: pfgshield-freebsd@yahoo.com, Sergey Babkin Message-id: <28062617.1139843915176.JavaMail.root@vms070.mailsrvcs.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit Cc: arch@freebsd.org Subject: Re: Re: NTFS write support X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: babkin@users.sf.net List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 15:18:37 -0000 >From: pfgshield-freebsd@yahoo.com > >I think ntfsprogs (in the ports tree) does everything in userland, and they >claim to have stable write support. The homepage is here: > http://www.linux-ntfs.org/ >They also have some documentation there. They also have some docs. Not very readable but seems to have quite a few details. Time to do some reading. Thanks, everyone! -SB From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 16:46:49 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 88E8316A420; Mon, 13 Feb 2006 16:46:49 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31C0243D49; Mon, 13 Feb 2006 16:46:48 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k1DGhb3i040344; Mon, 13 Feb 2006 09:43:37 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 13 Feb 2006 09:43:36 -0700 (MST) Message-Id: <20060213.094336.118368793.imp@bsdimp.com> To: cperciva@freebsd.org From: "M. Warner Losh" In-Reply-To: <43F04494.4030900@freebsd.org> References: <20060213.002310.125802352.imp@bsdimp.com> <20060213082129.GA13997@flame.pc> <43F04494.4030900@freebsd.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Mon, 13 Feb 2006 09:43:37 -0700 (MST) Cc: keramida@ceid.upatras.gr, arch@freebsd.org, stefanf@freebsd.org, des@des.no Subject: Re: [releng_6 tinderbox] failure on sparc64/sparc64 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 16:46:49 -0000 In message: <43F04494.4030900@freebsd.org> Colin Percival writes: : Giorgos Keramidas wrote: : > On 2006-02-13 00:23, "M. Warner Losh" wrote: : >> struct foo foo; : >> uint32_t value[sizeof(foo) / sizeof(uint32_t)]; : >> : >> memcpy(value, &foo); : >> // write out value one 32-bit word at a time : >> : >> Is that right? Or at least 'proper' here means defined. : > : > AFAIK, yes. : : I agree that the behaviour of the above code is defined, but : I'd be much happier if value[] was defined to be an array of : length ((sizeof(foo) - 1) / sizeof(uint32_t) + 1), just in : case sizeof(foo) happens to not be a multiple of 4. :-) It won't matter given how I'm going to fix this problem... Warner From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 16:56:50 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB66016A420 for ; Mon, 13 Feb 2006 16:56:50 +0000 (GMT) (envelope-from fjoe@neo.samodelkin.net) Received: from neo.samodelkin.net (samodelkin.net [195.62.0.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B77643D53 for ; Mon, 13 Feb 2006 16:56:50 +0000 (GMT) (envelope-from fjoe@neo.samodelkin.net) Received: by neo.samodelkin.net (Postfix, from userid 1000) id E718117019; Mon, 13 Feb 2006 22:56:59 +0600 (NOVT) Date: Mon, 13 Feb 2006 22:56:59 +0600 From: Max Khon To: babkin@users.sf.net Message-ID: <20060213165659.GB49659@samodelkin.net> References: <28062617.1139843915176.JavaMail.root@vms070.mailsrvcs.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <28062617.1139843915176.JavaMail.root@vms070.mailsrvcs.net> User-Agent: Mutt/1.4.2i Cc: arch@freebsd.org, pfgshield-freebsd@yahoo.com, Sergey Babkin Subject: Re: Re: NTFS write support X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 16:56:50 -0000 Hi! On Mon, Feb 13, 2006 at 09:18:35AM -0600, Sergey Babkin wrote: > >I think ntfsprogs (in the ports tree) does everything in userland, and they > >claim to have stable write support. The homepage is here: > > http://www.linux-ntfs.org/ > >They also have some documentation there. > > They also have some docs. Not very readable but seems to have > quite a few details. Time to do some reading. My opinion is that from-scratch implementation is not possible within reasonable period of time. I'd suggest to try to port captive ntfs + fuse framework or (oh my! I did not tell you that) extend ndisulator so that it is possible to load ntfs.sys directly into the kernel. /fjoe From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 17:02:08 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 991C816A420 for ; Mon, 13 Feb 2006 17:02:08 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms042pub.verizon.net (vms042pub.verizon.net [206.46.252.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A14143D79 for ; Mon, 13 Feb 2006 17:02:06 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms172.mailsrvcs.net ([192.168.1.1]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IUM00J37XZHDKA0@vms042.mailsrvcs.net> for arch@freebsd.org; Mon, 13 Feb 2006 11:02:05 -0600 (CST) Date: Mon, 13 Feb 2006 11:02:05 -0600 (CST) From: Sergey Babkin To: Max Khon , babkin@users.sf.net Message-id: <28971430.1139850125662.JavaMail.root@vms172.mailsrvcs.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit Cc: arch@freebsd.org Subject: Re: Re: NTFS write support X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: babkin@users.sf.net List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 17:02:08 -0000 >From: Max Khon >On Sun, Feb 12, 2006 at 07:41:04PM -0500, Sergey Babkin wrote: > >> I've finally got Win XP as the second OS on my mahcine. The next >> thing I've found is that NTFS support still seems to be read-only, >> and it does not look like anybody is actively working on it. >> So adding the NTFS write support looks like an interesting >> project to undertake. >> >> Just in case, if anybody working on it already, please let me know. >> Any kinds of ready pointers to the good docs would be welcome. >> Or to the existing implementations too (Linux?). > >http://www.jankratochvil.net/project/captive/ Interesting. Though I'm pretty sure that MS is going to object strongly to any usage of their drivers outside of their OS. Donwload it quickly before the MS lawyers have shown up. -SB From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 17:22:15 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B696C16A420 for ; Mon, 13 Feb 2006 17:22:15 +0000 (GMT) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (ns1.jnielsen.net [69.55.238.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id 95DAF43D5F for ; Mon, 13 Feb 2006 17:22:05 +0000 (GMT) (envelope-from lists@jnielsen.net) Received: from localhost (jn@ns1 [69.55.238.237]) (authenticated bits=0) by ns1.jnielsen.net (8.12.9p2/8.12.9) with ESMTP id k1DHM3r5095498; Mon, 13 Feb 2006 09:22:05 -0800 (PST) (envelope-from lists@jnielsen.net) From: John Nielsen To: freebsd-arch@freebsd.org, babkin@users.sourceforge.net Date: Mon, 13 Feb 2006 12:20:07 -0500 User-Agent: KMail/1.9.1 References: <28971430.1139850125662.JavaMail.root@vms172.mailsrvcs.net> In-Reply-To: <28971430.1139850125662.JavaMail.root@vms172.mailsrvcs.net> X-Face: #X5#Y*q>F:]zT!DegL3z5Xo'^MN[$8k\[4^3rN~wm=s=Uw(sW}R?3b^*f1Wu*.<=?utf-8?q?of=5F4NrS=0A=09P*M/9CpxDo!D6?=)IY1w<9B1jB; tBQf[RU-R<,I)e"$q7N7 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200602131220.07879.lists@jnielsen.net> X-Virus-Scanned: ClamAV version 0.87.1, clamav-milter version 0.87 on ns1.jnielsen.net X-Virus-Status: Clean Cc: Max Khon Subject: Re: NTFS write support X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 17:22:15 -0000 On Monday 13 February 2006 12:02, Sergey Babkin wrote: > >From: Max Khon > > > >On Sun, Feb 12, 2006 at 07:41:04PM -0500, Sergey Babkin wrote: > >> I've finally got Win XP as the second OS on my mahcine. The next > >> thing I've found is that NTFS support still seems to be read-only, > >> and it does not look like anybody is actively working on it. > >> So adding the NTFS write support looks like an interesting > >> project to undertake. > >> > >> Just in case, if anybody working on it already, please let me know. > >> Any kinds of ready pointers to the good docs would be welcome. > >> Or to the existing implementations too (Linux?). > > > >http://www.jankratochvil.net/project/captive/ > > Interesting. Though I'm pretty sure that MS is going to object > strongly to any usage of their drivers outside of their OS. > Donwload it quickly before the MS lawyers have shown up. Captive NTFS doesn't actually include any ntfs drivers. The user must supply their own copy (presumably obtained through legitimate means) which the captive framework then uses. JN From owner-freebsd-arch@FreeBSD.ORG Mon Feb 13 19:07:07 2006 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D12A16A420 for ; Mon, 13 Feb 2006 19:07:07 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms040pub.verizon.net (vms040pub.verizon.net [206.46.252.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 773DD43D55 for ; Mon, 13 Feb 2006 19:07:06 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms064.mailsrvcs.net ([192.168.1.1]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IUN001GQ3RLKPQ0@vms040.mailsrvcs.net> for freebsd-arch@freebsd.org; Mon, 13 Feb 2006 13:06:57 -0600 (CST) Date: Mon, 13 Feb 2006 13:06:57 -0600 (CST) From: Sergey Babkin To: John Nielsen , freebsd-arch@freebsd.org, babkin@users.sourceforge.net Message-id: <33349353.1139857617449.JavaMail.root@vms064.mailsrvcs.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit Cc: Max Khon Subject: Re: Re: NTFS write support X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: babkin@users.sf.net List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2006 19:07:07 -0000 >From: John Nielsen >> >http://www.jankratochvil.net/project/captive/ >> >> Interesting. Though I'm pretty sure that MS is going to object >> strongly to any usage of their drivers outside of their OS. >> Donwload it quickly before the MS lawyers have shown up. > >Captive NTFS doesn't actually include any ntfs drivers. The user must supply >their own copy (presumably obtained through legitimate means) which the >captive framework then uses. Well, the problem is that the Microsoft's position is going to be that there are no such legitimate means. It's quite a popular belief among the software licensing lawyers nowadays. AFAIK it has not been tested in court, but do you have enough money to afford a lawsuit with Microsoft? -SB From owner-freebsd-arch@FreeBSD.ORG Tue Feb 14 01:04:49 2006 Return-Path: X-Original-To: arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5507B16A420; Tue, 14 Feb 2006 01:04:49 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CE4843D55; Tue, 14 Feb 2006 01:04:47 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87]) by mailout2.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id k1E149h1005575; Tue, 14 Feb 2006 12:04:12 +1100 Received: from epsplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailproxy2.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id k1E1424M031581; Tue, 14 Feb 2006 12:04:03 +1100 Date: Tue, 14 Feb 2006 12:04:02 +1100 (EST) From: Bruce Evans X-X-Sender: bde@epsplex.bde.org To: "M. Warner Losh" In-Reply-To: <20060213.094336.118368793.imp@bsdimp.com> Message-ID: <20060214083530.K22079@epsplex.bde.org> References: <20060213.002310.125802352.imp@bsdimp.com> <20060213082129.GA13997@flame.pc> <43F04494.4030900@freebsd.org> <20060213.094336.118368793.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: keramida@ceid.upatras.gr, arch@FreeBSD.org, stefanf@FreeBSD.org, cperciva@FreeBSD.org, des@des.no Subject: Re: [releng_6 tinderbox] failure on sparc64/sparc64 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2006 01:04:49 -0000 [Someone wrote that certain accesses except via unsigned char are undefined.] On Mon, 13 Feb 2006, M. Warner Losh wrote: > In message: <43F04494.4030900@freebsd.org> > Colin Percival writes: > : Giorgos Keramidas wrote: > : > On 2006-02-13 00:23, "M. Warner Losh" wrote: > : >> struct foo foo; > : >> uint32_t value[sizeof(foo) / sizeof(uint32_t)]; > : >> > : >> memcpy(value, &foo); > : >> // write out value one 32-bit word at a time > : >> > : >> Is that right? Or at least 'proper' here means defined. > : > > : > AFAIK, yes. > : > : I agree that the behaviour of the above code is defined, but > : I'd be much happier if value[] was defined to be an array of > : length ((sizeof(foo) - 1) / sizeof(uint32_t) + 1), just in > : case sizeof(foo) happens to not be a multiple of 4. :-) The behaviour of the above code is highly undefined. There is no `size' arg in the call to memcpy(), and fixing this alone leaves various bugs and a complicated analysis to show that the behaviour is not completely undefined. The C standard only explicitly defines copying from an object _to_ an array of unsigned char. That copying back doesn't give undefined behaviour is only implicitly defined. The above is much further from being explictly defined since it copies essentially random bits _from_ a nameless intermediate array of unsigned char to another object. The behaviour would certainly be undefined for most types of final object since there may be trap bits in the final object, or it might just be implementation defined and not what is wanted because there are non-trap padding bits in the final object. However, uint32_t doesn't have any padding bits, so it may be possible to show that the behaviour of accessing the final object is defined (and useful). I think this is equivalent to showing that the behaviour of the following is defined: auto uint32_t value; value = 0; /* undefined without this? */ memset(&value, random(), 1); value++; > It won't matter given how I'm going to fix this problem... Why not just access the object as an array of unsigned chars as someone wrote? Write it out 1 unsigned char at a time for the simple version. This avoids the complications. Bruce From owner-freebsd-arch@FreeBSD.ORG Tue Feb 14 01:25:46 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 774E416A420 for ; Tue, 14 Feb 2006 01:25:46 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id B1BDC43D55 for ; Tue, 14 Feb 2006 01:25:45 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id k1E1PgwY032424; Mon, 13 Feb 2006 18:25:43 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <43F1319B.5020302@samsco.org> Date: Mon, 13 Feb 2006 18:25:47 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20051230 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Max Khon References: <28062617.1139843915176.JavaMail.root@vms070.mailsrvcs.net> <20060213165659.GB49659@samodelkin.net> In-Reply-To: <20060213165659.GB49659@samodelkin.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on pooker.samsco.org Cc: arch@freebsd.org, babkin@users.sourceforge.net, Sergey Babkin , pfgshield-freebsd@yahoo.com Subject: Re: NTFS write support X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2006 01:25:46 -0000 Max Khon wrote: > Hi! > > On Mon, Feb 13, 2006 at 09:18:35AM -0600, Sergey Babkin wrote: > > >>>I think ntfsprogs (in the ports tree) does everything in userland, and they >>>claim to have stable write support. The homepage is here: >>> http://www.linux-ntfs.org/ >>>They also have some documentation there. >> >>They also have some docs. Not very readable but seems to have >>quite a few details. Time to do some reading. > > > My opinion is that from-scratch implementation is not possible within > reasonable period of time. I'd suggest to try to port captive ntfs + fuse > framework or (oh my! I did not tell you that) extend ndisulator so that it > is possible to load ntfs.sys directly into the kernel. > > /fjoe Filesystems are one of those things that are very, very, very tightly coupled with the virtual memory system. They are basically the center of the universe for Unix-like kernels. Anyone who succeeds at making a shim layer for NT filesystem modules likely has a very exciting career ahead of them in turning lead to gold, developing perpetual motion machines, and solving world peace (yummmm.... whirled peas.....) =-D Scott From owner-freebsd-arch@FreeBSD.ORG Tue Feb 14 03:08:04 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A62416A433 for ; Tue, 14 Feb 2006 03:08:04 +0000 (GMT) (envelope-from v.velox@vvelox.net) Received: from mail07.powweb.com (mail07.powweb.com [66.152.97.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 100C843D75 for ; Tue, 14 Feb 2006 03:07:56 +0000 (GMT) (envelope-from v.velox@vvelox.net) Received: from vixen42.vulpes (24-119-205-114.cpe.cableone.net [24.119.205.114]) by mail07.powweb.com (Postfix) with ESMTP id C98B814DA18; Mon, 13 Feb 2006 19:07:51 -0800 (PST) Date: Mon, 13 Feb 2006 21:17:03 -0600 From: Vulpes Velox To: Roman Kurakin Message-ID: <20060213211703.6ec79399@vixen42.vulpes> In-Reply-To: <43F04891.5030208@inse.ru> References: <43EFD5A0.83BB82C4@verizon.net> <43F04891.5030208@inse.ru> X-Mailer: Sylpheed-Claws 2.0.0 (GTK+ 2.8.12; i386-portbld-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, babkin@users.sf.net Subject: Re: NTFS write support X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2006 03:08:04 -0000 On Mon, 13 Feb 2006 11:51:29 +0300 Roman Kurakin wrote: > Sergey Babkin: > > >Hi, > > > >I've finally got Win XP as the second OS on my mahcine. The next > >thing I've found is that NTFS support still seems to be read-only, > >and it does not look like anybody is actively working on it. > >So adding the NTFS write support looks like an interesting > >project to undertake. > > > >Just in case, if anybody working on it already, please let me know. > >Any kinds of ready pointers to the good docs would be welcome. > >Or to the existing implementations too (Linux?). > > > IIRC Linux has write support but code marked as "NEW" and thus not > stable. As for me, I solved that problem by setting up FreeBSD and > Win on separate machines. I've done this after interference between > ntloader and sysinstall. I found a nice fix to be using partition magic, converting it to fat32, and then reinstalling the freebsd bootloader. It is also handy for shrinking installs as well. From owner-freebsd-arch@FreeBSD.ORG Tue Feb 14 04:07:40 2006 Return-Path: X-Original-To: arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 09B3016A420; Tue, 14 Feb 2006 04:07:40 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 648E843D45; Tue, 14 Feb 2006 04:07:39 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id k1E454OU046758; Mon, 13 Feb 2006 21:05:05 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 13 Feb 2006 21:05:10 -0700 (MST) Message-Id: <20060213.210510.89039143.imp@bsdimp.com> To: bde@zeta.org.au From: "M. Warner Losh" In-Reply-To: <20060214083530.K22079@epsplex.bde.org> References: <43F04494.4030900@freebsd.org> <20060213.094336.118368793.imp@bsdimp.com> <20060214083530.K22079@epsplex.bde.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Mon, 13 Feb 2006 21:05:05 -0700 (MST) Cc: keramida@ceid.upatras.gr, arch@FreeBSD.org, stefanf@FreeBSD.org, cperciva@FreeBSD.org, des@des.no Subject: Re: [releng_6 tinderbox] failure on sparc64/sparc64 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2006 04:07:40 -0000 In message: <20060214083530.K22079@epsplex.bde.org> Bruce Evans writes: : > It won't matter given how I'm going to fix this problem... : : Why not just access the object as an array of unsigned chars as someone : wrote? Write it out 1 unsigned char at a time for the simple version. : This avoids the complications. Because it has to be fed to the hardware 4 bytes at a time. Warner From owner-freebsd-arch@FreeBSD.ORG Tue Feb 14 09:58:10 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C4BEB16A420; Tue, 14 Feb 2006 09:58:10 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19CDF43D49; Tue, 14 Feb 2006 09:58:08 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) (authenticated bits=128) by igloo.linux.gr (8.13.5/8.13.5/Debian-3) with ESMTP id k1E9vSwG002619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 14 Feb 2006 11:57:32 +0200 Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id k1E9vKkc001451; Tue, 14 Feb 2006 11:57:20 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id k1E9vI2k001450; Tue, 14 Feb 2006 11:57:18 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 14 Feb 2006 11:57:18 +0200 From: Giorgos Keramidas To: "M. Warner Losh" Message-ID: <20060214095718.GC967@flame.pc> References: <43F04494.4030900@freebsd.org> <20060213.094336.118368793.imp@bsdimp.com> <20060214083530.K22079@epsplex.bde.org> <20060213.210510.89039143.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060213.210510.89039143.imp@bsdimp.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (score=-3.34, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.86, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr Cc: arch@freebsd.org, stefanf@freebsd.org, cperciva@freebsd.org, des@des.no Subject: Re: [releng_6 tinderbox] failure on sparc64/sparc64 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2006 09:58:11 -0000 On 2006-02-13 21:05, "M. Warner Losh" wrote: > In message: <20060214083530.K22079@epsplex.bde.org> > Bruce Evans writes: > : > It won't matter given how I'm going to fix this problem... > : > : Why not just access the object as an array of unsigned chars as someone > : wrote? Write it out 1 unsigned char at a time for the simple version. > : This avoids the complications. > > Because it has to be fed to the hardware 4 bytes at a time. That's still possible, using an intermediate unsigned char buffer, or if that's too much to ask (i.e. because keeping a duplicate copy of the 'foo' structure is a waste of memory), using a 4-byte scratch buffer and iterating over an (unsigned char *) pointer through `foo'. I think, that given a `foo' struct defined as: struct foo { uint32_t a; uint16_t b; uint16_t c; uint8_t d; uint8_t e; }; You are always allowed to use an (unsigned char *) pointer to iterate through its bytes, as in: #include #include #include #include struct foo { uint32_t a; uint16_t b; uint16_t c; uint8_t d; uint8_t e; }; int main(void) { struct foo foo; size_t k; memset(&foo, 0, sizeof(foo)); foo.a = 1; foo.b = 2; foo.c = 3; foo.d = 4; foo.e = 5; for (k = 0; k < sizeof(foo); k++) printf("%s%02x", k ? " " : "", *((unsigned char *)&foo + k)); putchar('\n'); return EXIT_SUCCESS; } This prints padding bytes correctly here, even with: $ CFLAGS='-std=c99 -pedantic' make WARNS=6 foo.c [...] $ ./foo 01 00 00 00 02 00 03 00 04 05 00 00 $ Then, if there's a 4-byte constraint, a single uint32_t can be used as a 'buffer': #include #include #include #include struct foo { uint32_t a; uint16_t b; uint16_t c; uint8_t d; uint8_t e; }; int main(void) { struct foo foo; size_t k, nbytes; uint32_t x; memset(&foo, 0, sizeof(foo)); foo.a = 1; foo.b = 2; foo.c = 3; foo.d = 4; foo.e = 5; for (k = 0; k < sizeof(foo); k++) printf("%s%02x", k ? " " : "", *((unsigned char *)&foo + k)); putchar('\n'); for (k = 0; k < sizeof(foo); k += 4) { nbytes = sizeof(uint32_t); if (sizeof(foo) - k < nbytes) { nbytes = sizeof(foo) - k; memset(&x, 0, sizeof(x)); } memcpy(&x, ((unsigned char *)&foo + k), nbytes); printf("%s%zdb/%08x", k ? " " : "", nbytes, x); } putchar('\n'); return EXIT_SUCCESS; } and it seems to work as expected here on a little-endian machine: $ ./foo 01 00 00 00 02 00 03 00 04 05 00 00 4b/00000001 4b/00030002 4b/00000504 This probably works much better than trying to cast the original into an array of uint32_t objects too :) From owner-freebsd-arch@FreeBSD.ORG Tue Feb 14 12:47:46 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A84DE16A420 for ; Tue, 14 Feb 2006 12:47:46 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms044pub.verizon.net (vms044pub.verizon.net [206.46.252.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43E6043D48 for ; Tue, 14 Feb 2006 12:47:46 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms169.mailsrvcs.net ([192.168.1.2]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IUO00LMGGVLIUW1@vms044.mailsrvcs.net> for arch@freebsd.org; Tue, 14 Feb 2006 06:47:45 -0600 (CST) Date: Tue, 14 Feb 2006 06:47:45 -0600 (CST) From: Sergey Babkin To: "M. Warner Losh" , scottl@samsco.org Message-id: <12424860.1139921265521.JavaMail.root@vms169.mailsrvcs.net> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit Cc: arch@freebsd.org Subject: Re: Re: NTFS write support X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: babkin@users.sf.net List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2006 12:47:46 -0000 >From: "M. Warner Losh" >In message: <43EFF3E2.90001@samsco.org> > Scott Long writes: >: Sergey Babkin wrote: >: I'm pretty sure that Microsoft makes the technical details available >: for NTFS, either from their website or from one of their DDKs. The >: hardest part is probably in dealing with their journal. Well, looks like they send the DDK for $15. I've ordered one, we'll see what's inside it. Does not seem to be much useful information on their web site. >There's at least one book on the structure of ntfs. I used to have a >copy, but I can't find it anymore... But the book wasn't enough to do >an implementation... Ah, good to know that it's not worth wasting $180. It's out of print by now, and also they've updated the NTFS format sinc ethe book was written. -SB From owner-freebsd-arch@FreeBSD.ORG Tue Feb 14 16:05:57 2006 Return-Path: X-Original-To: arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CDF0E16A423 for ; Tue, 14 Feb 2006 16:05:57 +0000 (GMT) (envelope-from ume@mahoroba.org) Received: from ameno.mahoroba.org (gw4.mahoroba.org [218.45.22.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5D89B43D60 for ; Tue, 14 Feb 2006 16:05:49 +0000 (GMT) (envelope-from ume@mahoroba.org) Received: from kasuga.mahoroba.org (IDENT:1PmuSaTO4FD4ZGyh9gIil5w6s8YaOVYoOmSXHWoiE+vu0NLsLYU8XXpk0VepoaWZ@kasuga-iwi.mahoroba.org [IPv6:3ffe:501:185b:8010:212:f0ff:fe52:6ac]) (user=ume mech=CRAM-MD5 bits=0) by ameno.mahoroba.org (8.13.4/8.13.4) with ESMTP/inet6 id k1EG5dm3039036 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 15 Feb 2006 01:05:44 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Wed, 15 Feb 2006 01:05:39 +0900 Message-ID: From: Hajimu UMEMOTO To: arch@FreeBSD.org User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.50 (i386-unknown-freebsd6.1) MULE/5.0 (SAKAKI) X-Operating-System: FreeBSD 6.1-PRERELEASE X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.1.3 (ameno.mahoroba.org [IPv6:3ffe:501:185b:8010::1]); Wed, 15 Feb 2006 01:05:44 +0900 (JST) X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on ameno.mahoroba.org Cc: Subject: [CFR] enabling NLS catalog for csh(1) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2006 16:05:57 -0000 Hi, The NLS catalog of csh(1) is not enabled on RELENG_6 and HEAD since tcsh 6.14 was imported. The tcsh 6.14 uses libiconv to convert catalogs to appropriate charset dynamically. However, we don't have libiconv in our tree. So, I made some hack to load libiconv dynamically. With my patch applied, if libiconv is available, you can use catalogs for more locales than the locales which catalog is actually installed. To use this feature, you need to symlink catalogs to appropriate locales. I made a port to do this. You can get the patch and the port from: http://www.imasy.or.jp/~ume/FreeBSD/csh-nls.diff http://www.imasy.or.jp/~ume/FreeBSD/tcsh_nls.port.tar.gz Some files required to enable use of libiconv are not imported in our tree. The patch includes them, too. When committing it, I'll import them into vendor branch. Please review it. If there is no objection, I'll commit it. Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ From owner-freebsd-arch@FreeBSD.ORG Sat Feb 18 10:15:56 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 46E3C16A422 for ; Sat, 18 Feb 2006 10:15:56 +0000 (GMT) (envelope-from rink@charm.il.fontys.nl) Received: from mail.unilogicnetworks.net (mail-out.unilogicnetworks.net [62.133.192.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id B4C1243D49 for ; Sat, 18 Feb 2006 10:15:55 +0000 (GMT) (envelope-from rink@charm.il.fontys.nl) Received: from mail.il.fontys.nl (mx0.il.fontys.nl [194.26.13.7]) by mail.unilogicnetworks.net (Postfix) with ESMTP id 1D33CEF13E for ; Sat, 18 Feb 2006 11:15:53 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.il.fontys.nl (Postfix/VSRI) with ESMTP id D43E717042 for ; Sat, 18 Feb 2006 11:20:54 +0100 (CET) Received: from mail.il.fontys.nl ([127.0.0.1]) by localhost (sukke.il.fontys.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 22912-02 for ; Sat, 18 Feb 2006 11:20:49 +0100 (CET) Received: from charm.il.fontys.nl (charm.il.fontys.nl [194.26.13.34]) by mail.il.fontys.nl (Postfix) with ESMTP for ; Sat, 18 Feb 2006 11:20:49 +0100 (CET) Received: by charm.il.fontys.nl (Postfix, from userid 1678) id 15D7440EF; Sat, 18 Feb 2006 11:14:25 +0100 (CET) Date: Sat, 18 Feb 2006 11:14:25 +0100 From: Rink Springer To: arch@freebsd.org Message-ID: <20060218101425.GB64481@il.fontys.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IiVenqGWf+H9Y6IX" Content-Disposition: inline X-Editor: Vim http://www.vim.org/ X-Info: http://rink.nu/ X-Operating-System: FreeBSD 6.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Virus-Scanned: amavisd-new at il.fontys.nl Cc: Subject: [RFC] XBox syscons framebuffer console driver X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Feb 2006 10:15:56 -0000 --IiVenqGWf+H9Y6IX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello everyone, As some of you might have seen on xbox-bsd.nl, there is an XBox syscons-capable framebuffer driver. I have been running it on my XBox for a month and it has been nicely stable. However, I would like to commit this into -CURRENT, which is why I'd like some more people to have a look at it. You can grab the patch from http://xbox-bsd.nl/patches/xbox-syscons.diff. All comments are appreciated, I'd like to get this into -CURRENT. Thanks, --=20 Rink P.W. Springer - http://rink.nu "Richter: Tribute? You steal men's souls, and make them your slaves! Dracula: Perhaps the same could be said of all religions." - Castlevania: Symphony of the Night --IiVenqGWf+H9Y6IX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (FreeBSD) iD8DBQFD9vOBb3O60uztv/8RAsjvAJ0RK2amz8LAQLhYi53kwGTEQvJIFwCgsyJw 2AxvVpUCfPyNyKeCLgGP5PA= =fWsY -----END PGP SIGNATURE----- --IiVenqGWf+H9Y6IX--