From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 27 00:05:47 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4659106564A for ; Sun, 27 Apr 2008 00:05:47 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.freebsd.org (Postfix) with ESMTP id 3B2D18FC1A for ; Sun, 27 Apr 2008 00:05:47 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-064-188-042.pools.arcor-ip.net [88.64.188.42]) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis) id 0ML31I-1JpuOn15uF-0002w7; Sun, 27 Apr 2008 02:05:45 +0200 Received: (qmail 84117 invoked from network); 27 Apr 2008 00:04:25 -0000 Received: from myhost.laiers.local (192.168.4.151) by mx.laiers.local with SMTP; 27 Apr 2008 00:04:25 -0000 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Sun, 27 Apr 2008 02:01:53 +0200 User-Agent: KMail/1.9.9 References: <20080426213557.GA88577@marvin.blogreen.org> In-Reply-To: <20080426213557.GA88577@marvin.blogreen.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200804270201.53271.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1+6jB1SPaItvn9e9xrLXoHswDwF14Puvaskz/S Fgz/J9gCf1nq+bsaZVhUz1n61BYh22GCmzr2uuicUg/HOGXntR fFX4kSF6/MT85QmhNekfw== Cc: hackers@freebsd.org, Romuald Conty , Romain =?utf-8?q?Tarti=C3=A8re?= Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2008 00:05:47 -0000 On Saturday 26 April 2008 23:35:57 Romain Tarti=C3=A8re wrote: > Hello FreeBSD hackers! > > I'm using avr-gcc from the ports and relying on the 0b prefix notation > for binary constants, that is: > > foo =3D 0b00101010; > > Thanks to /usr/ports/devel/avr-gcc/files/patch-0b-constants this is > possible :-) > > But I would like to use indent(1) to reformat contributed code > automatically. Unfortunately, the 0b notation is not supported by that > program, and the resulting code looks like this: > > foo =3D 0 b00101010; > > ... then compilation fails, bla bla bla... I can't think of a case (outside of "0x...." context) where "...0b..."=20 would be valid C code, let alone better formated as "...0 b...". Hence I=20 see no harm in adding your patch to the base indent(1). Does anyone have an example where "...0 b..." is valid C code? > A quick look at indent(1) source code leaded me to tweak > /usr/src/usr.bin/indent/lexi.c so that the 0b notation is supported > (patch attached). > > I was so wondering how useful(less) it was to support this extension in > FreeBSD indent(1) program. The version of gcc provided with the base > system does not support this syntax, and AFAIK, only the avr-gcc port > support this kind of constructs... > > So options are: > - Add support for 0b notation to FreeBSD indent(1) (maybe requiring > the use of an extra command line argument to support this feature); > - Provide a patch for indent(1) that can be conditionally applied on > the code when compiling the world; > - Create another port, say avr-indent(1), that is not more than a > copy of indent(1) with support of 0b constructs; > - Do nothing: tweaking indent(1) for supporting this is so trivial > that the few individuals interested in this can have their local > version of indent. > > Can you please tell me your opinion about this? > > Thank you in advance, > Romain > > PS: I also took a look at GNU indent (gindent(1) from the ports), but > it does not support 0b notation too. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 27 00:18:22 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C9F21065670 for ; Sun, 27 Apr 2008 00:18:22 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.179]) by mx1.freebsd.org (Postfix) with ESMTP id 34A9A8FC0C for ; Sun, 27 Apr 2008 00:18:22 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-064-188-042.pools.arcor-ip.net [88.64.188.42]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1JpuOn11qo-0003da; Sun, 27 Apr 2008 02:05:45 +0200 Received: (qmail 84117 invoked from network); 27 Apr 2008 00:04:25 -0000 Received: from myhost.laiers.local (192.168.4.151) by mx.laiers.local with SMTP; 27 Apr 2008 00:04:25 -0000 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Sun, 27 Apr 2008 02:01:53 +0200 User-Agent: KMail/1.9.9 References: <20080426213557.GA88577@marvin.blogreen.org> In-Reply-To: <20080426213557.GA88577@marvin.blogreen.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200804270201.53271.max@love2party.net> X-Provags-ID: V01U2FsdGVkX19BZx5+PlUKH1G/Ek32lad7qjzhv4lCH8ee+3p qIoHbilQ6XjxfGCfw3lDDaggJjT0BUsAUEKEofo3RGBVAV51HQ /o2BQAvMSfOrY2mStmRFg== Cc: hackers@freebsd.org, Romuald Conty , Romain =?utf-8?q?Tarti=C3=A8re?= Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2008 00:18:22 -0000 On Saturday 26 April 2008 23:35:57 Romain Tarti=C3=A8re wrote: > Hello FreeBSD hackers! > > I'm using avr-gcc from the ports and relying on the 0b prefix notation > for binary constants, that is: > > foo =3D 0b00101010; > > Thanks to /usr/ports/devel/avr-gcc/files/patch-0b-constants this is > possible :-) > > But I would like to use indent(1) to reformat contributed code > automatically. Unfortunately, the 0b notation is not supported by that > program, and the resulting code looks like this: > > foo =3D 0 b00101010; > > ... then compilation fails, bla bla bla... I can't think of a case (outside of "0x...." context) where "...0b..."=20 would be valid C code, let alone better formated as "...0 b...". Hence I=20 see no harm in adding your patch to the base indent(1). Does anyone have an example where "...0 b..." is valid C code? > A quick look at indent(1) source code leaded me to tweak > /usr/src/usr.bin/indent/lexi.c so that the 0b notation is supported > (patch attached). > > I was so wondering how useful(less) it was to support this extension in > FreeBSD indent(1) program. The version of gcc provided with the base > system does not support this syntax, and AFAIK, only the avr-gcc port > support this kind of constructs... > > So options are: > - Add support for 0b notation to FreeBSD indent(1) (maybe requiring > the use of an extra command line argument to support this feature); > - Provide a patch for indent(1) that can be conditionally applied on > the code when compiling the world; > - Create another port, say avr-indent(1), that is not more than a > copy of indent(1) with support of 0b constructs; > - Do nothing: tweaking indent(1) for supporting this is so trivial > that the few individuals interested in this can have their local > version of indent. > > Can you please tell me your opinion about this? > > Thank you in advance, > Romain > > PS: I also took a look at GNU indent (gindent(1) from the ports), but > it does not support 0b notation too. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 27 01:07:35 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 123D11065673; Sun, 27 Apr 2008 01:07:35 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.80]) by mx1.freebsd.org (Postfix) with ESMTP id ED24B8FC0A; Sun, 27 Apr 2008 01:07:34 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (asmtp007-s [10.150.69.70]) by smtpoutm.mac.com (Xserve/smtpout017/MantshX 4.0) with ESMTP id m3R0lu5D003024; Sat, 26 Apr 2008 17:47:56 -0700 (PDT) Received: from [192.168.1.100] (209-128-86-226.bayarea.net [209.128.86.226]) (authenticated bits=0) by mac.com (Xserve/asmtp007/MantshX 4.0) with ESMTP id m3R0lsiS017508 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 26 Apr 2008 17:47:54 -0700 (PDT) Message-Id: <5E2E3A08-A12E-4AF6-893D-20A44AC205AF@mac.com> From: Marcel Moolenaar To: Max Laier In-Reply-To: <200804270201.53271.max@love2party.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v919.2) Date: Sat, 26 Apr 2008 17:47:54 -0700 References: <20080426213557.GA88577@marvin.blogreen.org> <200804270201.53271.max@love2party.net> X-Mailer: Apple Mail (2.919.2) Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org, Romuald Conty , =?ISO-8859-1?Q?Romain_Tarti=E8re?= Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2008 01:07:35 -0000 On Apr 26, 2008, at 5:01 PM, Max Laier wrote: > On Saturday 26 April 2008 23:35:57 Romain Tarti=E8re wrote: >> Hello FreeBSD hackers! >> >> I'm using avr-gcc from the ports and relying on the 0b prefix =20 >> notation >> for binary constants, that is: >> >> foo =3D 0b00101010; >> >> Thanks to /usr/ports/devel/avr-gcc/files/patch-0b-constants this is >> possible :-) >> >> But I would like to use indent(1) to reformat contributed code >> automatically. Unfortunately, the 0b notation is not supported by =20 >> that >> program, and the resulting code looks like this: >> >> foo =3D 0 b00101010; >> >> ... then compilation fails, bla bla bla... > > I can't think of a case (outside of "0x...." context) where "...0b..." > would be valid C code, let alone better formated as "...0 b...". =20 > Hence I > see no harm in adding your patch to the base indent(1). > > Does anyone have an example where "...0 b..." is valid C code? Well, if b... is a preprocessor define then you can easily come up with valid C: #define b... *2 then: ...0 b... becomes: ...0 *2 That's a valid expression in the right context... FYI, --=20 Marcel Moolenaar xcllnt@mac.com From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 27 01:07:35 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 123D11065673; Sun, 27 Apr 2008 01:07:35 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.80]) by mx1.freebsd.org (Postfix) with ESMTP id ED24B8FC0A; Sun, 27 Apr 2008 01:07:34 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (asmtp007-s [10.150.69.70]) by smtpoutm.mac.com (Xserve/smtpout017/MantshX 4.0) with ESMTP id m3R0lu5D003024; Sat, 26 Apr 2008 17:47:56 -0700 (PDT) Received: from [192.168.1.100] (209-128-86-226.bayarea.net [209.128.86.226]) (authenticated bits=0) by mac.com (Xserve/asmtp007/MantshX 4.0) with ESMTP id m3R0lsiS017508 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sat, 26 Apr 2008 17:47:54 -0700 (PDT) Message-Id: <5E2E3A08-A12E-4AF6-893D-20A44AC205AF@mac.com> From: Marcel Moolenaar To: Max Laier In-Reply-To: <200804270201.53271.max@love2party.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v919.2) Date: Sat, 26 Apr 2008 17:47:54 -0700 References: <20080426213557.GA88577@marvin.blogreen.org> <200804270201.53271.max@love2party.net> X-Mailer: Apple Mail (2.919.2) Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org, Romuald Conty , =?ISO-8859-1?Q?Romain_Tarti=E8re?= Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2008 01:07:35 -0000 On Apr 26, 2008, at 5:01 PM, Max Laier wrote: > On Saturday 26 April 2008 23:35:57 Romain Tarti=E8re wrote: >> Hello FreeBSD hackers! >> >> I'm using avr-gcc from the ports and relying on the 0b prefix =20 >> notation >> for binary constants, that is: >> >> foo =3D 0b00101010; >> >> Thanks to /usr/ports/devel/avr-gcc/files/patch-0b-constants this is >> possible :-) >> >> But I would like to use indent(1) to reformat contributed code >> automatically. Unfortunately, the 0b notation is not supported by =20 >> that >> program, and the resulting code looks like this: >> >> foo =3D 0 b00101010; >> >> ... then compilation fails, bla bla bla... > > I can't think of a case (outside of "0x...." context) where "...0b..." > would be valid C code, let alone better formated as "...0 b...". =20 > Hence I > see no harm in adding your patch to the base indent(1). > > Does anyone have an example where "...0 b..." is valid C code? Well, if b... is a preprocessor define then you can easily come up with valid C: #define b... *2 then: ...0 b... becomes: ...0 *2 That's a valid expression in the right context... FYI, --=20 Marcel Moolenaar xcllnt@mac.com From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 27 04:52:49 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 250711065674; Sun, 27 Apr 2008 04:52:49 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from mail.asahi-net.or.jp (mail2.asahi-net.or.jp [202.224.39.198]) by mx1.freebsd.org (Postfix) with ESMTP id ECC7D8FC19; Sun, 27 Apr 2008 04:52:48 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from localhost (pool-141-152-252-243.phlapa.east.verizon.net [141.152.252.243]) by mail.asahi-net.or.jp (Postfix) with ESMTP id E10A9571E6; Sun, 27 Apr 2008 13:32:24 +0900 (JST) Date: Sun, 27 Apr 2008 00:32:18 -0400 From: Yoshihiro Ota To: David Forsythe , Mark Linimon Message-Id: <20080427003218.8e647c3b.ota@j.email.ne.jp> In-Reply-To: <20080424234600.GA40079@rat.umd.edu> References: <20080424234600.GA40079@rat.umd.edu> X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.9; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Introduction X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2008 04:52:49 -0000 On Thu, 24 Apr 2008 19:46:02 -0400 David Forsythe wrote: > Hello everybody, > > My name is David Forsythe and I'll be working on allowing parallel builds in the > ports collection for Summer of Code this year. I'm a second year student at the > University of Maryland, College Park studying computer science. > > I'm extremely excited to work on this project over the summer and I hope my work > is beneficial to the FreeBSD community. I was already planning on devoting a > bunch of my free time this summer to working on this type of thing, so an > @freebsd.org alias, a t-shirt, and a bit of cash are just icing on the cake (no > seriously, getting a FreeBSD mail alias excited me so much I'm a little bit > embarrassed...) > > I hope that my project turns out well and I can continue to work with the FreeBSD development > community far into the future. Working with you guys is really a dream come > true! > > > Dave Welcome. I have once implemented a tool to support parallel builds in the port system, indeed. There were a couple of designs and I chose to write a wrapper program to the existing ports infrastructure such that the wrapper such that every build and run-time dependencies are built in parallel prior to target packages. You can find more about it at http://uyota.asablo.jp/blog/cat/portsplus/ I would like to participate to the project as another adviser as it is also my interest. I believe that I can provide good comments and feedback to this project from my experiences. Thanks. Hiro From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 27 10:23:41 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10155106566C; Sun, 27 Apr 2008 10:23:41 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.freebsd.org (Postfix) with ESMTP id 8ECD58FC12; Sun, 27 Apr 2008 10:23:40 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m3RAKv8v027519 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 27 Apr 2008 20:20:59 +1000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.1) with ESMTP id m3RAKv4s007751; Sun, 27 Apr 2008 20:20:57 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m3RAKr9M007750; Sun, 27 Apr 2008 20:20:53 +1000 (EST) (envelope-from peter) Date: Sun, 27 Apr 2008 20:20:53 +1000 From: Peter Jeremy To: Max Laier Message-ID: <20080427102053.GA7293@server.vk2pj.dyndns.org> References: <20080426213557.GA88577@marvin.blogreen.org> <200804270201.53271.max@love2party.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7AUc2qLy4jB3hD7Z" Content-Disposition: inline In-Reply-To: <200804270201.53271.max@love2party.net> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org, Romuald Conty , Romain =?iso-8859-1?Q?Tarti=E8re?= Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2008 10:23:41 -0000 --7AUc2qLy4jB3hD7Z Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 27, 2008 at 02:01:53AM +0200, Max Laier wrote: >On Saturday 26 April 2008 23:35:57 Romain Tarti=E8re wrote: >> I'm using avr-gcc from the ports and relying on the 0b prefix notation >> for binary constants, that is: >> >> foo =3D 0b00101010; =2E.. >I can't think of a case (outside of "0x...." context) where "...0b..."=20 >would be valid C code, let alone better formated as "...0 b...". Hence I= =20 >see no harm in adding your patch to the base indent(1). > >Does anyone have an example where "...0 b..." is valid C code? More relevantly (and excluding avr-gcc) , 0b00101010 is not a valid token as is, whereas "0 b00101010" may be (if b00101010 is a macro). By inserting whitespace, indent(1) is changing the syntax of the input and, IMHO, indent should not be doing that - its brief is to re-arrange whitespace to (hopefully) improve legibility, not make syntactic changes. I would support changing indent to bring its tokenisation more into line with the C preprocessor. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --7AUc2qLy4jB3hD7Z Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkgUU4UACgkQ/opHv/APuIe2YACgkL3CFfuvqkw3tXbPQjCC2cc0 jUAAmwS93tXcJN/CJQVbJTDMcIbYRZ5k =rkOf -----END PGP SIGNATURE----- --7AUc2qLy4jB3hD7Z-- From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 27 10:23:41 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10155106566C; Sun, 27 Apr 2008 10:23:41 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.freebsd.org (Postfix) with ESMTP id 8ECD58FC12; Sun, 27 Apr 2008 10:23:40 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m3RAKv8v027519 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 27 Apr 2008 20:20:59 +1000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.1) with ESMTP id m3RAKv4s007751; Sun, 27 Apr 2008 20:20:57 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m3RAKr9M007750; Sun, 27 Apr 2008 20:20:53 +1000 (EST) (envelope-from peter) Date: Sun, 27 Apr 2008 20:20:53 +1000 From: Peter Jeremy To: Max Laier Message-ID: <20080427102053.GA7293@server.vk2pj.dyndns.org> References: <20080426213557.GA88577@marvin.blogreen.org> <200804270201.53271.max@love2party.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7AUc2qLy4jB3hD7Z" Content-Disposition: inline In-Reply-To: <200804270201.53271.max@love2party.net> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org, Romuald Conty , Romain =?iso-8859-1?Q?Tarti=E8re?= Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2008 10:23:41 -0000 --7AUc2qLy4jB3hD7Z Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 27, 2008 at 02:01:53AM +0200, Max Laier wrote: >On Saturday 26 April 2008 23:35:57 Romain Tarti=E8re wrote: >> I'm using avr-gcc from the ports and relying on the 0b prefix notation >> for binary constants, that is: >> >> foo =3D 0b00101010; =2E.. >I can't think of a case (outside of "0x...." context) where "...0b..."=20 >would be valid C code, let alone better formated as "...0 b...". Hence I= =20 >see no harm in adding your patch to the base indent(1). > >Does anyone have an example where "...0 b..." is valid C code? More relevantly (and excluding avr-gcc) , 0b00101010 is not a valid token as is, whereas "0 b00101010" may be (if b00101010 is a macro). By inserting whitespace, indent(1) is changing the syntax of the input and, IMHO, indent should not be doing that - its brief is to re-arrange whitespace to (hopefully) improve legibility, not make syntactic changes. I would support changing indent to bring its tokenisation more into line with the C preprocessor. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --7AUc2qLy4jB3hD7Z Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkgUU4UACgkQ/opHv/APuIe2YACgkL3CFfuvqkw3tXbPQjCC2cc0 jUAAmwS93tXcJN/CJQVbJTDMcIbYRZ5k =rkOf -----END PGP SIGNATURE----- --7AUc2qLy4jB3hD7Z-- From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 27 10:23:53 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 057E21065709; Sun, 27 Apr 2008 10:23:53 +0000 (UTC) (envelope-from xiazhongqi@huawei.com) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [61.144.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id EAEF08FC22; Sun, 27 Apr 2008 10:23:21 +0000 (UTC) (envelope-from xiazhongqi@huawei.com) Received: from huawei.com (szxga02-in [172.24.2.6]) by szxga02-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0JZX00A675Q6FR@szxga02-in.huawei.com>; Sat, 26 Apr 2008 14:22:54 +0800 (CST) Received: from huawei.com ([172.24.1.18]) by szxga02-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0JZX00MAE5Q5RK@szxga02-in.huawei.com>; Sat, 26 Apr 2008 14:22:54 +0800 (CST) Received: from x49105 ([10.111.12.222]) by szxml03-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTPA id <0JZX00MX45Q55V@szxml03-in.huawei.com>; Sat, 26 Apr 2008 14:22:53 +0800 (CST) Date: Sat, 26 Apr 2008 14:22:53 +0800 From: Sam Xia In-reply-to: <4811C774.9000407@genesi-usa.com> To: 'Matt Sealey' , vi0@freebsd.org Message-id: <000001c8a765$f5d87bc0$de0c6f0a@china.huawei.com> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Mailer: Microsoft Office Outlook 11 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Thread-index: Acimzzbsst+3zjqdTrSp24XJkkl6UwAllhQg X-Mailman-Approved-At: Sun, 27 Apr 2008 11:17:18 +0000 Cc: hackers@freebsd.org, ppc@freebsd.org Subject: RE: My GSoC Intro... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2008 10:23:53 -0000 hi Przemek, I am very interested at what you are going to do. Could you tell me what kind of chips are used in GSoC. (I mean that the chip is made by Freesacle or by the others.) Best Regards, Sam Xia > -----Original Message----- > From: owner-freebsd-ppc@freebsd.org > [mailto:owner-freebsd-ppc@freebsd.org] On Behalf Of Matt Sealey > Sent: Friday, April 25, 2008 7:59 PM > To: vi0@freebsd.org > Cc: hackers@freebsd.org; ppc@freebsd.org > Subject: Re: My GSoC Intro... > > Hi Przemek, > > If you need any help at all, feel free to bug me :) > > We're very excited about the FreeBSD port to Efika. > > -- > Matt Sealey > Genesi, Manager, Developer Relations > > vi0 wrote: > > Hello everybody!!! > > > > My name is Przemek Witaszczyk and I am one of those very > happy FreeBSD > > GSoCers of 2008:) > > > > I am 25 years old and I come from Polad. Currently I'm > working on my > > PhD in the field of theoretical physics (AdS/CFT > correspondence, one > > nifty thing that came out from the superstrings theory...). > MSc also > > in theory, two years ago at Jagiellonian University, Krakow... > > > > My story of open source operating systems began in high > school, when I > > met Linux and was persuaded by the fact that you can never stop > > configuring them:>. Since then I've checked out several > OSes such like > > Solaris, Tru64 and even Plan9, but no doubt FreeBSD was the one I'd > > liked the most. > > > > So here I am. Partially by an accident I began working with > embedded > > systems developer, Rafal Jaworowski (and his UltraTeam:>), > who asked > > me if I'd liked to take a try in GSoC. So eventually we did > it and now > > with him as my Mentor I'm going to port FreeBSD to Efika - > a PPC based > > system on a chip eval board. What I expect the most is learning as > > much as possible about the unix kernel and getting to know with as > > many fbsd developers as possible. > > And - to succeed, of course.. > > > > Greets! > > > > Przemek Witaszczyk > > > > _______________________________________________ > > freebsd-ppc@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-ppc > > To unsubscribe, send any mail to > "freebsd-ppc-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-ppc@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ppc > To unsubscribe, send any mail to "freebsd-ppc-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 27 12:54:53 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E565106567A for ; Sun, 27 Apr 2008 12:54:53 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by mx1.freebsd.org (Postfix) with ESMTP id B02788FC1C for ; Sun, 27 Apr 2008 12:54:52 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so524258uge.37 for ; Sun, 27 Apr 2008 05:54:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject:message-id:mail-followup-to:mime-version:content-type:content-disposition:user-agent; bh=QIE38ZuzFt/i25MWXfclbjeNIcFYHQnYCRTqO1r4qFM=; b=vshF1uGsq42HoE6/89f7y4Z8lIkcl8K7w4KYpNGyBHONssDPtHoX7q0rfgJevpdO06GV9LwLn5z2N49ljQCM01WuGoMTWQT/B1zTH//cC4dlFYqLeXdiDAi3BdAQJCzSRms1w3IsROH7Tr4pntbtny6fZSNQtjP25nrrDhPuBzk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mail-followup-to:mime-version:content-type:content-disposition:user-agent; b=wuFOKI1pJGAZTWL2vZ+I6B77+E4JU+yqf5UyZ74bBP+A4LtkIxP7jqys8ilwE11OtfplpCUpgjRdnT0r41yzNPrXI0zDaSc3QwsjyV5mSdzQXpAAU3w/UIUzyOXSx0nMzHOV+xYKTO9+Pp78CvudKDQ286lNYY+knQ9mc683Op8= Received: by 10.66.216.7 with SMTP id o7mr3277097ugg.39.1209299446818; Sun, 27 Apr 2008 05:30:46 -0700 (PDT) Received: from localhost ( [213.184.224.26]) by mx.google.com with ESMTPS id f13sm5957211gvd.11.2008.04.27.05.30.44 (version=SSLv3 cipher=OTHER); Sun, 27 Apr 2008 05:30:45 -0700 (PDT) Date: Sun, 27 Apr 2008 15:36:14 +0300 From: Gleb Kurtsou To: hackers@freebsd.org Message-ID: <20080427123614.GA1138@h1.d> Mail-Followup-To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Subject: [patch] savecore can't create dump from encrypted swap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2008 12:54:53 -0000 Issue was mentioned recently on stable@ http://docs.freebsd.org/cgi/mid.cgi?47F548D9.8060905 The problem is in order of rc.d scripts. After encswap finishes it's impossible to open original (not encrypted) swap device for write so savecore fails. The following patch adds 'encswap' target to be run after 'disks' but before 'swap1'. With the patch order of scripts becomes: dumpon geli savecore encswap swap1 instead of: dumpon geli encswap swap1 savecore The problem is that savecore looses ability to use syslog. You still get messages on console. The only solution I see is to use some hackery magic to inject log messages into kern.msgbuf with the help of /dev/console. I'm not sure it's really needed. diff -ur rc.d.orig/encswap rc.d/encswap --- rc.d.orig/encswap 2008-04-27 14:53:38.000000000 +0300 +++ etc/rc.d/encswap 2008-04-27 14:53:27.000000000 +0300 @@ -4,7 +4,7 @@ # -# PROVIDE: disks -# REQUIRE: initrandom +# PROVIDE: encswap +# REQUIRE: initrandom disks # KEYWORD: nojail . /etc/rc.subr diff -ur rc.d.orig/savecore rc.d/savecore --- rc.d.orig/savecore 2008-04-27 14:53:38.000000000 +0300 +++ etc/rc.d/savecore 2008-04-27 14:53:27.000000000 +0300 @@ -4,8 +4,7 @@ # # PROVIDE: savecore -# REQUIRE: syslogd -# BEFORE: SERVERS +# BEFORE: encswap # KEYWORD: nojail . /etc/rc.subr diff -ur rc.d.orig/swap1 rc.d/swap1 --- rc.d.orig/swap1 2008-04-27 14:53:38.000000000 +0300 +++ etc/rc.d/swap1 2008-04-27 14:53:27.000000000 +0300 @@ -4,7 +4,7 @@ # # PROVIDE: localswap -# REQUIRE: disks +# REQUIRE: encswap disks # KEYWORD: nojail shutdown . /etc/rc.subr From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 27 13:12:20 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A30E11065673 for ; Sun, 27 Apr 2008 13:12:20 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from smtp3-g19.free.fr (smtp3-g19.free.fr [212.27.42.29]) by mx1.freebsd.org (Postfix) with ESMTP id 32EA88FC22 for ; Sun, 27 Apr 2008 13:12:19 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from smtp3-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp3-g19.free.fr (Postfix) with ESMTP id D5BAB17B550; Sun, 27 Apr 2008 15:12:18 +0200 (CEST) Received: from marvin.blogreen.org (marvin.blogreen.org [82.247.213.140]) by smtp3-g19.free.fr (Postfix) with ESMTP id 8530217B54B; Sun, 27 Apr 2008 15:12:18 +0200 (CEST) Received: by marvin.blogreen.org (Postfix, from userid 1001) id 4CC0C5C059; Sun, 27 Apr 2008 15:12:18 +0200 (CEST) Date: Sun, 27 Apr 2008 15:12:18 +0200 From: Romain =?iso-8859-1?Q?Tarti=E8re?= To: freebsd-hackers@freebsd.org, hackers@freebsd.org Message-ID: <20080427131218.GA27750@marvin.blogreen.org> Mail-Followup-To: freebsd-hackers@freebsd.org, hackers@freebsd.org, Romuald Conty References: <20080426213557.GA88577@marvin.blogreen.org> <200804270201.53271.max@love2party.net> <20080427102053.GA7293@server.vk2pj.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3lcZGd9BuhuYXNfi" Content-Disposition: inline In-Reply-To: <20080427102053.GA7293@server.vk2pj.dyndns.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key: http://romain.blogreen.org/pubkey.asc Cc: Romuald Conty Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2008 13:12:20 -0000 --3lcZGd9BuhuYXNfi Content-Type: multipart/mixed; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 27, 2008 at 08:20:53PM +1000, Peter Jeremy wrote: > By inserting whitespace, indent(1) is changing the syntax of the input > and, IMHO, indent should not be doing that - its brief is to > re-arrange whitespace to (hopefully) improve legibility, not make > syntactic changes. >=20 > I would support changing indent to bring its tokenisation more into > line with the C preprocessor. I share your point of view. I tweaked a bit more indent(1) so that it tries to detect invalid numeric tokens, and in such circumstances output a warning message and does NOT change the code. Comments are welcomed. Regards, Romain --=20 Romain Tarti=E8re http://romain.blogreen.org/ pgp: 8DAB A124 0DA4 7024 F82A E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43) (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated) --ikeVEW9yuYc//A+q Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="lexi.c.diff" Content-Transfer-Encoding: quoted-printable --- /usr/src/usr.bin/indent/lexi.c 2005-11-20 14:48:15.000000000 +0100 +++ lexi.c 2008-04-27 15:09:21.000000000 +0200 @@ -121,6 +121,10 @@ 1, 1, 1, 0, 3, 0, 3, 0 }; =20 +enum base { + BASE_2, BASE_8, BASE_10, BASE_16 +}; + int lexi(void) { @@ -158,16 +162,37 @@ int seendot =3D 0, seenexp =3D 0, seensfx =3D 0; - if (*buf_ptr =3D=3D '0' && - (buf_ptr[1] =3D=3D 'x' || buf_ptr[1] =3D=3D 'X')) { - *e_token++ =3D *buf_ptr++; - *e_token++ =3D *buf_ptr++; - while (isxdigit(*buf_ptr)) { + enum base in_base =3D BASE_10; + + if (*buf_ptr =3D=3D '0') { + if (buf_ptr[1] =3D=3D 'b' || buf_ptr[1] =3D=3D 'B') + in_base =3D BASE_2; + else if (buf_ptr[1] =3D=3D 'x' || buf_ptr[1] =3D=3D 'X') + in_base =3D BASE_16; + else + in_base =3D BASE_8; + } + + *e_token++ =3D *buf_ptr++; + if (in_base =3D=3D BASE_2 || in_base =3D=3D BASE_16) + *e_token++ =3D *buf_ptr++; /* Read the second character from + * 0b... / 0x... expressions. + */ + + switch (in_base) { + case BASE_2: + while (*buf_ptr =3D=3D '0' || *buf_ptr =3D=3D '1') { CHECK_SIZE_TOKEN; *e_token++ =3D *buf_ptr++; } - } - else + break; + case BASE_8: + while (*buf_ptr >=3D '0' && *buf_ptr <=3D '8') { + CHECK_SIZE_TOKEN; + *e_token++ =3D *buf_ptr++; + } + break; + case BASE_10: while (1) { if (*buf_ptr =3D=3D '.') { if (seendot) @@ -209,6 +234,29 @@ } break; } + + break; + case BASE_16: + while (isxdigit(*buf_ptr)) { + CHECK_SIZE_TOKEN; + *e_token++ =3D *buf_ptr++; + } + break; + } + if (isalnum(*buf_ptr)) { + char *buf; + /* current token is malformed */ + if (asprintf(&buf, "Ignoring invalid numeric " + "expression '%s%c...'", s_token, *buf_ptr)) { + diag2(0, buf); + free(buf); + } + /* finish to eat the current token */ + while (isalnum(*buf_ptr)) { + CHECK_SIZE_TOKEN; + *e_token++ =3D *buf_ptr++; + } + } } else while (chartype[(int)*buf_ptr] =3D=3D alphanum || *buf_ptr =3D=3D BAC= KSLASH) { --ikeVEW9yuYc//A+q-- --3lcZGd9BuhuYXNfi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkgUe7IACgkQ2OmjP/9W/0MhoACeK0qhAaMthPMw2aWzVvDpeihg k7UAn3oC1vOUyVRKkzkmD275LZ5+ZXvb =ka6I -----END PGP SIGNATURE----- --3lcZGd9BuhuYXNfi-- From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 27 13:38:40 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 950B7106564A for ; Sun, 27 Apr 2008 13:38:40 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from postfix1-g20.free.fr (postfix1-g20.free.fr [212.27.60.42]) by mx1.freebsd.org (Postfix) with ESMTP id 204038FC22 for ; Sun, 27 Apr 2008 13:38:40 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from smtp3-g19.free.fr (smtp3-g19.free.fr [212.27.42.29]) by postfix1-g20.free.fr (Postfix) with ESMTP id E39512583FB3 for ; Sun, 27 Apr 2008 15:12:20 +0200 (CEST) Received: from smtp3-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp3-g19.free.fr (Postfix) with ESMTP id D5BAB17B550; Sun, 27 Apr 2008 15:12:18 +0200 (CEST) Received: from marvin.blogreen.org (marvin.blogreen.org [82.247.213.140]) by smtp3-g19.free.fr (Postfix) with ESMTP id 8530217B54B; Sun, 27 Apr 2008 15:12:18 +0200 (CEST) Received: by marvin.blogreen.org (Postfix, from userid 1001) id 4CC0C5C059; Sun, 27 Apr 2008 15:12:18 +0200 (CEST) Date: Sun, 27 Apr 2008 15:12:18 +0200 From: Romain =?iso-8859-1?Q?Tarti=E8re?= To: freebsd-hackers@freebsd.org, hackers@freebsd.org Message-ID: <20080427131218.GA27750@marvin.blogreen.org> Mail-Followup-To: freebsd-hackers@freebsd.org, hackers@freebsd.org, Romuald Conty References: <20080426213557.GA88577@marvin.blogreen.org> <200804270201.53271.max@love2party.net> <20080427102053.GA7293@server.vk2pj.dyndns.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3lcZGd9BuhuYXNfi" Content-Disposition: inline In-Reply-To: <20080427102053.GA7293@server.vk2pj.dyndns.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key: http://romain.blogreen.org/pubkey.asc Cc: Romuald Conty Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2008 13:38:40 -0000 --3lcZGd9BuhuYXNfi Content-Type: multipart/mixed; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 27, 2008 at 08:20:53PM +1000, Peter Jeremy wrote: > By inserting whitespace, indent(1) is changing the syntax of the input > and, IMHO, indent should not be doing that - its brief is to > re-arrange whitespace to (hopefully) improve legibility, not make > syntactic changes. >=20 > I would support changing indent to bring its tokenisation more into > line with the C preprocessor. I share your point of view. I tweaked a bit more indent(1) so that it tries to detect invalid numeric tokens, and in such circumstances output a warning message and does NOT change the code. Comments are welcomed. Regards, Romain --=20 Romain Tarti=E8re http://romain.blogreen.org/ pgp: 8DAB A124 0DA4 7024 F82A E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43) (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated) --ikeVEW9yuYc//A+q Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="lexi.c.diff" Content-Transfer-Encoding: quoted-printable --- /usr/src/usr.bin/indent/lexi.c 2005-11-20 14:48:15.000000000 +0100 +++ lexi.c 2008-04-27 15:09:21.000000000 +0200 @@ -121,6 +121,10 @@ 1, 1, 1, 0, 3, 0, 3, 0 }; =20 +enum base { + BASE_2, BASE_8, BASE_10, BASE_16 +}; + int lexi(void) { @@ -158,16 +162,37 @@ int seendot =3D 0, seenexp =3D 0, seensfx =3D 0; - if (*buf_ptr =3D=3D '0' && - (buf_ptr[1] =3D=3D 'x' || buf_ptr[1] =3D=3D 'X')) { - *e_token++ =3D *buf_ptr++; - *e_token++ =3D *buf_ptr++; - while (isxdigit(*buf_ptr)) { + enum base in_base =3D BASE_10; + + if (*buf_ptr =3D=3D '0') { + if (buf_ptr[1] =3D=3D 'b' || buf_ptr[1] =3D=3D 'B') + in_base =3D BASE_2; + else if (buf_ptr[1] =3D=3D 'x' || buf_ptr[1] =3D=3D 'X') + in_base =3D BASE_16; + else + in_base =3D BASE_8; + } + + *e_token++ =3D *buf_ptr++; + if (in_base =3D=3D BASE_2 || in_base =3D=3D BASE_16) + *e_token++ =3D *buf_ptr++; /* Read the second character from + * 0b... / 0x... expressions. + */ + + switch (in_base) { + case BASE_2: + while (*buf_ptr =3D=3D '0' || *buf_ptr =3D=3D '1') { CHECK_SIZE_TOKEN; *e_token++ =3D *buf_ptr++; } - } - else + break; + case BASE_8: + while (*buf_ptr >=3D '0' && *buf_ptr <=3D '8') { + CHECK_SIZE_TOKEN; + *e_token++ =3D *buf_ptr++; + } + break; + case BASE_10: while (1) { if (*buf_ptr =3D=3D '.') { if (seendot) @@ -209,6 +234,29 @@ } break; } + + break; + case BASE_16: + while (isxdigit(*buf_ptr)) { + CHECK_SIZE_TOKEN; + *e_token++ =3D *buf_ptr++; + } + break; + } + if (isalnum(*buf_ptr)) { + char *buf; + /* current token is malformed */ + if (asprintf(&buf, "Ignoring invalid numeric " + "expression '%s%c...'", s_token, *buf_ptr)) { + diag2(0, buf); + free(buf); + } + /* finish to eat the current token */ + while (isalnum(*buf_ptr)) { + CHECK_SIZE_TOKEN; + *e_token++ =3D *buf_ptr++; + } + } } else while (chartype[(int)*buf_ptr] =3D=3D alphanum || *buf_ptr =3D=3D BAC= KSLASH) { --ikeVEW9yuYc//A+q-- --3lcZGd9BuhuYXNfi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkgUe7IACgkQ2OmjP/9W/0MhoACeK0qhAaMthPMw2aWzVvDpeihg k7UAn3oC1vOUyVRKkzkmD275LZ5+ZXvb =ka6I -----END PGP SIGNATURE----- --3lcZGd9BuhuYXNfi-- From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 27 21:03:11 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60C07106564A for ; Sun, 27 Apr 2008 21:03:11 +0000 (UTC) (envelope-from jrisom@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.180]) by mx1.freebsd.org (Postfix) with ESMTP id 128308FC0A for ; Sun, 27 Apr 2008 21:03:10 +0000 (UTC) (envelope-from jrisom@gmail.com) Received: by py-out-1112.google.com with SMTP id u52so7305615pyb.10 for ; Sun, 27 Apr 2008 14:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:content-transfer-encoding:cc:from:subject:date:to:x-mailer; bh=p9S2oNJE/E1yX9ejGR1PN8gyh2uM2FYDN3dPdOyOoNQ=; b=UJ8GdBcUm/m415w+hJddHJjYaVLVAL3ylO6s0ZXn8NBqDn0z5FdUhfRGuEqXGT2eNZ2unCpuJ+jf+wHR/pSAc3MYuHY6zfo9Wpvx2l6nIzdYd5RF/Cp0fOVh+1Eo8vefWrb8YseSzUEYdTX4rRqlicIBp8yuBbFo60VP+eQwZXo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=in-reply-to:references:mime-version:content-type:message-id:content-transfer-encoding:cc:from:subject:date:to:x-mailer; b=x1WWhIeI+8fAvgCpkAzy4vKDUGuTO+qBMHj39irKosknBH696/bza6lzlwwHLDXiRW/TczCOYvFLDDe7KA1Ww28zVHXxBydyT0rN2vOvF9uqdJc4mjU8yLxy1gmAwPeKKZy2hle3OPFjxwHsamXvLENyFFVhSx4ARrxEvoxQjKE= Received: by 10.35.86.19 with SMTP id o19mr11663692pyl.43.1209328569572; Sun, 27 Apr 2008 13:36:09 -0700 (PDT) Received: from ?192.168.1.4? ( [98.212.164.35]) by mx.google.com with ESMTPS id a48sm13598412pyh.24.2008.04.27.13.36.03 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 27 Apr 2008 13:36:06 -0700 (PDT) In-Reply-To: <20080426213557.GA88577@marvin.blogreen.org> References: <20080426213557.GA88577@marvin.blogreen.org> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable From: Joshua Isom Date: Sun, 27 Apr 2008 15:38:54 -0500 To: =?ISO-8859-1?Q?Romain_Tarti=E8re?= X-Mailer: Apple Mail (2.624) Cc: hackers@freebsd.org, Romuald Conty Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2008 21:03:11 -0000 On Apr 26, 2008, at 4:35 PM, Romain Tarti=E8re wrote: > Hello FreeBSD hackers! > > I'm using avr-gcc from the ports and relying on the 0b prefix notation > for binary constants, that is: > > foo =3D 0b00101010; > > Thanks to /usr/ports/devel/avr-gcc/files/patch-0b-constants this is > possible :-) > > But I would like to use indent(1) to reformat contributed code > automatically. Unfortunately, the 0b notation is not supported by that > program, and the resulting code looks like this: > > foo =3D 0 b00101010; > > ... then compilation fails, bla bla bla... > > A quick look at indent(1) source code leaded me to tweak > /usr/src/usr.bin/indent/lexi.c so that the 0b notation is supported > (patch attached). > > I was so wondering how useful(less) it was to support this extension = in > FreeBSD indent(1) program. The version of gcc provided with the base > system does not support this syntax, and AFAIK, only the avr-gcc port > support this kind of constructs... > > So options are: > - Add support for 0b notation to FreeBSD indent(1) (maybe requiring > the use of an extra command line argument to support this = feature); > - Provide a patch for indent(1) that can be conditionally applied on > the code when compiling the world; > - Create another port, say avr-indent(1), that is not more than a=20 > copy > of indent(1) with support of 0b constructs; > - Do nothing: tweaking indent(1) for supporting this is so trivial > that the few individuals interested in this can have their local > version of indent. > > Can you please tell me your opinion about this? > > Thank you in advance, > Romain > > PS: I also took a look at GNU indent (gindent(1) from the ports), but=20= > it > does not support 0b notation too. > > --=20 > Romain Tarti=E8re =20 > http://romain.blogreen.org/ > pgp: 8DAB A124 0DA4 7024 F82A E748 D8E9 A33F FF56 FF43 (ID:=20 > 0xFF56FF43) > (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much=20 > appreciated) > Why not just have a base2.h file that is a list of defines such as: #define b00000001 1 #define b00000010 2 Then you just use a b00 syntax, perfectly valid, and all's well=20 everywhere. Considering that the 0b syntax isn't valid without a patch=20= that's only available with one compiler that's probably not regularly=20 used, it'd probably be much more maintainable and not require anyone=20 compiling the program to install that specific port with that specific=20= patch. But of course, writing software that deals directly with bit fiddling=20 is annoying without using binary representation. The man page for indent does say "it has a 'forgiving' parser" so I=20 don't see why it can't just treat any token starting with a zero as=20 special, treat 0b01, 0x0A, 0f4 and 010 as a number regardless of the=20 base, even if it doesn't know the base.= From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 28 03:37:51 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 621F0106566C for ; Mon, 28 Apr 2008 03:37:51 +0000 (UTC) (envelope-from israsilva@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.233]) by mx1.freebsd.org (Postfix) with ESMTP id 36F118FC2A for ; Mon, 28 Apr 2008 03:37:51 +0000 (UTC) (envelope-from israsilva@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so3071989rvf.43 for ; Sun, 27 Apr 2008 20:37:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=eLD25rZbX4Zj6Vc9lJH+ahIz45as3RgLxU/Nb9zY5UA=; b=I0O0a5Y4nMKiWd2fKZZuraWWs3s6j1v0soMOhziuswxfD62Hatz2Ot9+rari8zHjRCr1L4JbmZ1xZoAC/wlJ3xuxvq4xWVCPxCAE7wNpP/hCXu35q35s7o1NOTXcSvaGa73PPVnqSqb1q6D8JbwnAC8ZT2z1Os3NNGjjgE/+lsI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Eww2ed6tatJr9UBYkBPQ5p24z6jw1B0n6q8jPe6K4+3qodnk58NpeNkAT+9R4xgkLMFlH67Y0hUUr7lcPX7aoGcD/UNKxyjZA8DWCenzx46VSN9X9ebycXTX3WOBucdZw1xgNX33ZYxZ5F6pYycdFpspEXNzOaPEXT1cNlnlf84= Received: by 10.141.163.12 with SMTP id q12mr2847251rvo.260.1209352230866; Sun, 27 Apr 2008 20:10:30 -0700 (PDT) Received: by 10.140.249.21 with HTTP; Sun, 27 Apr 2008 20:10:30 -0700 (PDT) Message-ID: <5ce468b90804272010t40ce6dacia2ba94feaadfb833@mail.gmail.com> Date: Mon, 28 Apr 2008 00:10:30 -0300 From: "Israel Lehnen Silva" To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: information buffer of NIC X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2008 03:37:51 -0000 Hello! I need information of load of buffer NICs Yours have one suggestion? Muito obrigado. -- Att. Israel Lehnen Silva From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 28 07:41:39 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76492106564A for ; Mon, 28 Apr 2008 07:41:39 +0000 (UTC) (envelope-from frank@pinky.sax.de) Received: from post.frank-behrens.de (post.frank-behrens.de [82.139.255.138]) by mx1.freebsd.org (Postfix) with ESMTP id D55B78FC0A for ; Mon, 28 Apr 2008 07:41:38 +0000 (UTC) (envelope-from frank@pinky.sax.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pinky.sax.de; h=from:to:date:mime-version:subject:in-reply-to:content-type:content-transfer-encoding:content-description; q=dns/txt; s=pinky1; t=1209367669; i=frank@pinky.sax.de; bh=hx/811vfUM+8BOgzYR0vdUxWAHRt+G2fyR0Pa3BJwdQ=; b=EZl3ZcVMo1wm/rJJKzru1+r1xXS7+zqVgK4JgUV/22/fiUlgyo8cuPFDs6djcaP6igGn8GHhYO0whY1m24yDHw== Received: from [192.168.20.32] (sun.behrens [192.168.20.32]) by post.frank-behrens.de (8.14.2/8.14.2) with ESMTP-MSA id m3S7RZMP017473 for ; Mon, 28 Apr 2008 09:27:35 +0200 (CEST) (envelope-from frank@pinky.sax.de) Message-Id: <200804280727.m3S7RZMP017473@post.frank-behrens.de> From: "Frank Behrens" To: freebsd-hackers@freebsd.org Date: Mon, 28 Apr 2008 09:27:35 +0200 MIME-Version: 1.0 Priority: normal In-reply-to: <20080426213557.GA88577@marvin.blogreen.org> X-mailer: Pegasus Mail for Windows (4.31, DE v4.31 R1) Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 8BIT Content-description: Mail message body X-Hashcash: 1:24:080428:freebsd-hackers@freebsd.org::oTU2oS6GuFRL4aBY:0000000zEwO Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2008 07:41:39 -0000 Romain Tartière wrote on 26 Apr 2008 23:35: >... > I was so wondering how useful(less) it was to support this extension in > FreeBSD indent(1) program. The version of gcc provided with the base > system does not support this syntax, and AFAIK, only the avr-gcc port > support this kind of constructs... It will be useful. The new gcc 4.3 release supports this extension without addtional patches. I cite the changelog: "Integer constants written in binary are now supported as a GCC extension. They consist of a prefix 0b or 0B, followed by a sequence of 0 and 1 digits." -- Frank Behrens, Osterwieck, Germany PGP-key 0x5B7C47ED on public servers available. From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 28 13:22:50 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61ED1106566C for ; Mon, 28 Apr 2008 13:22:50 +0000 (UTC) (envelope-from sigtrm@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.235]) by mx1.freebsd.org (Postfix) with ESMTP id 2303C8FC0A for ; Mon, 28 Apr 2008 13:22:49 +0000 (UTC) (envelope-from sigtrm@gmail.com) Received: by wr-out-0506.google.com with SMTP id 50so2389395wra.13 for ; Mon, 28 Apr 2008 06:22:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=IvJlJnY70CTQmcpBNuzw5wlNZqyuNWQ0J3s7pqahga4=; b=W8/mCjzXtzWMbXqajrP+0EaVwVDEeqDikkKZdlLPVRVxKWja1DgM9ptkltamHBiBL3Inh0UH1EYnQGFoOeraAEW8M/bsc8RSVhnm9Nq0+/oKAi0s8vdrJHJ/ZjPVABoa2fJxdQ95J0X96loWMNF9Kl0tJp6VcBl3MR1mu8jaxaA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=qBzPibhFSQRwvbf2P/Th7ZoBbkq9K1fJR4ccICMlvP37LgNmXO+WiaoQyt245gvPnR5LxEZTCe7e8rIzZKpJWolQJBGBP30b5bUTdkKsjTSubDrUFKW90z2i6zeWbmSFdwN3Ettgsrxw59dXXkMifqHLSsFum6HZ8UjQarzB1SE= Received: by 10.141.96.21 with SMTP id y21mr3218189rvl.132.1209387210009; Mon, 28 Apr 2008 05:53:30 -0700 (PDT) Received: by 10.141.42.6 with HTTP; Mon, 28 Apr 2008 05:53:29 -0700 (PDT) Message-ID: Date: Mon, 28 Apr 2008 14:53:29 +0200 From: "Lukasz Jaroszewski" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: RE: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2008 13:22:50 -0000 >On Apr 26, 2008, at 5:01 PM, Max Laier wrote: >>* On Saturday 26 April 2008 23:35:57 Romain Tarti=E8re wrote: *>>>* Hello FreeBSD hackers! *>>>* *>>>* I'm using avr-gcc from the ports and relying on the 0b prefix *>>>* notation *>>>* for binary constants, that is: *>>>* *>>>* =09foo =3D 0b00101010; *>>>* *>>>* Thanks to /usr/ports/devel/avr-gcc/files/patch-0b-constants this is *>>>* possible :-) *>>>* *>>>* But I would like to use indent(1) to reformat contributed code *>>>* automatically. Unfortunately, the 0b notation is not supported by *>>>* that *>>>* program, and the resulting code looks like this: *>>>* *>>>* =09foo =3D 0 b00101010; *>>>* *>>>* ... then compilation fails, bla bla bla... *>>* *>>* I can't think of a case (outside of "0x...." context) where "...0b..." *>>* would be valid C code, let alone better formated as "...0 b...". *>>* Hence I *>>* see no harm in adding your patch to the base indent(1). *>>* *>>* Does anyone have an example where "...0 b..." is valid C code? *> >Well, if b... is a preprocessor define then you can easily >come up with valid C: > >#define b...=09*2 > >then:=09=09...0 b... >becomes:=09...0 *2 > >That's a valid expression in the right context... > >FYI, > >-- >Marcel Moolenaar >xcllnt at mac.com >From c-faq.com( by Bill Finke ): #define Ob(x) ((unsigned)Ob_(0 ## x ## uL)) #define Ob_(x) (x & 1 | x >> 2 & 2 | x >> 4 & 4 | x >> 6 & 8 |=09=09\ =09x >> 8 & 16 | x >> 10 & 32 | x >> 12 & 64 | x >> 14 & 128) --- #define PORT_SYSCTLA 0x092 /* PS2 system control port A */ #define SYSCTLA_DSK Ob(10000000) /* lights the fixed dsk activity led */ #define SYSCTLA_DSK0 Ob(01000000) /* also lights fixed disk actvty led */ #define SYSCTLA_TMOT Ob(00010000) /* watchdog timer has timed-out */ #define SYSCTLA_LOCK Ob(00001000) /* CMOS password area is locked */ #define SYSCTLA_A20 Ob(00000010) /* alternate address line 20 gating */ #define SYSCTLA_RST Ob(00000001) /* alternate hot reset */ regards LJ776-RIPE From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 29 04:12:30 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD95E106566C for ; Tue, 29 Apr 2008 04:12:30 +0000 (UTC) (envelope-from israsilva@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.225]) by mx1.freebsd.org (Postfix) with ESMTP id 883C58FC14 for ; Tue, 29 Apr 2008 04:12:30 +0000 (UTC) (envelope-from israsilva@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so3409001rvf.43 for ; Mon, 28 Apr 2008 21:12:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=n4/agDFaJAEctI4gCxNh4mYmML5KdYwOFaeeP7d2wUM=; b=pTW13WZsCDzUQL/uHWUdcUsyRuAJt1OJIt+8wJUAQTPyqj39TMm/B1Q4BnaeNbg4dasg7UNhUuAtpfXYnGkFdmtJsJxSVH2Oq5nRiofq37az0h0vL7WX0ch0U4/oxCvsy5g1/LFyLDsQG6hdIE8wnGSoUIZUouJRPzsZVSUv29k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jgug5fGGZomjTPMKuxkA+3N3GvjaXQqOfXbgY4H/msOGrMT9SY7u/ODkelLxNH9yVMUBkvjN/pidm8hWVfVaAxBwq3F9SA0paLVPB8eMOPNVqh+9O5wtoBCYpCoixgczPdbj+CizUasiGpB8wa0h3G6Ant8A1NHkdw4dK6H3ulo= Received: by 10.141.15.19 with SMTP id s19mr3216580rvi.269.1209440734189; Mon, 28 Apr 2008 20:45:34 -0700 (PDT) Received: by 10.140.249.21 with HTTP; Mon, 28 Apr 2008 20:45:34 -0700 (PDT) Message-ID: <5ce468b90804282045j2206759ev527612471d28cd92@mail.gmail.com> Date: Tue, 29 Apr 2008 00:45:34 -0300 From: "Israel Lehnen Silva" To: freebsd-hackers@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <5ce468b90804272010t40ce6dacia2ba94feaadfb833@mail.gmail.com> Subject: Re: information buffer of NIC X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2008 04:12:30 -0000 it print info of ethernet device? in one example: http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=3D/com.ibm= .aix.prftungd/doc/prftungd/nestat_m.htm show CPU 0 and CPU 1.... On Tue, Apr 29, 2008 at 12:22 AM, Victor Hugo Bilouro w= rote: > > On Mon, Apr 28, 2008 at 12:10 AM, Israel Lehnen Silva > wrote: > > Hello! > > > > I need information of load of buffer NICs > > Yours have one suggestion? > > > > Muito obrigado. > > > > -- > > > > Att. Israel Lehnen Silva > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd= .org" > > > > netstat -m > > http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.bin/netstat/ > > -- > Victor Hugo Bilouro > FreeBSD! > 21 7832 5699 Celular > 8 * 72 757 R=E1dio > --=20 Att. Israel Lehnen Silva From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 29 04:56:19 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14425106564A for ; Tue, 29 Apr 2008 04:56:19 +0000 (UTC) (envelope-from rermilov@team.vega.ru) Received: from mail.vega.ru (infra.dev.vega.ru [90.156.167.14]) by mx1.freebsd.org (Postfix) with ESMTP id B492B8FC19 for ; Tue, 29 Apr 2008 04:56:18 +0000 (UTC) (envelope-from rermilov@team.vega.ru) Received: from [87.242.97.68] (port=60684 helo=edoofus.dev.vega.ru) by mail.vega.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68 (FreeBSD)) (envelope-from ) id 1JqhNL-000GuB-1e; Tue, 29 Apr 2008 04:23:31 +0000 Received: from edoofus.dev.vega.ru (localhost [127.0.0.1]) by edoofus.dev.vega.ru (8.14.2/8.14.2) with ESMTP id m3T4NRfx032750; Tue, 29 Apr 2008 08:23:27 +0400 (MSD) (envelope-from rermilov@team.vega.ru) Received: (from ru@localhost) by edoofus.dev.vega.ru (8.14.2/8.14.2/Submit) id m3T4NQkr032749; Tue, 29 Apr 2008 08:23:26 +0400 (MSD) (envelope-from rermilov@team.vega.ru) X-Authentication-Warning: edoofus.dev.vega.ru: ru set sender to rermilov@team.vega.ru using -f Date: Tue, 29 Apr 2008 08:23:26 +0400 From: Ruslan Ermilov To: Jeremie Le Hen Message-ID: <20080429042326.GA32641@team.vega.ru> References: <20080424160415.GC55613@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080424160415.GC55613@obiwan.tataz.chchile.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-hackers@freebsd.org Subject: Re: Using special CFLAGS for a single file without writing the rule X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2008 04:56:19 -0000 On Thu, Apr 24, 2008 at 06:04:15PM +0200, Jeremie Le Hen wrote: > Hi Ruslan, hi all, > > I don't know if you followed the thread on -arch@, but the outcome is > basically that SSP should be disabled for a couple of files: > lib/csu/* > gnu/lib/csu/* (reported by antoine@, but I couldn't verify this one) > lib/libc/sys/stack_protector.c > sys/kern/stack_protector.c > > Antoine Brodin supplied a patch for the kernel part: > +kern/stack_protector.c standard \ > + compile-with "${NORMAL_C:N-fstack-protector*}" > > As for lib/csu/*, this is straightforward, I just have to set > WITHOUT_SSP in the Makefile. > > The hardest one is lib/libc/sys/stack_protector.c. I endeavored to find > a way to compile a single file with ${CFLAGS:N-fstack-protector*}, but I > found no recipe but writing the whole rule for this file. I would > really like to avoid this solution so as to not override bsd.lib.mk > settings. > > Considering your big experience with the build infrastructure, I suspect > you would have a solution. > Either by using a special rule, or through a hack similar to the one found in the last two lines of libc/Makefile. Cheers, -- Ruslan Ermilov ru@FreeBSD.org FreeBSD committer From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 29 11:24:13 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D6C9106566C for ; Tue, 29 Apr 2008 11:24:13 +0000 (UTC) (envelope-from sharadc@in.niksun.com) Received: from in.niksun.com (210.18.76.166.sify.net [210.18.76.166]) by mx1.freebsd.org (Postfix) with ESMTP id 0C1F48FC1B for ; Tue, 29 Apr 2008 11:24:13 +0000 (UTC) (envelope-from sharadc@in.niksun.com) Received: from sharadc.in.niksun.com (unknown [10.60.5.27]) by in.niksun.com (Postfix) with ESMTP id 91AA85D66 for ; Tue, 29 Apr 2008 16:39:48 +0530 (IST) From: Sharad Chandra Organization: NIKSUN To: FreeBSD Hackers Date: Tue, 29 Apr 2008 16:13:13 +0530 User-Agent: KMail/1.9.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804291613.14081.sharadc@in.niksun.com> Subject: jumbo packets on em card. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2008 11:24:13 -0000 Hi, I am getting a problem in setting em card to 1000baseTX. It shows "active status" with 100baseTX but as soon as i run "ifconfig em1 media 1000baseTX mediaopt full-duplex", it says *no carrier*. how can i set it to 1000base? [root@app210 ~]# ifconfig -m em1 em1: flags=8843 mtu 9000 options=4b capabilities=5b inet6 fe80::204:23ff:febd:b5bd%em1 prefixlen 64 scopeid 0x2 inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255 ether 00:04:23:bd:b5:bd media: Ethernet 100baseTX status: active supported media: media autoselect media 1000baseTX media 1000baseTX mediaopt full-duplex media 100baseTX mediaopt full-duplex media 100baseTX media 10baseT/UTP mediaopt full-duplex media 10baseT/UTP And is it possible any how to send *jumbo packets* on this card or on bge card (bge card is working with 1000base)? I tried nemesis tool, but i don't think it can send bigger packets. BPF also seems to have limitaion upto 2K. -- Thanks Sharad Chandra From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 29 11:46:26 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65B141065675 for ; Tue, 29 Apr 2008 11:46:26 +0000 (UTC) (envelope-from nico-freebsd-hackers@schottelius.org) Received: from mx2.schottelius.org (mx2.schottelius.org [62.65.138.77]) by mx1.freebsd.org (Postfix) with ESMTP id 1EB458FC1B for ; Tue, 29 Apr 2008 11:46:25 +0000 (UTC) (envelope-from nico-freebsd-hackers@schottelius.org) Received: from denkbrett.schottelius.org (natgw.netstream.ch [62.65.128.28]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.schottelius.org (Postfix) with ESMTPSA id 755791A3375 for ; Tue, 29 Apr 2008 13:29:20 +0200 (CEST) Received: by denkbrett.schottelius.org (Postfix, from userid 1000) id BD1BE6008; Tue, 29 Apr 2008 13:29:22 +0200 (CEST) Date: Tue, 29 Apr 2008 13:29:22 +0200 From: Nico -telmich- Schottelius To: freebsd-hackers@freebsd.org Message-ID: <20080429112922.GA31801@denkbrett.schottelius.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OgqxwSJOaUobr8KG" Content-Disposition: inline User-Agent: echo $message | gpg -e $sender -s | netcat mailhost 25 X-Unix-Info: http://unix.schottelius.org/ X-Netzseite: http://nico.schottelius.org/ X-System-Info: denkbrett running Linux 2.6.25-denkbrett on x86_64 Subject: Where to put mouse-drivers? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2008 11:46:26 -0000 --OgqxwSJOaUobr8KG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello guys! I am interested in your opinion regarding this topic: http://nico.schottelius.org/notizbuch-blog/archive/2008/04/24/where-to-put-= mouse-drivers Thanks for any feedback, Nico --=20 Think about Free and Open Source Software (FOSS). http://nico.schottelius.org/documentations/foss/the-term-foss/ PGP: BFE4 C736 ABE5 406F 8F42 F7CF B8BE F92A 9885 188C --OgqxwSJOaUobr8KG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIFwaSuL75KpiFGIwRAstRAKDJ64+sDzBKUeje4gYR2Q9EPoWEDgCg1sKh 5A+Cec45Dwx4QF9T1dIuzbg= =tTXC -----END PGP SIGNATURE----- --OgqxwSJOaUobr8KG-- From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 29 12:02:10 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2295B1065674 for ; Tue, 29 Apr 2008 12:02:10 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id 109A38FC38 for ; Tue, 29 Apr 2008 12:02:09 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id A31431CC038; Tue, 29 Apr 2008 05:02:09 -0700 (PDT) Date: Tue, 29 Apr 2008 05:02:09 -0700 From: Jeremy Chadwick To: Sharad Chandra Message-ID: <20080429120209.GA44534@eos.sc1.parodius.com> References: <200804291613.14081.sharadc@in.niksun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200804291613.14081.sharadc@in.niksun.com> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: FreeBSD Hackers Subject: Re: jumbo packets on em card. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2008 12:02:10 -0000 On Tue, Apr 29, 2008 at 04:13:13PM +0530, Sharad Chandra wrote: > I am getting a problem in setting em card to 1000baseTX. It shows "active > status" with 100baseTX but as soon as i run "ifconfig em1 media 1000baseTX > mediaopt full-duplex", it says *no carrier*. how can i set it to 1000base? The PHYs support auto-negotiation of speed and duplex, as per the 802.3 standard. Do you have a gigabit switch? If so, does auto-negotiation (e.g. no "mediaopt" or "media" settings) work? If not, is the switch a managed switch? If so, try explicitly setting the port on the switch to 1000mbit, full duplex. If not, then consider buying another switch. Many consumer/residential switches do not do auto-negotiation properly, resulting in "no carrier" or worse (bad throughput). > And is it possible any how to send *jumbo packets* on this card or on bge card > (bge card is working with 1000base)? I tried nemesis tool, but i don't think > it can send bigger packets. BPF also seems to have limitaion upto 2K. man 4 em man 4 bge Keep in mind that if you use jumbo frames, your **entire network** needs to use jumbo frames. You cannot mix-and-match frame sizes. Chances are your ISPs or your co-lo provider doesn't support jumbo. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 29 12:22:39 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B38991065675 for ; Tue, 29 Apr 2008 12:22:39 +0000 (UTC) (envelope-from sharadc@in.niksun.com) Received: from in.niksun.com (210.18.76.166.sify.net [210.18.76.166]) by mx1.freebsd.org (Postfix) with ESMTP id 48DC28FC15 for ; Tue, 29 Apr 2008 12:22:39 +0000 (UTC) (envelope-from sharadc@in.niksun.com) Received: from sharadc.in.niksun.com (unknown [10.60.5.27]) by in.niksun.com (Postfix) with ESMTP id 830215CF8; Tue, 29 Apr 2008 18:10:17 +0530 (IST) From: Sharad Chandra Organization: NIKSUN To: Jeremy Chadwick Date: Tue, 29 Apr 2008 17:43:42 +0530 User-Agent: KMail/1.9.4 References: <200804291613.14081.sharadc@in.niksun.com> <20080429120209.GA44534@eos.sc1.parodius.com> In-Reply-To: <20080429120209.GA44534@eos.sc1.parodius.com> X-Face: "$jQ]ksJ8"4@"hbi0lV=]BJ`myq*p; AcKl=e)=?utf-8?q?=5B3jei!uFob=0A=09?=(xpq6aZ|P(h&l}OxOfr`KGp2}$`IF-)7F6Pp[X#)n*&VF>=?utf-8?q?BoCU0iZ=3F6=7CAZpbi=23F=3B=5E0wP-d=0A=09W=5EucFs*nP?=@dj7x`; _PG@wRen8\in2VpfmCz(,.|>=?utf-8?q?U2KD*hIJHk86=5EH=5E=0A=09ct/-=3F=3D8i16u?=,oB'J*9^\#aN' MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200804291743.43010.sharadc@in.niksun.com> Cc: FreeBSD Hackers Subject: Re: jumbo packets on em card. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2008 12:22:39 -0000 ,---- [Jeremy Chadwick wrote:] | On Tue, Apr 29, 2008 at 04:13:13PM +0530, Sharad Chandra wrote: | > I am getting a problem in setting em card to 1000baseTX. It shows "active | > status" with 100baseTX but as soon as i run "ifconfig em1 media | > 1000baseTX mediaopt full-duplex", it says *no carrier*. how can i set it | > to 1000base? | | The PHYs support auto-negotiation of speed and duplex, as per the 802.3 | standard. | | Do you have a gigabit switch? If so, does auto-negotiation (e.g. no | "mediaopt" or "media" settings) work? If not, is the switch a managed | switch? If so, try explicitly setting the port on the switch to | 1000mbit, full duplex. If not, then consider buying another switch. | Many consumer/residential switches do not do auto-negotiation properly, | resulting in "no carrier" or worse (bad throughput). No, I am not using any switch. It is back-to-back connection. It is only requirement for me. | | > And is it possible any how to send *jumbo packets* on this card or on bge | > card (bge card is working with 1000base)? I tried nemesis tool, but i | > don't think it can send bigger packets. BPF also seems to have limitaion | > upto 2K. | | man 4 em | man 4 bge | | Keep in mind that if you use jumbo frames, your **entire network** needs | to use jumbo frames. You cannot mix-and-match frame sizes. Chances are | your ISPs or your co-lo provider doesn't support jumbo. -- `---- -- Thanks Sharad Chandra From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 29 12:43:21 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D91391065679 for ; Tue, 29 Apr 2008 12:43:21 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id C68058FC1A for ; Tue, 29 Apr 2008 12:43:21 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 9089E1CC038; Tue, 29 Apr 2008 05:43:21 -0700 (PDT) Date: Tue, 29 Apr 2008 05:43:21 -0700 From: Jeremy Chadwick To: Sharad Chandra Message-ID: <20080429124321.GA45965@eos.sc1.parodius.com> References: <200804291613.14081.sharadc@in.niksun.com> <20080429120209.GA44534@eos.sc1.parodius.com> <200804291743.43010.sharadc@in.niksun.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200804291743.43010.sharadc@in.niksun.com> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: FreeBSD Hackers Subject: Re: jumbo packets on em card. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2008 12:43:22 -0000 On Tue, Apr 29, 2008 at 05:43:42PM +0530, Sharad Chandra wrote: > ,---- [Jeremy Chadwick wrote:] > | On Tue, Apr 29, 2008 at 04:13:13PM +0530, Sharad Chandra wrote: > | > I am getting a problem in setting em card to 1000baseTX. It shows "active > | > status" with 100baseTX but as soon as i run "ifconfig em1 media > | > 1000baseTX mediaopt full-duplex", it says *no carrier*. how can i set it > | > to 1000base? > | > | The PHYs support auto-negotiation of speed and duplex, as per the 802.3 > | standard. > | > | Do you have a gigabit switch? If so, does auto-negotiation (e.g. no > | "mediaopt" or "media" settings) work? If not, is the switch a managed > | switch? If so, try explicitly setting the port on the switch to > | 1000mbit, full duplex. If not, then consider buying another switch. > | Many consumer/residential switches do not do auto-negotiation properly, > | resulting in "no carrier" or worse (bad throughput). > > No, I am not using any switch. It is back-to-back connection. It is only > requirement for me. By "back to back" you mean you're connecting two PCs together with a proper crossover cable? Is it CAT5e at least? What PHY and NIC are on the opposite end of the em(4)? -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 29 20:16:13 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 574FF1065677; Tue, 29 Apr 2008 20:16:13 +0000 (UTC) (envelope-from vi0@semihalf.com) Received: from semihalf.com (semihalf.com [206.130.101.55]) by mx1.freebsd.org (Postfix) with ESMTP id 16C898FC18; Tue, 29 Apr 2008 20:16:12 +0000 (UTC) (envelope-from vi0@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [83.15.139.206]) by semihalf.com (8.13.1/8.13.1) with ESMTP id m3TKGB9E009471; Tue, 29 Apr 2008 14:16:11 -0600 Message-ID: <481781FC.7030108@semihalf.com> Date: Tue, 29 Apr 2008 22:15:56 +0200 From: Przemek Witaszczyk MIME-Version: 1.0 To: hackers@freebsd.org, ppc@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Efika port: Re to Sam Xia's chip question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vi0@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2008 20:16:13 -0000 Hello! The chip used by me to port FreeBSD to Efika is MPC5200B based on e300 core, which in turn is an enhanced version of 603e. Have a look: http://www.genesi-usa.com/efika.php Also, you can check my GSoC FreeBSD wiki from time to time: http://wiki.freebsd.org/PrzemekWitaszczyk Best regards, Przemek From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 30 10:48:58 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B8EB1065674 for ; Wed, 30 Apr 2008 10:48:58 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from smtp3-g19.free.fr (smtp3-g19.free.fr [212.27.42.29]) by mx1.freebsd.org (Postfix) with ESMTP id EE84A8FC21 for ; Wed, 30 Apr 2008 10:48:57 +0000 (UTC) (envelope-from romain@blogreen.org) Received: from smtp3-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp3-g19.free.fr (Postfix) with ESMTP id 3C3C317B595 for ; Wed, 30 Apr 2008 12:48:56 +0200 (CEST) Received: from marvin.blogreen.org (marvin.blogreen.org [82.247.213.140]) by smtp3-g19.free.fr (Postfix) with ESMTP id 22CDA17B592 for ; Wed, 30 Apr 2008 12:48:55 +0200 (CEST) Received: by marvin.blogreen.org (Postfix, from userid 1001) id B72175C05D; Wed, 30 Apr 2008 12:48:55 +0200 (CEST) Date: Wed, 30 Apr 2008 12:48:55 +0200 From: Romain =?iso-8859-1?Q?Tarti=E8re?= To: hackers@freebsd.org Message-ID: <20080430104855.GA26622@marvin.blogreen.org> Mail-Followup-To: hackers@freebsd.org References: <20080426213557.GA88577@marvin.blogreen.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="17pEHd4RhPHOinZp" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-PGP-Key: http://romain.blogreen.org/pubkey.asc Cc: Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2008 10:48:58 -0000 --17pEHd4RhPHOinZp Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 27, 2008 at 03:38:54PM -0500, Joshua Isom wrote: > The man page for indent does say "it has a 'forgiving' parser" so I=20 > don't see why it can't just treat any token starting with a zero as=20 > special, treat 0b01, 0x0A, 0f4 and 010 as a number regardless of the=20 > base, even if it doesn't know the base. I think indent(1) has to check the base in order to split tokens consistently. Consider the following statements: read | write | description --------------+---------------+----------------------------- 42 | 42 | Decimal 42e+3 | 42e+3 | Decimal 042 | 042 | Octal 042e+3 | 042e+3 | Octal?? gcc compiles this but the result | | looks strange... 0x42 | 0x42 | Hexadecimal 0x42e+3 | 0x42e + 3 | Hexadecimal + Decimal IMHO, checking numbers base is a requirement for splitting tokens wisely. Regards --=20 Romain Tarti=E8re http://romain.blogreen.org/ pgp: 8DAB A124 0DA4 7024 F82A E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43) (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated) --17pEHd4RhPHOinZp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkgYTpcACgkQ2OmjP/9W/0NuUwCfdrrXJXD1omAv7BdXrnGHhNfA 4L0AoI/mhXF2ZOajX2vTYhpPmF4GGk28 =zjZp -----END PGP SIGNATURE----- --17pEHd4RhPHOinZp-- From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 30 21:12:12 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A9F9106566B for ; Wed, 30 Apr 2008 21:12:12 +0000 (UTC) (envelope-from ravi.murty@intel.com) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx1.freebsd.org (Postfix) with ESMTP id 11DD78FC0C for ; Wed, 30 Apr 2008 21:12:12 +0000 (UTC) (envelope-from ravi.murty@intel.com) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 30 Apr 2008 14:10:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.25,730,1199692800"; d="scan'208,217";a="323174078" Received: from orsmsx334.amr.corp.intel.com (HELO orsmsx334.jf.intel.com) ([10.22.226.45]) by fmsmga002.fm.intel.com with ESMTP; 30 Apr 2008 14:10:24 -0700 Received: from orsmsx416.amr.corp.intel.com ([10.22.226.46]) by orsmsx334.jf.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 30 Apr 2008 14:12:11 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Wed, 30 Apr 2008 14:11:32 -0700 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: maybe_preempt_in_ksegrp Thread-Index: AcirBsOzIIs6vT8nSGydqLJ1uKALdQ== From: "Murty, Ravi" To: X-OriginalArrivalTime: 30 Apr 2008 21:12:11.0407 (UTC) FILETIME=[DB1921F0:01C8AB06] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: maybe_preempt_in_ksegrp X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2008 21:12:12 -0000 Hello All, =20 Looking through the scheduler code (kern_switch.c) and two functions that stood out were the following: =20 1. maybe_preempt_in_ksegrp - this function basically checks if the thread being made runnable should preempt another thread that is part of the same ksegrp. This makes sense. What I am having difficulty wrapping my brain around is the fact that if all checks pass, the kernel call mi_switch(SW_INVOL, NULL). The second parameter is NULL. This means that it expects sched_choose to pick a thread from the ksegrp. I would have expected it to say "I am preempting curthread because I am in the same ksegrp but higher priority, therefore switch to me".. the second parameter would have been td? When I compare this with what happens in mybe_preempt, the second parameter to mi_switch is the target thread because we're preempting the curthread (any ksegrp) to run the new thread. This makes sense. 2. Why do we check the state of the kse and make sure it is KES_THREAD. I would imagine that when this function is called, the state is exactly KES_THREAD? What am I missing here? =20 Thanks Ravi Murty From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 30 21:26:37 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF281106564A for ; Wed, 30 Apr 2008 21:26:37 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outA.internet-mail-service.net (outa.internet-mail-service.net [216.240.47.224]) by mx1.freebsd.org (Postfix) with ESMTP id CCC9E8FC0A for ; Wed, 30 Apr 2008 21:26:37 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Wed, 30 Apr 2008 19:44:10 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id D5D762D6004; Wed, 30 Apr 2008 14:26:36 -0700 (PDT) Message-ID: <4818E40F.9070004@elischer.org> Date: Wed, 30 Apr 2008 14:26:39 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: "Murty, Ravi" References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: maybe_preempt_in_ksegrp X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2008 21:26:38 -0000 Murty, Ravi wrote: > Hello All, > > > > Looking through the scheduler code (kern_switch.c) and two functions > that stood out were the following: > > > > 1. maybe_preempt_in_ksegrp - this function basically checks if the > thread being made runnable should preempt another thread that is part of > the same ksegrp. This makes sense. What I am having difficulty wrapping > my brain around is the fact that if all checks pass, the kernel call > mi_switch(SW_INVOL, NULL). The second parameter is NULL. This means that > it expects sched_choose to pick a thread from the ksegrp. While "I" am higher than others in the kse group, I may not be the highest thread avalable in the system. (at least that is my recollection without going to check out a 6.x tree to look back at it.. My memory is that it just placed itself on the KSEG's run queue. If it thinks that it doesn't have a chance of running it doesn't bother to even try to get scheduled, but if it thinks it might, then it asks for the scheduler to re-evaluate. > I would have > expected it to say "I am preempting curthread because I am in the same > ksegrp but higher priority, therefore switch to me".. the second > parameter would have been td? When I compare this with what happens in > mybe_preempt, the second parameter to mi_switch is the target thread > because we're preempting the curthread (any ksegrp) to run the new > thread. This makes sense. possibly. you could try it to see if it makes a difference. This code was all removed in 7.x It was never completed Why are you studying 6.x? I asked you this before but I forgot the answer :-) > 2. Why do we check the state of the kse and make sure it is > KES_THREAD. I would imagine that when this function is called, the state > is exactly KES_THREAD? What am I missing here? Paranoia and history. > > > > Thanks > > Ravi Murty > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 30 21:35:57 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE9F21065780 for ; Wed, 30 Apr 2008 21:35:57 +0000 (UTC) (envelope-from cliftonr@lava.net) Received: from outgoing01.lava.net (cake.lava.net [IPv6:2001:1888:0:1:230:48ff:fe5b:3b50]) by mx1.freebsd.org (Postfix) with ESMTP id 600228FC13 for ; Wed, 30 Apr 2008 21:35:57 +0000 (UTC) (envelope-from cliftonr@lava.net) Received: from malasada.lava.net (malasada.lava.net [64.65.64.17]) by outgoing01.lava.net (Postfix) with ESMTP id A5208D0273; Wed, 30 Apr 2008 11:35:46 -1000 (HST) Received: by malasada.lava.net (Postfix, from userid 102) id 0C459153882; Wed, 30 Apr 2008 11:35:44 -1000 (HST) Date: Wed, 30 Apr 2008 11:35:43 -1000 From: Clifton Royston To: Sharad Chandra Message-ID: <20080430213542.GA21791@lava.net> Mail-Followup-To: Sharad Chandra , FreeBSD hackers list References: <20080430120016.32879106567C@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080430120016.32879106567C@hub.freebsd.org> User-Agent: Mutt/1.4.2.2i Cc: FreeBSD hackers list Subject: Re: jumbo packets on em card. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2008 21:35:57 -0000 On Wed, Apr 30, 2008 at 12:00:16PM +0000, freebsd-hackers-request@freebsd.org wrote: > Date: Tue, 29 Apr 2008 17:43:42 +0530 > From: Sharad Chandra > Subject: Re: jumbo packets on em card. > To: Jeremy Chadwick > Cc: FreeBSD Hackers > Message-ID: <200804291743.43010.sharadc@in.niksun.com> > Content-Type: text/plain; charset="iso-8859-1" > > ,---- [Jeremy Chadwick wrote:] > | On Tue, Apr 29, 2008 at 04:13:13PM +0530, Sharad Chandra wrote: > | > I am getting a problem in setting em card to 1000baseTX. It shows "active > | > status" with 100baseTX but as soon as i run "ifconfig em1 media > | > 1000baseTX mediaopt full-duplex", it says *no carrier*. how can i set it > | > to 1000base? > | > | The PHYs support auto-negotiation of speed and duplex, as per the 802.3 > | standard. > | > | Do you have a gigabit switch? If so, does auto-negotiation (e.g. no > | "mediaopt" or "media" settings) work? If not, is the switch a managed > | switch? If so, try explicitly setting the port on the switch to > | 1000mbit, full duplex. If not, then consider buying another switch. > | Many consumer/residential switches do not do auto-negotiation properly, > | resulting in "no carrier" or worse (bad throughput). > > No, I am not using any switch. It is back-to-back connection. It is only > requirement for me. Bear in mind that because GigE uses more of the cable pairs in an RJ-48 than 100baseTX does, a defective or improperly wired crossover cable between two machines may work fine for 100baseTX and fail for 1000baseTX. I strongly suspect that that's your problem. Try replacing the cable or reterminating both ends and carefully checking the color/pin assignments against a reference. -- Clifton -- Clifton Royston -- cliftonr@iandicomputing.com / cliftonr@lava.net President - I and I Computing * http://www.iandicomputing.com/ Custom programming, network design, systems and network consulting services From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 30 21:36:33 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C324106564A for ; Wed, 30 Apr 2008 21:36:33 +0000 (UTC) (envelope-from ravi.murty@intel.com) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx1.freebsd.org (Postfix) with ESMTP id 6A7C48FC1D for ; Wed, 30 Apr 2008 21:36:33 +0000 (UTC) (envelope-from ravi.murty@intel.com) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 30 Apr 2008 14:34:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.25,730,1199692800"; d="scan'208";a="323182047" Received: from orsmsx334.amr.corp.intel.com (HELO orsmsx334.jf.intel.com) ([10.22.226.45]) by fmsmga002.fm.intel.com with ESMTP; 30 Apr 2008 14:34:43 -0700 Received: from orsmsx416.amr.corp.intel.com ([10.22.226.46]) by orsmsx334.jf.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 30 Apr 2008 14:36:26 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 30 Apr 2008 14:35:54 -0700 Message-ID: In-Reply-To: <4818E40F.9070004@elischer.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: maybe_preempt_in_ksegrp Thread-Index: AcirCOBLCWttC+gTTC6euGLQcEnp4gAAIVFw References: <4818E40F.9070004@elischer.org> From: "Murty, Ravi" To: "Julian Elischer" X-OriginalArrivalTime: 30 Apr 2008 21:36:26.0295 (UTC) FILETIME=[3E476C70:01C8AB0A] Cc: freebsd-hackers@freebsd.org Subject: RE: maybe_preempt_in_ksegrp X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2008 21:36:33 -0000 Julian, Apologies for sticking to 6.x, I checked and looks like this function and several others are out in 7.x. It's just that we've been using 6.x for a while and continue to look at it. :) Coming back, I was thinking of the problem the other way around. The thread gets put on the ksegrp runq, but we don't know if it gets put at the head of the queue. All we know is we either find a slot or not. If we do, great sched_add is called which will add it to a CPU runq and check if it can preempt some thread on the target CPU. If we can't find a slot, it checks if it can steal (preempt) some other thread (of the same ksegrp) from a cpu. Let's consider the UP case to keep this simple. One of the checks is the priority of the newly runnable thread and the curthread on the CPU and the fact that they are part of the same KSEGRP. If both pass, I think it should say "run me" since we just established that I am higher priority than what's running on the CPU. Ravi -----Original Message----- From: Julian Elischer [mailto:julian@elischer.org]=20 Sent: Wednesday, April 30, 2008 2:27 PM To: Murty, Ravi Cc: freebsd-hackers@freebsd.org Subject: Re: maybe_preempt_in_ksegrp Murty, Ravi wrote: > Hello All, >=20 > =20 >=20 > Looking through the scheduler code (kern_switch.c) and two functions > that stood out were the following: >=20 > =20 >=20 > 1. maybe_preempt_in_ksegrp - this function basically checks if the > thread being made runnable should preempt another thread that is part of > the same ksegrp. This makes sense. What I am having difficulty wrapping > my brain around is the fact that if all checks pass, the kernel call > mi_switch(SW_INVOL, NULL). The second parameter is NULL. This means that > it expects sched_choose to pick a thread from the ksegrp. While "I" am higher than others in the kse group, I may not be the=20 highest thread avalable in the system. (at least that is my recollection without going to check out a 6.x tree to look back at it.. My memory is that it just placed itself on the KSEG's run queue. If it thinks that it doesn't have a chance of running it doesn't=20 bother to even try to get scheduled, but if it thinks it might, then it asks for the scheduler to re-evaluate. > I would have > expected it to say "I am preempting curthread because I am in the same > ksegrp but higher priority, therefore switch to me".. the second > parameter would have been td? When I compare this with what happens in > mybe_preempt, the second parameter to mi_switch is the target thread > because we're preempting the curthread (any ksegrp) to run the new > thread. This makes sense. possibly. you could try it to see if it makes a difference. This code was all removed in 7.x It was never completed Why are you studying 6.x? I asked you this before but I forgot the=20 answer :-) > 2. Why do we check the state of the kse and make sure it is > KES_THREAD. I would imagine that when this function is called, the state > is exactly KES_THREAD? What am I missing here? Paranoia and history. >=20 > =20 >=20 > Thanks >=20 > Ravi Murty >=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 30 22:48:19 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 386691065671 for ; Wed, 30 Apr 2008 22:48:19 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.bluestop.org (unknown [IPv6:2001:41c8:1:548a::2]) by mx1.freebsd.org (Postfix) with ESMTP id A12FB8FC0C for ; Wed, 30 Apr 2008 22:48:18 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from [10.0.20.131] (cran1.demon.co.uk [80.177.26.208]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.bluestop.org (Postfix) with ESMTP id 4CCEE30108 for ; Wed, 30 Apr 2008 23:48:17 +0100 (BST) Message-ID: <4818F72C.90300@cran.org.uk> Date: Wed, 30 Apr 2008 23:48:12 +0100 From: Bruce Cran User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: sshd patch to avoid DNS lookups when using 'UseDNS no' or -u0 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2008 22:48:19 -0000 While investigating PR bin/97499 I realised that revision 1.2 of loginrec.c, which was in FreeBSD 4.6, introduced a DNS lookup into sshd itself which is impossible to avoid even after specifying 'UseDNS no' or -u0, and which duplicates one which has already been done earlier. The default OpenSSH behaviour is to decide whether or not to do the DNS lookup in get_remote_name_or_ip based on both the UseDNS setting and whether -u0 was specified on the command line. This has the disadvantage that unless the utmp length is specified on the command line the IP address may be resolved even when the hostname later has to be truncated to fit in the utmp record; it's this that rev 1.2 of loginrec.c fixed. A alternative solution which avoids the extra DNS lookup is to initialize the utmp_len variable in sshd.c to be UT_HOSTSIZE instead of MAXHOSTNAMELEN: this keeps the existing behaviour but still allows the user to override it with the -u parameter. I've attached a patch which implements this (the change to loginrec.c reverts it back to the default OpenSSH code) and was wondering if someone could take a look at it. -- Bruce --- /usr/src/crypto/openssh/loginrec.c 2006-09-30 14:38:04.000000000 +0100 +++ loginrec.c 2008-03-31 21:45:37.000000000 +0100 @@ -688,8 +688,8 @@ strncpy(ut->ut_name, li->username, MIN_SIZEOF(ut->ut_name, li->username)); # ifdef HAVE_HOST_IN_UTMP - realhostname_sa(ut->ut_host, sizeof ut->ut_host, - &li->hostaddr.sa, li->hostaddr.sa.sa_len); + strncpy(ut->ut_host, li->hostname, + MIN_SIZEOF(ut->ut_host, li->hostname)); # endif # ifdef HAVE_ADDR_IN_UTMP /* this is just a 32-bit IP address */ --- /usr/src/crypto/openssh/sshd.c 2006-11-10 16:52:41.000000000 +0000 +++ sshd.c 2008-03-31 21:45:41.000000000 +0100 @@ -71,6 +71,7 @@ #include #include #include +#include #include #include @@ -235,7 +236,7 @@ u_int session_id2_len = 0; /* record remote hostname or ip */ -u_int utmp_len = MAXHOSTNAMELEN; +u_int utmp_len = UT_HOSTSIZE; /* options.max_startup sized array of fd ints */ int *startup_pipes = NULL; From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 30 22:51:35 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3296A1065671 for ; Wed, 30 Apr 2008 22:51:35 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outH.internet-mail-service.net (outh.internet-mail-service.net [216.240.47.231]) by mx1.freebsd.org (Postfix) with ESMTP id 114298FC14 for ; Wed, 30 Apr 2008 22:51:34 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Wed, 30 Apr 2008 21:09:18 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 1F6D32D6015; Wed, 30 Apr 2008 15:51:34 -0700 (PDT) Message-ID: <4818F7F8.6020602@elischer.org> Date: Wed, 30 Apr 2008 15:51:36 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: "Murty, Ravi" References: <4818E40F.9070004@elischer.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: maybe_preempt_in_ksegrp X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2008 22:51:35 -0000 Murty, Ravi wrote: > Julian, > > Apologies for sticking to 6.x, I checked and looks like this function > and several others are out in 7.x. It's just that we've been using 6.x > for a while and continue to look at it. :) > > > Coming back, I was thinking of the problem the other way around. The > thread gets put on the ksegrp runq, but we don't know if it gets put at > the head of the queue. All we know is we either find a slot or not. If > we do, great sched_add is called which will add it to a CPU runq and > check if it can preempt some thread on the target CPU. If we can't find > a slot, it checks if it can steal (preempt) some other thread (of the > same ksegrp) from a cpu. Let's consider the UP case to keep this simple. > One of the checks is the priority of the newly runnable thread and the > curthread on the CPU and the fact that they are part of the same KSEGRP. > If both pass, I think it should say "run me" since we just established > that I am higher priority than what's running on the CPU. > > Ravi > Quite possibly.. where were you when we needed more man-power on this :-) this was part of the attempt to make a 'fair' scheduler which would not gove a person 10,000 times the cpu just because he had 10000 threads :-) It was eventually removed as being too complicated, too resource intensive, and not solving a problem that people were seeing. From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 30 23:46:10 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F1AB106567B for ; Wed, 30 Apr 2008 23:46:10 +0000 (UTC) (envelope-from cavac@magicbooks.org) Received: from mail.magicbooks.org (www.magicbooks.org [217.79.181.111]) by mx1.freebsd.org (Postfix) with ESMTP id A17A98FC18 for ; Wed, 30 Apr 2008 23:46:09 +0000 (UTC) (envelope-from cavac@magicbooks.org) Received: from mail.magicbooks.org (localhost [127.0.0.1]) by mail.magicbooks.org (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id m3UNVuex004759 for ; Thu, 1 May 2008 01:31:57 +0200 Received: from 85.124.105.57 (SquirrelMail authenticated user cavac) by mail.magicbooks.org with HTTP; Thu, 1 May 2008 01:31:57 +0200 (CEST) Message-ID: <3743.85.124.105.57.1209598317.squirrel@mail.magicbooks.org> In-Reply-To: References: Date: Thu, 1 May 2008 01:31:57 +0200 (CEST) From: "Rene Schickbauer" To: hackers@freebsd.org User-Agent: SquirrelMail/1.4.6 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: Subject: Re: introduction X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2008 23:46:10 -0000 Hi, James! > I'm working on the embedded FreeBSD project; I find embedded development to > be difficult and extremely enjoyable. It covers a lot of bases, while also > hearkening back to days when there were fewer resources available on any > system, so that I feel like I'm working in an environment from the late > seventies or early eighties. Which means I feel retro cool without actually > being limited in resources in the real world. Welcome! Just the project i need (having multiple Soekris-Boxes myself ;-) I'm currently hacking around on my Soekris-Box to use the Error-Led for displaying fault conditions (which is much more usefull than using it to send more code). It's currently only a proof-of-concept at the moment, but if it can aid your project, send me an email :-) LLAP & LG Rene -- ---------------------- OmniCode 0.1.6 ----------------------- sxy cm169 esO sp= Ag1976 anE hda ZoS Rl! Kd! MBINTJ UFGreg&Sid IN10 AdC&N PrPerl(8)&C(7)&C++(7)&LUA(8)&PHP(8)&C#(4)&SQL(8)&BSLUA(9) ----------- Omnicode http://www.gadgeteer.net/omnicode/ ----------- -----BEGIN GEEK CODE BLOCK----- Version: 3.1 Visit to decode GCS/CM d--(-) s:- a C++(+++)$>++++ UBLAHC*+++(++++)$>++++ P+++(++++)$>+++++ L+(++)>$ !E---(-) W+++$ N+(++)@ o+(++)@ K? w+++(++)$>--- !O- M++>$ V-(--) PS+ PE Y+ PGP+ t+ 5 X- R- tv-- b++(+++) DI-- D+ G++ e- h r? y+ ------END GEEK CODE BLOCK------ Hackerkey: http://tinyurl.com/2qtnbq From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 30 23:50:44 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEB70106566C for ; Wed, 30 Apr 2008 23:50:44 +0000 (UTC) (envelope-from ravi.murty@intel.com) Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by mx1.freebsd.org (Postfix) with ESMTP id B9ADB8FC1C for ; Wed, 30 Apr 2008 23:50:44 +0000 (UTC) (envelope-from ravi.murty@intel.com) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 30 Apr 2008 16:50:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.25,731,1199692800"; d="scan'208";a="240293425" Received: from orsmsx335.amr.corp.intel.com (HELO orsmsx335.jf.intel.com) ([10.22.226.40]) by azsmga001.ch.intel.com with ESMTP; 30 Apr 2008 16:50:44 -0700 Received: from orsmsx416.amr.corp.intel.com ([10.22.226.46]) by orsmsx335.jf.intel.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 30 Apr 2008 16:50:43 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Wed, 30 Apr 2008 16:49:58 -0700 Message-ID: In-Reply-To: <4818F7F8.6020602@elischer.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: maybe_preempt_in_ksegrp Thread-Index: AcirFL6rkrlrOAzHTSCc6f9AZmY5fAAB+Mww References: <4818E40F.9070004@elischer.org> <4818F7F8.6020602@elischer.org> From: "Murty, Ravi" To: "Julian Elischer" X-OriginalArrivalTime: 30 Apr 2008 23:50:43.0070 (UTC) FILETIME=[007DB9E0:01C8AB1D] Cc: freebsd-hackers@freebsd.org Subject: RE: maybe_preempt_in_ksegrp X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Apr 2008 23:50:45 -0000 Sorry I wish I was part of the development effort. I am just coming on board with FreeBSD work. I guess ksegrps were implemented for the purpose of PROCESS_SCOPE threads and like you said avoiding a process from hogging the CPU. If every thread in the system has it's own ksegrp (SYSTEM_SCOPE) I don't see this call (maybe_preempt_in_ksegrp) ever getting called :). Thanks ravi -----Original Message----- From: Julian Elischer [mailto:julian@elischer.org]=20 Sent: Wednesday, April 30, 2008 3:52 PM To: Murty, Ravi Cc: freebsd-hackers@freebsd.org Subject: Re: maybe_preempt_in_ksegrp Murty, Ravi wrote: > Julian, >=20 > Apologies for sticking to 6.x, I checked and looks like this function > and several others are out in 7.x. It's just that we've been using 6.x > for a while and continue to look at it. :) >=20 >=20 > Coming back, I was thinking of the problem the other way around. The > thread gets put on the ksegrp runq, but we don't know if it gets put at > the head of the queue. All we know is we either find a slot or not. If > we do, great sched_add is called which will add it to a CPU runq and > check if it can preempt some thread on the target CPU. If we can't find > a slot, it checks if it can steal (preempt) some other thread (of the > same ksegrp) from a cpu. Let's consider the UP case to keep this simple. > One of the checks is the priority of the newly runnable thread and the > curthread on the CPU and the fact that they are part of the same KSEGRP. > If both pass, I think it should say "run me" since we just established > that I am higher priority than what's running on the CPU. >=20 > Ravi >=20 Quite possibly.. where were you when we needed more man-power on this :-) this was part of the attempt to make a 'fair' scheduler which would not gove a person 10,000 times the cpu just because he had 10000 threads :-) It was eventually removed as being too complicated, too resource=20 intensive, and not solving a problem that people were seeing. From owner-freebsd-hackers@FreeBSD.ORG Thu May 1 00:11:28 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C69D1065670 for ; Thu, 1 May 2008 00:11:28 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outP.internet-mail-service.net (outp.internet-mail-service.net [216.240.47.239]) by mx1.freebsd.org (Postfix) with ESMTP id 7780C8FC12 for ; Thu, 1 May 2008 00:11:28 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Wed, 30 Apr 2008 22:29:24 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 9396E2D600D; Wed, 30 Apr 2008 17:11:27 -0700 (PDT) Message-ID: <48190AB2.4010102@elischer.org> Date: Wed, 30 Apr 2008 17:11:30 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: "Murty, Ravi" References: <4818E40F.9070004@elischer.org> <4818F7F8.6020602@elischer.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: maybe_preempt_in_ksegrp X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 May 2008 00:11:28 -0000 Murty, Ravi wrote: > Sorry I wish I was part of the development effort. I am just coming on > board with FreeBSD work. > > I guess ksegrps were implemented for the purpose of PROCESS_SCOPE > threads and like you said avoiding a process from hogging the CPU. > > If every thread in the system has it's own ksegrp (SYSTEM_SCOPE) I don't > see this call (maybe_preempt_in_ksegrp) ever getting called :). which is why the default was process scope. > > Thanks > ravi > > > -----Original Message----- > From: Julian Elischer [mailto:julian@elischer.org] > Sent: Wednesday, April 30, 2008 3:52 PM > To: Murty, Ravi > Cc: freebsd-hackers@freebsd.org > Subject: Re: maybe_preempt_in_ksegrp > > Murty, Ravi wrote: >> Julian, >> >> Apologies for sticking to 6.x, I checked and looks like this function >> and several others are out in 7.x. It's just that we've been using 6.x >> for a while and continue to look at it. :) >> >> >> Coming back, I was thinking of the problem the other way around. The >> thread gets put on the ksegrp runq, but we don't know if it gets put > at >> the head of the queue. All we know is we either find a slot or not. If >> we do, great sched_add is called which will add it to a CPU runq and >> check if it can preempt some thread on the target CPU. If we can't > find >> a slot, it checks if it can steal (preempt) some other thread (of the >> same ksegrp) from a cpu. Let's consider the UP case to keep this > simple. >> One of the checks is the priority of the newly runnable thread and the >> curthread on the CPU and the fact that they are part of the same > KSEGRP. >> If both pass, I think it should say "run me" since we just established >> that I am higher priority than what's running on the CPU. >> >> Ravi >> > > > Quite possibly.. > where were you when we needed more > man-power on this :-) > > this was part of the attempt to make a 'fair' scheduler > which would not gove a person 10,000 times the cpu just because > he had 10000 threads :-) > > > It was eventually removed as being too complicated, too resource > intensive, and not solving a problem that people were seeing. > > From owner-freebsd-hackers@FreeBSD.ORG Fri May 2 02:14:52 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE317106566C; Fri, 2 May 2008 02:14:52 +0000 (UTC) (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 518FE8FC19; Fri, 2 May 2008 02:14:51 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl62-8.kln.forthnet.gr [77.49.189.8]) (authenticated bits=128) by igloo.linux.gr (8.14.2/8.14.2/Debian-4) with ESMTP id m422C1GK031582 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 2 May 2008 05:12:08 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m422C1UA033641; Fri, 2 May 2008 05:12:01 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m422BwsB033048; Fri, 2 May 2008 05:11:58 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: Max Laier References: <20080426213557.GA88577@marvin.blogreen.org> <200804270201.53271.max@love2party.net> Date: Fri, 02 May 2008 05:11:57 +0300 In-Reply-To: <200804270201.53271.max@love2party.net> (Max Laier's message of "Sun, 27 Apr 2008 02:01:53 +0200") Message-ID: <8763txlaj6.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=cp851 Content-Transfer-Encoding: quoted-printable X-MailScanner-ID: m422C1GK031582 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.907, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.49, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org, Romuald Conty , Romain =?cp851?Q?Tarti=8Are?= Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2008 02:14:53 -0000 On Sun, 27 Apr 2008 02:01:53 +0200, Max Laier wrote: > On Saturday 26 April 2008 23:35:57 Romain Tarti=8Are wrote: >> Hello FreeBSD hackers! >> >> I'm using avr-gcc from the ports and relying on the 0b prefix notation >> for binary constants, that is: >> >> foo =3D 0b00101010; >> >> Thanks to /usr/ports/devel/avr-gcc/files/patch-0b-constants this is >> possible :-) >> >> But I would like to use indent(1) to reformat contributed code >> automatically. Unfortunately, the 0b notation is not supported by that >> program, and the resulting code looks like this: >> >> foo =3D 0 b00101010; >> >> ... then compilation fails, bla bla bla... > > I can't think of a case (outside of "0x...." context) where "...0b..." > would be valid C code, let alone better formated as "...0 b...". > Hence I see no harm in adding your patch to the base indent(1). > > Does anyone have an example where "...0 b..." is valid C code? The only case I can think of is when the "b..." is an existing macro, i.e. something like: 1 #include 2 3 #define b0101 + 3 4 5 int 6 main(void) 7 { 8 printf("%u\n", 0 b0101); 9 return 0; 10 } But that's a rather contrived example. Making the "0b...." support tunable through a command-line option seems ok for me. From owner-freebsd-hackers@FreeBSD.ORG Fri May 2 02:14:52 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE317106566C; Fri, 2 May 2008 02:14:52 +0000 (UTC) (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 518FE8FC19; Fri, 2 May 2008 02:14:51 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl62-8.kln.forthnet.gr [77.49.189.8]) (authenticated bits=128) by igloo.linux.gr (8.14.2/8.14.2/Debian-4) with ESMTP id m422C1GK031582 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 2 May 2008 05:12:08 +0300 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m422C1UA033641; Fri, 2 May 2008 05:12:01 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m422BwsB033048; Fri, 2 May 2008 05:11:58 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: Max Laier References: <20080426213557.GA88577@marvin.blogreen.org> <200804270201.53271.max@love2party.net> Date: Fri, 02 May 2008 05:11:57 +0300 In-Reply-To: <200804270201.53271.max@love2party.net> (Max Laier's message of "Sun, 27 Apr 2008 02:01:53 +0200") Message-ID: <8763txlaj6.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=cp851 Content-Transfer-Encoding: quoted-printable X-MailScanner-ID: m422C1GK031582 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.907, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.49, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org, Romuald Conty , Romain =?cp851?Q?Tarti=8Are?= Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2008 02:14:53 -0000 On Sun, 27 Apr 2008 02:01:53 +0200, Max Laier wrote: > On Saturday 26 April 2008 23:35:57 Romain Tarti=8Are wrote: >> Hello FreeBSD hackers! >> >> I'm using avr-gcc from the ports and relying on the 0b prefix notation >> for binary constants, that is: >> >> foo =3D 0b00101010; >> >> Thanks to /usr/ports/devel/avr-gcc/files/patch-0b-constants this is >> possible :-) >> >> But I would like to use indent(1) to reformat contributed code >> automatically. Unfortunately, the 0b notation is not supported by that >> program, and the resulting code looks like this: >> >> foo =3D 0 b00101010; >> >> ... then compilation fails, bla bla bla... > > I can't think of a case (outside of "0x...." context) where "...0b..." > would be valid C code, let alone better formated as "...0 b...". > Hence I see no harm in adding your patch to the base indent(1). > > Does anyone have an example where "...0 b..." is valid C code? The only case I can think of is when the "b..." is an existing macro, i.e. something like: 1 #include 2 3 #define b0101 + 3 4 5 int 6 main(void) 7 { 8 printf("%u\n", 0 b0101); 9 return 0; 10 } But that's a rather contrived example. Making the "0b...." support tunable through a command-line option seems ok for me. From owner-freebsd-hackers@FreeBSD.ORG Fri May 2 04:19:06 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9AF0106564A for ; Fri, 2 May 2008 04:19:06 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id C26098FC15 for ; Fri, 2 May 2008 04:19:06 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.0.0.128] (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id m424GStv010691; Thu, 1 May 2008 21:16:28 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <481A959C.5000704@freebsd.org> Date: Thu, 01 May 2008 21:16:28 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Giorgos Keramidas References: <20080426213557.GA88577@marvin.blogreen.org> <200804270201.53271.max@love2party.net> <8763txlaj6.fsf@kobe.laptop> In-Reply-To: <8763txlaj6.fsf@kobe.laptop> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: =?UTF-8?B?Um9tYWluIO+/vQ==?= , Max Laier , hackers@freebsd.org, Romuald Conty , freebsd-hackers@freebsd.org Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2008 04:19:07 -0000 >>>But I would like to use indent(1) to reformat contributed code >>>automatically. Unfortunately, the 0b notation is not supported by that >>>program, and the resulting code looks like this: >>> >>> foo = 0 b00101010; >>> >>>... then compilation fails, bla bla bla... >> >>I can't think of a case (outside of "0x...." context) where "...0b..." >>would be valid C code, let alone better formated as "...0 b...". >>Hence I see no harm in adding your patch to the base indent(1). >> >>Does anyone have an example where "...0 b..." is valid C code? > > The only case I can think of is when the "b..." is an existing macro, > i.e. something like: > > 1 #include > 2 > 3 #define b0101 + 3 In all of these cases, though, adding a space between the '0' and the 'b' changes the meaning, so is wrong. Indent can change/insert whitespace, but should never do so in a way that changes the meaning of the program. In all of these cases, having indent recognize "0b..." as a single token is the correct behavior. So I don't see any point in having this recognition be tunable. indent already has too many switches. Tim Kientzle From owner-freebsd-hackers@FreeBSD.ORG Fri May 2 04:57:49 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1E11106566B for ; Fri, 2 May 2008 04:57:49 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 44FEA8FC1C for ; Fri, 2 May 2008 04:57:48 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.0.0.128] (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id m424GStv010691; Thu, 1 May 2008 21:16:28 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <481A959C.5000704@freebsd.org> Date: Thu, 01 May 2008 21:16:28 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Giorgos Keramidas References: <20080426213557.GA88577@marvin.blogreen.org> <200804270201.53271.max@love2party.net> <8763txlaj6.fsf@kobe.laptop> In-Reply-To: <8763txlaj6.fsf@kobe.laptop> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: =?UTF-8?B?Um9tYWluIO+/vQ==?= , Max Laier , hackers@freebsd.org, Romuald Conty , freebsd-hackers@freebsd.org Subject: Re: indent(1) support for gcc(1) 0b prefix X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2008 04:57:49 -0000 >>>But I would like to use indent(1) to reformat contributed code >>>automatically. Unfortunately, the 0b notation is not supported by that >>>program, and the resulting code looks like this: >>> >>> foo = 0 b00101010; >>> >>>... then compilation fails, bla bla bla... >> >>I can't think of a case (outside of "0x...." context) where "...0b..." >>would be valid C code, let alone better formated as "...0 b...". >>Hence I see no harm in adding your patch to the base indent(1). >> >>Does anyone have an example where "...0 b..." is valid C code? > > The only case I can think of is when the "b..." is an existing macro, > i.e. something like: > > 1 #include > 2 > 3 #define b0101 + 3 In all of these cases, though, adding a space between the '0' and the 'b' changes the meaning, so is wrong. Indent can change/insert whitespace, but should never do so in a way that changes the meaning of the program. In all of these cases, having indent recognize "0b..." as a single token is the correct behavior. So I don't see any point in having this recognition be tunable. indent already has too many switches. Tim Kientzle From owner-freebsd-hackers@FreeBSD.ORG Fri May 2 21:16:43 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17C5E1065674 for ; Fri, 2 May 2008 21:16:43 +0000 (UTC) (envelope-from lists@mschuette.name) Received: from mail.asta.uni-potsdam.de (mail.asta.uni-potsdam.de [141.89.58.198]) by mx1.freebsd.org (Postfix) with ESMTP id C29538FC15 for ; Fri, 2 May 2008 21:16:42 +0000 (UTC) (envelope-from lists@mschuette.name) Received: from localhost (mail.asta.uni-potsdam.de [141.89.58.198]) by mail.asta.uni-potsdam.de (Postfix) with ESMTP id A68421E5CC0 for ; Fri, 2 May 2008 22:51:41 +0200 (CEST) X-Virus-Scanned: on mail at asta.uni-potsdam.de Received: from mail.asta.uni-potsdam.de ([141.89.58.198]) by localhost (mail.asta.uni-potsdam.de [141.89.58.198]) (amavisd-new, port 10024) with ESMTP id 3jo3QvatAqP9 for ; Fri, 2 May 2008 22:51:32 +0200 (CEST) Received: from [192.168.178.21] (BAA72ed.baa.pppool.de [77.128.114.237]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Martin Schuette", Issuer "AStA-CA" (verified OK)) by mail.asta.uni-potsdam.de (Postfix) with ESMTP id CEE7F1E5CB3 for ; Fri, 2 May 2008 22:51:31 +0200 (CEST) Message-ID: <481B7ED4.3020208@mschuette.name> Date: Fri, 02 May 2008 22:51:32 +0200 From: =?ISO-8859-15?Q?Martin_Sch=FCtte?= User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Improving Syslog X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2008 21:16:43 -0000 Hello, I am taking part in this year's Google Summer of Code for NetBSD and want to implement the upcoming IETF Syslog standards for BSD's syslogd(8). The most important improvements will be an extended message format, TLS network transport, and digital signatures. I hope these new functions will later be ported to benefit all BSD variants (as their syslogds are similar). So everyone interested is invited to take a look at the project pages now and then. Naturally any feedback is welcome. The official project's homepage is at http://netbsd-soc.sourceforge.net/projects/syslogd/ and for developing I maintain a Trac at http://barney.cs.uni-potsdam.de/trac/syslogd/ -- Martin From owner-freebsd-hackers@FreeBSD.ORG Fri May 2 21:26:28 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DF96106567E for ; Fri, 2 May 2008 21:26:28 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.delphij.net (unknown [IPv6:2001:470:1f03:2c9::2]) by mx1.freebsd.org (Postfix) with ESMTP id 1FB838FC1D for ; Fri, 2 May 2008 21:26:28 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [202.108.54.204]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.delphij.net (Postfix) with ESMTPS id C1D2728448 for ; Sat, 3 May 2008 05:26:26 +0800 (CST) Received: from localhost (tarsier.geekcn.org [202.108.54.204]) by tarsier.geekcn.org (Postfix) with ESMTP id 3A35AEB8955; Sat, 3 May 2008 05:26:26 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([202.108.54.204]) by localhost (mail.geekcn.org [202.108.54.204]) (amavisd-new, port 10024) with ESMTP id oKMBSuHN0S5a; Sat, 3 May 2008 05:26:17 +0800 (CST) Received: from charlie.delphij.net (71.5.7.139.ptr.us.xo.net [71.5.7.139]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id EA1FFEB6D4E; Sat, 3 May 2008 05:26:15 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=E4W80ceeOPJuG85dTYAtBIYoiboPoi7UqdW4OminaGMr+4EJdfipwIjkcw6UoEIZV 0Q4Ignm1SqWf6l81iWWdg== Message-ID: <481B86F6.7050207@delphij.net> Date: Fri, 02 May 2008 14:26:14 -0700 From: Xin LI Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.12 (X11/20080422) MIME-Version: 1.0 To: =?ISO-8859-15?Q?Martin_Sch=FCtte?= References: <481B7ED4.3020208@mschuette.name> In-Reply-To: <481B7ED4.3020208@mschuette.name> X-Enigmail-Version: 0.95.6 OpenPGP: id=18EDEBA0; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit Cc: hackers@freebsd.org Subject: Re: Improving Syslog X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2008 21:26:28 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Martin Schütte wrote: | Hello, | I am taking part in this year's Google Summer of Code for NetBSD and | want to implement the upcoming IETF Syslog standards for BSD's | syslogd(8). The most important improvements will be an extended message | format, TLS network transport, and digital signatures. | | I hope these new functions will later be ported to benefit all BSD | variants (as their syslogds are similar). | So everyone interested is invited to take a look at the project pages | now and then. Naturally any feedback is welcome. | | The official project's homepage is at | http://netbsd-soc.sourceforge.net/projects/syslogd/ | and for developing I maintain a Trac at | http://barney.cs.uni-potsdam.de/trac/syslogd/ That's cool. Is there any commit-mail style stuff that we can subscribe so we can gradually incorporate your work into FreeBSD? Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgbhvUACgkQi+vbBBjt66DEnwCfZbFNXV8svbv4i31uXlJNsglS 4/EAoKogxgrOvyEKbr2DKvKncGcvh+rP =4W6A -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sat May 3 08:42:00 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 312C5106566B for ; Sat, 3 May 2008 08:42:00 +0000 (UTC) (envelope-from sanjeevfiles@yahoo.com) Received: from web57712.mail.re3.yahoo.com (web57712.mail.re3.yahoo.com [68.142.236.75]) by mx1.freebsd.org (Postfix) with SMTP id DD53B8FC12 for ; Sat, 3 May 2008 08:41:59 +0000 (UTC) (envelope-from sanjeevfiles@yahoo.com) Received: (qmail 11723 invoked by uid 60001); 3 May 2008 08:41:59 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=Xv4ot9/H4ynBVwWqwdBj8tBUkH2BxePY2iyTX4BgRw24b5q0Nhq2IQR+Tur9b88S9l61gkxLu7cJU4Zt9vWjLIcfuGNIa8l31xh/94KmcGpFx/eZTEcagzZK7ElH4acxFyCpWo+kx2UgLbCndMlegrcn6h/3vSFL2x971kyR6gM=; X-YMail-OSG: RJGcxf0VM1kUf2sgCiSH_7rqI1E2PtjxptlQIvk1LHtqe7_7DbSdqCBia5YJSfUlxQBq3us0C4kY4TwEBbugcfmia2XiMc5A5LSGXrnhultv0RmfmZZqFWNjhIs- Received: from [117.192.131.51] by web57712.mail.re3.yahoo.com via HTTP; Sat, 03 May 2008 01:41:58 PDT Date: Sat, 3 May 2008 01:41:58 -0700 (PDT) From: "Sanjeev Kumar.S" To: Pranav Peshwe In-Reply-To: MIME-Version: 1.0 Message-ID: <12198.11591.qm@web57712.mail.re3.yahoo.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Saving entire console sessions X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2008 08:42:00 -0000 Thank you this serves my purpose very well. Pranav Peshwe wrote: On Thu, Apr 24, 2008 at 5:57 PM, Sanjeev Kumar.S wrote: > Hi, > Is there any way to save entire console > sessions ? > Screen asks me to copy and paste what > I want. I don't want to do that I need to save > entire sessions. like a start till I do a exit or > quit the application. Is there a utility like > that ? > Did you try enabling logging for a screen window ? `screen -L` may be of help. Best regards, Pranav -------------------------------------------------------------------------- Blessed are the pessimists, for they take backups!! _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" --------------------------------- Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. From owner-freebsd-hackers@FreeBSD.ORG Sat May 3 08:42:51 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A2CA1065677 for ; Sat, 3 May 2008 08:42:51 +0000 (UTC) (envelope-from sanjeevfiles@yahoo.com) Received: from web57712.mail.re3.yahoo.com (web57712.mail.re3.yahoo.com [68.142.236.75]) by mx1.freebsd.org (Postfix) with SMTP id 24DB58FC0A for ; Sat, 3 May 2008 08:42:51 +0000 (UTC) (envelope-from sanjeevfiles@yahoo.com) Received: (qmail 12275 invoked by uid 60001); 3 May 2008 08:42:50 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=2yRbB5Zz81a1Hsw8fveWXefLQId+sFFgg8GKO+f/y4vrmnp7Cyz0NQLjUqezBD2Tjt2k9A3pZ5QvvmymhXSlAqo+GGoS4iWTOn0QPCCKJy1SwFs7wCoDq/8XkA4uBR097V3ao5LrQ5WFyXD/69MGu0C0X3QcMtAS53ZE6C1oraw=; X-YMail-OSG: jil9.m0VM1nsSRgBDAGRbsmQfmoRRuFTUCCi5XvyF5Qq5X3CRuMH4SD6EcH51U_2lbSV18_Ai8vYv948olmHgH6pHKl099bpujcc_x22.dng5y7WtDtXARmcH7E- Received: from [117.192.131.51] by web57712.mail.re3.yahoo.com via HTTP; Sat, 03 May 2008 01:42:50 PDT Date: Sat, 3 May 2008 01:42:50 -0700 (PDT) From: "Sanjeev Kumar.S" To: Rink Springer In-Reply-To: <20080424123047.GF38660@rink.nu> MIME-Version: 1.0 Message-ID: <607443.11591.qm@web57712.mail.re3.yahoo.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Simun Mikecin , freebsd-hackers@freebsd.org, Mike Meyer , Hans Petter Selasky , hackers@freebsd.org Subject: Re: Saving entire console sessions X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2008 08:42:51 -0000 Sorry, did not mean to. Thank you very much for the suggestion. Suits my requirement very well. Regards, Sanjeev. Rink Springer wrote: Hi, On Thu, Apr 24, 2008 at 05:27:36AM -0700, Sanjeev Kumar.S wrote: > Is there any way to save entire console > sessions ? > Screen asks me to copy and paste what > I want. I don't want to do that I need to save > entire sessions. like a start till I do a exit or > quit the application. Is there a utility like > that ? Please, don't hijack the thread next time :-) Either way, have a look at script(1) - I think that is what you are looking for. Regards, -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" --------------------------------- Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. From owner-freebsd-hackers@FreeBSD.ORG Sat May 3 08:42:51 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69E331065674 for ; Sat, 3 May 2008 08:42:51 +0000 (UTC) (envelope-from sanjeevfiles@yahoo.com) Received: from web57712.mail.re3.yahoo.com (web57712.mail.re3.yahoo.com [68.142.236.75]) by mx1.freebsd.org (Postfix) with SMTP id 24E538FC1B for ; Sat, 3 May 2008 08:42:51 +0000 (UTC) (envelope-from sanjeevfiles@yahoo.com) Received: (qmail 12275 invoked by uid 60001); 3 May 2008 08:42:50 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=2yRbB5Zz81a1Hsw8fveWXefLQId+sFFgg8GKO+f/y4vrmnp7Cyz0NQLjUqezBD2Tjt2k9A3pZ5QvvmymhXSlAqo+GGoS4iWTOn0QPCCKJy1SwFs7wCoDq/8XkA4uBR097V3ao5LrQ5WFyXD/69MGu0C0X3QcMtAS53ZE6C1oraw=; X-YMail-OSG: jil9.m0VM1nsSRgBDAGRbsmQfmoRRuFTUCCi5XvyF5Qq5X3CRuMH4SD6EcH51U_2lbSV18_Ai8vYv948olmHgH6pHKl099bpujcc_x22.dng5y7WtDtXARmcH7E- Received: from [117.192.131.51] by web57712.mail.re3.yahoo.com via HTTP; Sat, 03 May 2008 01:42:50 PDT Date: Sat, 3 May 2008 01:42:50 -0700 (PDT) From: "Sanjeev Kumar.S" To: Rink Springer In-Reply-To: <20080424123047.GF38660@rink.nu> MIME-Version: 1.0 Message-ID: <607443.11591.qm@web57712.mail.re3.yahoo.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Simun Mikecin , freebsd-hackers@freebsd.org, Mike Meyer , Hans Petter Selasky , hackers@freebsd.org Subject: Re: Saving entire console sessions X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2008 08:42:51 -0000 Sorry, did not mean to. Thank you very much for the suggestion. Suits my requirement very well. Regards, Sanjeev. Rink Springer wrote: Hi, On Thu, Apr 24, 2008 at 05:27:36AM -0700, Sanjeev Kumar.S wrote: > Is there any way to save entire console > sessions ? > Screen asks me to copy and paste what > I want. I don't want to do that I need to save > entire sessions. like a start till I do a exit or > quit the application. Is there a utility like > that ? Please, don't hijack the thread next time :-) Either way, have a look at script(1) - I think that is what you are looking for. Regards, -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" --------------------------------- Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. From owner-freebsd-hackers@FreeBSD.ORG Sat May 3 08:54:32 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F9D9106566B for ; Sat, 3 May 2008 08:54:32 +0000 (UTC) (envelope-from ap00@mail.ru) Received: from mx0.awanti.com (mx0.awanti.com [91.190.112.18]) by mx1.freebsd.org (Postfix) with ESMTP id D65608FC15 for ; Sat, 3 May 2008 08:54:31 +0000 (UTC) (envelope-from ap00@mail.ru) Received: from pstation (unknown [10.28.4.14]) by mx0.awanti.com (Postfix) with ESMTP id 216524C04F; Sat, 3 May 2008 12:28:12 +0400 (MSD) Date: Sat, 3 May 2008 12:30:27 +0400 From: Anthony Pankov X-Mailer: The Bat! (v1.51) Personal X-Priority: 3 (Normal) Message-ID: <1723583765.20080503123027@mail.ru> To: =?Windows-1251?B?TWFydGluIFNjaPx0dGU=?= , hackers@freebsd.org In-Reply-To: <481B7ED4.3020208@mschuette.name> References: <481B7ED4.3020208@mschuette.name> MIME-Version: 1.0 Content-Type: text/plain; charset=Windows-1251 Content-Transfer-Encoding: 8bit Cc: Subject: Re: Improving Syslog X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Anthony Pankov List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2008 08:54:32 -0000 Hello Martin, It is not pleasant to me that most comprehensible unix subsystem - syslog - will grow to multipurpose monster. More pleasant to here about careful redesign of syslogd that make available various plugins|additional daemons each of which adds well-defined functionality. I dislike many features living in one binary file. Especially when this binary will do one thing for me - write messages to file. Sorry, but when i imagine one more software to scrub from cool features i become more sad. Saturday, May 03, 2008, 12:51:32 AM, you wrote: MS> Hello, MS> I am taking part in this year's Google Summer of Code for NetBSD and MS> want to implement the upcoming IETF Syslog standards for BSD's MS> syslogd(8). The most important improvements will be an extended message MS> format, TLS network transport, and digital signatures. MS> I hope these new functions will later be ported to benefit all BSD MS> variants (as their syslogds are similar). MS> So everyone interested is invited to take a look at the project pages MS> now and then. Naturally any feedback is welcome. MS> The official project's homepage is at MS> http://netbsd-soc.sourceforge.net/projects/syslogd/ MS> and for developing I maintain a Trac at MS> http://barney.cs.uni-potsdam.de/trac/syslogd/ -- Best regards, Anthony mailto:ap00@mail.ru From owner-freebsd-hackers@FreeBSD.ORG Sat May 3 09:32:21 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FFC31065670 for ; Sat, 3 May 2008 09:32:21 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from mail5out.barnet.com.au (mail5.barnet.com.au [202.83.178.78]) by mx1.freebsd.org (Postfix) with ESMTP id E426C8FC0A for ; Sat, 3 May 2008 09:32:20 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: by mail5out.barnet.com.au (Postfix, from userid 1001) id 760AB2218A77; Sat, 3 May 2008 19:07:24 +1000 (EST) X-Viruscan-Id: <481C2B4C00011DBCED4742@BarNet> Received: from mail5auth.barnet.com.au (mail5.barnet.com.au [202.83.178.78]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail5auth.barnet.com.au", Issuer "*.barnet.com.au" (verified OK)) by mail5.barnet.com.au (Postfix) with ESMTP id 3BFBA21B240D; Sat, 3 May 2008 19:07:24 +1000 (EST) Received: from k7.mavetju (k7.mavetju.org [10.251.1.18]) by mail5auth.barnet.com.au (Postfix) with ESMTP id E90732218A64; Sat, 3 May 2008 19:07:23 +1000 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id 89A01318; Sat, 3 May 2008 19:07:23 +1000 (EST) Date: Sat, 3 May 2008 19:07:23 +1000 From: Edwin Groothuis To: Anthony Pankov Message-ID: <20080503090723.GA3159@k7.mavetju> References: <481B7ED4.3020208@mschuette.name> <1723583765.20080503123027@mail.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1723583765.20080503123027@mail.ru> User-Agent: Mutt/1.4.2.3i Cc: hackers@freebsd.org, Martin Sch?tte Subject: Re: Improving Syslog X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2008 09:32:21 -0000 On Sat, May 03, 2008 at 12:30:27PM +0400, Anthony Pankov wrote: > It is not pleasant to me that most comprehensible unix subsystem - > syslog - will grow to multipurpose monster. > > More pleasant to here about careful redesign of syslogd that make > available various plugins|additional daemons each of which adds > well-defined functionality. > > I dislike many features living in one binary file. Especially when > this binary will do one thing for me - write messages to file. > > Sorry, but when i imagine one more software to scrub from cool > features i become more sad. Even if the voices are opposing it, we can always make a port out of it so that the people who are interested in it can use it :-) Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://www.mavetju.org/weblog/ From owner-freebsd-hackers@FreeBSD.ORG Sat May 3 12:38:38 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A75571065677 for ; Sat, 3 May 2008 12:38:38 +0000 (UTC) (envelope-from lists@mschuette.name) Received: from mail.asta.uni-potsdam.de (mail.asta.uni-potsdam.de [141.89.58.198]) by mx1.freebsd.org (Postfix) with ESMTP id 72E4B8FC1A for ; Sat, 3 May 2008 12:38:38 +0000 (UTC) (envelope-from lists@mschuette.name) Received: from localhost (mail.asta.uni-potsdam.de [141.89.58.198]) by mail.asta.uni-potsdam.de (Postfix) with ESMTP id 51A6A1E5DBA for ; Sat, 3 May 2008 14:38:37 +0200 (CEST) X-Virus-Scanned: on mail at asta.uni-potsdam.de Received: from mail.asta.uni-potsdam.de ([141.89.58.198]) by localhost (mail.asta.uni-potsdam.de [141.89.58.198]) (amavisd-new, port 10024) with ESMTP id TpAVx5j2Fz-a for ; Sat, 3 May 2008 14:38:15 +0200 (CEST) Received: from [192.168.178.21] (BAA2eb1.baa.pppool.de [77.128.46.177]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Martin Schuette", Issuer "AStA-CA" (verified OK)) by mail.asta.uni-potsdam.de (Postfix) with ESMTP id 059371E5DC9 for ; Sat, 3 May 2008 14:38:14 +0200 (CEST) Message-ID: <481C5CB7.4000004@mschuette.name> Date: Sat, 03 May 2008 14:38:15 +0200 From: =?ISO-8859-15?Q?Martin_Sch=FCtte?= User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: hackers@freebsd.org References: <481B7ED4.3020208@mschuette.name> <481B86F6.7050207@delphij.net> In-Reply-To: <481B86F6.7050207@delphij.net> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: Improving Syslog X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2008 12:38:38 -0000 Xin LI schrieb: > | and for developing I maintain a Trac at > | http://barney.cs.uni-potsdam.de/trac/syslogd/ > That's cool. Is there any commit-mail style stuff that we can subscribe > so we can gradually incorporate your work into FreeBSD? You could use the RSS feed (Browse Source -> Revision Log) to follow all my SVN commits to certain paths (e.g. a stable branch). But instead of following every single step, I guess it would be more time-efficient to wait and later port/merge larger units at once. For the implementation I will have to concentrate on one codebase, but I am certainly interested in porting/helping to port everything to the other syslogd versions later on. -- Martin From owner-freebsd-hackers@FreeBSD.ORG Sat May 3 12:39:31 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD95D1065674 for ; Sat, 3 May 2008 12:39:30 +0000 (UTC) (envelope-from lists@mschuette.name) Received: from mail.asta.uni-potsdam.de (mail.asta.uni-potsdam.de [141.89.58.198]) by mx1.freebsd.org (Postfix) with ESMTP id A8B5A8FC34 for ; Sat, 3 May 2008 12:39:30 +0000 (UTC) (envelope-from lists@mschuette.name) Received: from localhost (mail.asta.uni-potsdam.de [141.89.58.198]) by mail.asta.uni-potsdam.de (Postfix) with ESMTP id BE0951E5DC9 for ; Sat, 3 May 2008 14:39:29 +0200 (CEST) X-Virus-Scanned: on mail at asta.uni-potsdam.de Received: from mail.asta.uni-potsdam.de ([141.89.58.198]) by localhost (mail.asta.uni-potsdam.de [141.89.58.198]) (amavisd-new, port 10024) with ESMTP id S-pmAPv6MWxB for ; Sat, 3 May 2008 14:39:20 +0200 (CEST) Received: from [192.168.178.21] (BAA2eb1.baa.pppool.de [77.128.46.177]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Martin Schuette", Issuer "AStA-CA" (verified OK)) by mail.asta.uni-potsdam.de (Postfix) with ESMTP id A03C31E5DBF for ; Sat, 3 May 2008 14:39:20 +0200 (CEST) Message-ID: <481C5CF9.1090705@mschuette.name> Date: Sat, 03 May 2008 14:39:21 +0200 From: =?ISO-8859-15?Q?Martin_Sch=FCtte?= User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: hackers@freebsd.org References: <481B7ED4.3020208@mschuette.name> <1723583765.20080503123027@mail.ru> In-Reply-To: <1723583765.20080503123027@mail.ru> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: Improving Syslog X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2008 12:39:31 -0000 Anthony Pankov schrieb: > It is not pleasant to me that most comprehensible unix subsystem - > syslog - will grow to multipurpose monster. I would like to discuss this point further (so this mail got a bit longer) because I also thought about it and it basically depends on where you draw the line between basic functionality and uncommonly used feature or when to extend a grown system and when to completely refactor it. 1. Drawing the line in big binaries: On the one hand I do not want to introduce the feature list of syslog-ng (custom filters, regexp support, different message formats) into syslogd. That would clearly be the 'multipurpose monster' that belongs in the ports tree for those who need it. On the other hand I think TLS support is a basic functionality. We are not in the 1980s anymore and having TLS in the standard syslogd is IMHO no bloat but desirable. That would leave syslog-sign in the middle. I am really undecided about this, because it potentially has the most configuration options and settings and it could just be implemented as a proxy or a filter. But then again it does not introduce new dependencies, neither does it require any configuration for default usage, and having 5-10 processes (for every log destination) also seems excessive to me. I want to defer my judgement here until I studied at least the existing code for syslog-sec (http://sourceforge.net/projects/syslog-sec/), a preliminary implementation by Albert Mietus. 2. Redesign the syslog subsystem: To change the architecture would also be interesting. The result could be a whole chain of small programs somewhat like Postfix (http://www.postfix.org/big-picture.html) with a design similar to rsyslog (http://www.rsyslog.com/doc-generic_design.html) It would require - a set of collectors (kernel log, local sockets, UDP, TLS) - a set of destinations (UDP, TLS, file, pipe, console/tty/wall message, memory buffer) - some core elements (central dispatcher, memory queue) I only wonder if that would not be the bigger and more drastic change that would prevent adoption; just like FreeBSD keeps Sendmail instead of adopting Postfix in its base system. On a more pragmatic level I am also afraid this would break my schedule for the summer; so I will keep it in mind as a reminder to keep everything modular, but not persue it with high priority. (Or I might start with seperate threads in order to persue the design but not spent too much time with IPC details.) If there is consensus that this is the right way, then it would make a nice follow up project. -- Martin From owner-freebsd-hackers@FreeBSD.ORG Sat May 3 12:54:26 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 954DA106566B for ; Sat, 3 May 2008 12:54:26 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from mail5out.barnet.com.au (mail5.barnet.com.au [202.83.178.78]) by mx1.freebsd.org (Postfix) with ESMTP id 66C618FC1C for ; Sat, 3 May 2008 12:54:26 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: by mail5out.barnet.com.au (Postfix, from userid 1001) id EAC702218A66; Sat, 3 May 2008 22:54:24 +1000 (EST) X-Viruscan-Id: <481C60800000B8432A0E8A@BarNet> Received: from mail5auth.barnet.com.au (mail5.barnet.com.au [202.83.178.78]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail5auth.barnet.com.au", Issuer "*.barnet.com.au" (verified OK)) by mail5.barnet.com.au (Postfix) with ESMTP id 91C0221B2401; Sat, 3 May 2008 22:54:24 +1000 (EST) Received: from k7.mavetju (k7.mavetju.org [10.251.1.18]) by mail5auth.barnet.com.au (Postfix) with ESMTP id AC2512218994; Sat, 3 May 2008 22:54:23 +1000 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id 661D0314; Sat, 3 May 2008 22:54:23 +1000 (EST) Date: Sat, 3 May 2008 22:54:23 +1000 From: Edwin Groothuis To: Martin Sch?tte Message-ID: <20080503125423.GA74315@k7.mavetju> References: <481B7ED4.3020208@mschuette.name> <1723583765.20080503123027@mail.ru> <481C5CF9.1090705@mschuette.name> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <481C5CF9.1090705@mschuette.name> User-Agent: Mutt/1.4.2.3i Cc: hackers@freebsd.org Subject: Re: Improving Syslog X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2008 12:54:26 -0000 On Sat, May 03, 2008 at 02:39:21PM +0200, Martin Sch?tte wrote: > I only wonder if that would not be the bigger and more drastic change > that would prevent adoption; just like FreeBSD keeps Sendmail instead of > adopting Postfix in its base system. There are other reasons for this. And the way the mail system is setup makes it is very simple to replace the default MTA with an other MTA in the ports collection. Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://www.mavetju.org/weblog/ From owner-freebsd-hackers@FreeBSD.ORG Sat May 3 13:29:35 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05F82106566B for ; Sat, 3 May 2008 13:29:35 +0000 (UTC) (envelope-from lists@mschuette.name) Received: from mail.asta.uni-potsdam.de (mail.asta.uni-potsdam.de [141.89.58.198]) by mx1.freebsd.org (Postfix) with ESMTP id C1F808FC15 for ; Sat, 3 May 2008 13:29:34 +0000 (UTC) (envelope-from lists@mschuette.name) Received: from localhost (mail.asta.uni-potsdam.de [141.89.58.198]) by mail.asta.uni-potsdam.de (Postfix) with ESMTP id 05A141E5E19 for ; Sat, 3 May 2008 15:29:33 +0200 (CEST) X-Virus-Scanned: on mail at asta.uni-potsdam.de Received: from mail.asta.uni-potsdam.de ([141.89.58.198]) by localhost (mail.asta.uni-potsdam.de [141.89.58.198]) (amavisd-new, port 10024) with ESMTP id EMh4ZSfFB9sm for ; Sat, 3 May 2008 15:29:25 +0200 (CEST) Received: from [192.168.178.21] (BAA2eb1.baa.pppool.de [77.128.46.177]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Martin Schuette", Issuer "AStA-CA" (verified OK)) by mail.asta.uni-potsdam.de (Postfix) with ESMTP id 3DC6B1E5E0F for ; Sat, 3 May 2008 15:29:24 +0200 (CEST) Message-ID: <481C68B5.3020200@mschuette.name> Date: Sat, 03 May 2008 15:29:25 +0200 From: =?ISO-8859-1?Q?Martin_Sch=FCtte?= User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: hackers@freebsd.org References: <481B7ED4.3020208@mschuette.name> <1723583765.20080503123027@mail.ru> <481C5CF9.1090705@mschuette.name> <20080503125423.GA74315@k7.mavetju> In-Reply-To: <20080503125423.GA74315@k7.mavetju> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: Improving Syslog X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 May 2008 13:29:35 -0000 Edwin Groothuis schrieb: >> that would prevent adoption; just like FreeBSD keeps Sendmail instead of >> adopting Postfix in its base system. > There are other reasons for this. And the way the mail system is > setup makes it is very simple to replace the default MTA with an > other MTA in the ports collection. Certainly, it was just an example. My point is only that old, slowly evolving, well-known, and tested programs (legitimately) build up a certain amount of trust and inertia. Thus making it difficult to replace them because the new program has to be so much better to justify the replacement. -- Martin