From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 20 02:14:59 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 408CF16A4CE; Sun, 20 Jun 2004 02:14:59 +0000 (GMT) Received: from ioskeha.hittite.isp.9tel.net (ioskeha.hittite.isp.9tel.net [62.62.156.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7522043D48; Sun, 20 Jun 2004 02:14:58 +0000 (GMT) (envelope-from clefevre-lists@9online.fr) Received: from pc2k (unknown [80.119.159.86]) by ioskeha.hittite.isp.9tel.net (Postfix) with SMTP id 3ABEF14B5D7; Sun, 20 Jun 2004 04:17:44 +0200 (CEST) Message-ID: <008901c4566c$610d1300$7890a8c0@dyndns.org> From: "Cyrille Lefevre" To: Date: Sun, 20 Jun 2004 04:14:53 +0200 Organization: ACME MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 cc: hackers@freebsd.org Subject: -lthr vs. -pthread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2004 02:14:59 -0000 Hi, I'm currently working on enhancements to ps w/ "Garance A Drosehn". I've just added some thread related stuffs and to see them, I'm using the following program : #define _REENTRANT #include #define NUM_THREADS 5 #define SLEEP_TIME 10 void *sleeping(void *); pthread_t tid[NUM_THREADS]; int main(int argc, char *argv[]) { int i; for (i = 0; i < NUM_THREADS; i++) pthread_create(&tid[i], NULL, sleeping, (void *)SLEEP_TIME); for (i = 0; i < NUM_THREADS; i++) pthread_join(tid[i], NULL); printf("main() reporting that all %d threads have terminated\n", i); return (0); } void * sleeping(void *arg) { int sleep_time = (int)arg; printf("thread %d sleeping %d seconds ...\n", thr_self(), sleep_time); sleep(sleep_time); printf("\nthread %d awakening\n", thr_self()); return (NULL); } then, I compile this one in 2 way : # cc -o thread thread.c -lthr and # cc -pthread -o pthread thread.c here is some of the "new ps" outputs : "lwp" is the thread id and "nlwp" the the number of threads. -q switch in posix mode (aka SystemV) and -C select processes by name (a la pgrep). # ./thread& sleep 1; ps -H -O lwp,nlwp -qC thread (thread, using -H) PID LWP NLWP TTY TIME COMMAND 85146 100005 6 ttyp0 00:00:00 thread 85146 100004 6 ttyp0 00:00:00 thread 85146 100003 6 ttyp0 00:00:00 thread 85146 100002 6 ttyp0 00:00:00 thread 85146 100001 6 ttyp0 00:00:00 thread 85146 85146 6 ttyp0 00:00:00 thread # ./pthread& sleep 1; ps -H -O lwp,nlwp -qC thread (pthread, using -H) PID LWP NLWP TTY TIME COMMAND 96689 100002 2 ttyp0 00:00:00 pthread 96689 96689 2 ttyp0 00:00:00 pthread is it normal that -pthread only forks only 1 thread where -lthr forks 5 of them ? # ./thread& sleep 1; ps -O lwp,nlwp -qC thread (thread ot pthread, not using -H) PID LWP NLWP TTY TIME COMMAND 73718 100005 6 ttyp0 00:00:00 thread is it normal that the selected process is the last forked thread and not the thread owner (father) ? PS : using -lc_r, there is no thread at all, but I suppose this is an expected behaviour. CC -current and -hackers Cyrille Lefevre. -- mailto:clefevre-lists@9online.fr From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 20 02:15:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D952916A502 for ; Sun, 20 Jun 2004 02:15:24 +0000 (GMT) Received: from outfbmx007.isp.belgacom.be (outfbmx007.isp.belgacom.be [195.238.3.104]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8048543D1F for ; Sun, 20 Jun 2004 02:15:23 +0000 (GMT) (envelope-from geert@lori.mine.nu) Received: from outmx013.isp.belgacom.be (outmx013.isp.belgacom.be [195.238.3.64]) (8.12.11/8.12.11/Skynet-OUT-FALLBACK-2.22) with ESMTP id i5JMFMZm009188 for ; Sun, 20 Jun 2004 00:15:22 +0200 (envelope-from ) Received: from outmx013.isp.belgacom.be (localhost [127.0.0.1]) with ESMTP id i5JMFBmZ017571 for ; Sun, 20 Jun 2004 00:15:11 +0200 (envelope-from ) Received: from lori.mine.nu (65-23.244.81.adsl.skynet.be [81.244.23.65]) with ESMTP id i5JMFBC1017567; Sun, 20 Jun 2004 00:15:11 +0200 (envelope-from ) Received: by lori.mine.nu (Postfix, from userid 1000) id 9CCB74E9; Sun, 20 Jun 2004 00:15:09 +0200 (CEST) Date: Sun, 20 Jun 2004 00:15:09 +0200 From: Geert Hendrickx To: Andriy Tkachuk Message-ID: <20040619221509.GA5088@lori.mine.nu> References: <20040619175007.GB462@tuatara.fishballoon.org> <414787887.20040619210137@andric.com> <20040619193545.GC462@tuatara.fishballoon.org> <14210101.20040619220601@andric.com> <004401c45640$f7d73b70$5f0210ac@ranger> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <004401c45640$f7d73b70$5f0210ac@ranger> User-Agent: Mutt/1.4.2i X-GPG-Key: http://www.win.ua.ac.be/~s005085/gnupgkey.txt X-GPG-Key-ID: 1024D/766C1E92 X-Accept-Language: nl,en cc: freebsd-hackers@freebsd.org Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2004 02:15:30 -0000 > Don't you remember the initial UNIX concept to make miracles by small > things fired together? :) That's a very nice quote! Gonna answer that the next time someone asks me what UNIX is. :-) GH From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 20 02:37:45 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9417D16A4CE; Sun, 20 Jun 2004 02:37:45 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7341743D49; Sun, 20 Jun 2004 02:37:45 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from freebsd.org (davidxu@localhost [127.0.0.1]) i5K2bAFd055779; Sun, 20 Jun 2004 02:37:11 GMT (envelope-from davidxu@freebsd.org) Message-ID: <40D4F7E9.60908@freebsd.org> Date: Sun, 20 Jun 2004 10:35:21 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040522 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Cyrille Lefevre References: <008901c4566c$610d1300$7890a8c0@dyndns.org> In-Reply-To: <008901c4566c$610d1300$7890a8c0@dyndns.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org cc: current@freebsd.org Subject: Re: -lthr vs. -pthread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2004 02:37:45 -0000 libpthread default is M:N threading model, kernel thread entity is allocated on demand, things like sleep() only block thread in userland, no kernel thread will be allocated, so in your example, you won't see 5 kernel threads, only two threads are showed here, the extra thread is a signal thread, there is only one signal thread in process live cycle. libthr is 1:1, when you allocate a thread in userland, it creates a kernel thread too. David Xu Cyrille Lefevre wrote: >Hi, > >I'm currently working on enhancements to ps w/ "Garance A Drosehn". >I've just added some thread related stuffs and to see them, I'm >using the following program : > >#define _REENTRANT >#include > >#define NUM_THREADS 5 >#define SLEEP_TIME 10 > >void *sleeping(void *); >pthread_t tid[NUM_THREADS]; > >int >main(int argc, char *argv[]) >{ > int i; > > for (i = 0; i < NUM_THREADS; i++) > pthread_create(&tid[i], NULL, sleeping, (void >*)SLEEP_TIME); > for (i = 0; i < NUM_THREADS; i++) > pthread_join(tid[i], NULL); > printf("main() reporting that all %d threads have terminated\n", >i); > return (0); >} > >void * >sleeping(void *arg) >{ > int sleep_time = (int)arg; > printf("thread %d sleeping %d seconds ...\n", thr_self(), >sleep_time); > sleep(sleep_time); > printf("\nthread %d awakening\n", thr_self()); > return (NULL); >} > >then, I compile this one in 2 way : > ># cc -o thread thread.c -lthr >and ># cc -pthread -o pthread thread.c > >here is some of the "new ps" outputs : > >"lwp" is the thread id and "nlwp" the the number of threads. >-q switch in posix mode (aka SystemV) and -C select processes >by name (a la pgrep). > ># ./thread& sleep 1; ps -H -O lwp,nlwp -qC thread >(thread, using -H) > PID LWP NLWP TTY TIME COMMAND >85146 100005 6 ttyp0 00:00:00 thread >85146 100004 6 ttyp0 00:00:00 thread >85146 100003 6 ttyp0 00:00:00 thread >85146 100002 6 ttyp0 00:00:00 thread >85146 100001 6 ttyp0 00:00:00 thread >85146 85146 6 ttyp0 00:00:00 thread ># ./pthread& sleep 1; ps -H -O lwp,nlwp -qC thread >(pthread, using -H) > PID LWP NLWP TTY TIME COMMAND >96689 100002 2 ttyp0 00:00:00 pthread >96689 96689 2 ttyp0 00:00:00 pthread > >is it normal that -pthread only forks only 1 thread where >-lthr forks 5 of them ? > ># ./thread& sleep 1; ps -O lwp,nlwp -qC thread >(thread ot pthread, not using -H) > PID LWP NLWP TTY TIME COMMAND >73718 100005 6 ttyp0 00:00:00 thread > > >is it normal that the selected process is the last forked thread and >not the thread owner (father) ? > >PS : using -lc_r, there is no thread at all, but I suppose this is an >expected behaviour. > >CC -current and -hackers > >Cyrille Lefevre. > > From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 20 08:59:26 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 83DA616A4CE for ; Sun, 20 Jun 2004 08:59:26 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id C43AE43D2F for ; Sun, 20 Jun 2004 08:59:25 +0000 (GMT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 20 Jun 2004 09:59:13 +0100 (BST) Date: Sun, 20 Jun 2004 09:59:12 +0100 From: David Malone To: Scott Mitchell Message-ID: <20040620085912.GA7301@walton.maths.tcd.ie> References: <20040619175007.GB462@tuatara.fishballoon.org> <414787887.20040619210137@andric.com> <20040619193545.GC462@tuatara.fishballoon.org> <14210101.20040619220601@andric.com> <20040619225229.GE462@tuatara.fishballoon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040619225229.GE462@tuatara.fishballoon.org> User-Agent: Mutt/1.5.3i Sender: dwmalone@maths.tcd.ie cc: freebsd-hackers@freebsd.org cc: Dimitry Andric Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2004 08:59:26 -0000 On Sat, Jun 19, 2004 at 11:52:29PM +0100, Scott Mitchell wrote: > On Sat, Jun 19, 2004 at 10:06:01PM +0200, Dimitry Andric wrote: > > Looking through ls source shows that the sorting is done by passing a > > comparison function to fts_open(3). In the case of sorting by > > modification time, the *only* comparison made is of the mtime fields: > > You did see the patch attached to my original post, right? It modifies all > of these comparison functions to sort the two items by name (or reverse > name) in the case that their timestamps are equal. Hi Scott, Could you produce a version of your patch that uses the nanoseconds field too? I produced the one below, but I think the style in your patch was nicer. Also, I wonder if the revblahcmp functions should just call blahcmp with their arguments reversed? David. Index: cmp.c =================================================================== RCS file: /cvs/FreeBSD-CVS/src/bin/ls/cmp.c,v retrieving revision 1.13 diff -u -r1.13 cmp.c --- cmp.c 6 Apr 2004 20:06:47 -0000 1.13 +++ cmp.c 19 Jun 2004 21:23:01 -0000 @@ -63,35 +63,107 @@ int modcmp(const FTSENT *a, const FTSENT *b) { - return (b->fts_statp->st_mtime - a->fts_statp->st_mtime); + if (b->fts_statp->st_mtimespec.tv_sec > + a->fts_statp->st_mtimespec.tv_sec) + return 1; + if (b->fts_statp->st_mtimespec.tv_sec < + a->fts_statp->st_mtimespec.tv_sec) + return -1; + if (b->fts_statp->st_mtimespec.tv_nsec > + a->fts_statp->st_mtimespec.tv_nsec) + return 1; + if (b->fts_statp->st_mtimespec.tv_nsec < + a->fts_statp->st_mtimespec.tv_nsec) + return -1; + return (strcoll(a->fts_name, b->fts_name)); } int revmodcmp(const FTSENT *a, const FTSENT *b) { - return (a->fts_statp->st_mtime - b->fts_statp->st_mtime); + if (a->fts_statp->st_mtimespec.tv_sec > + b->fts_statp->st_mtimespec.tv_sec) + return 1; + if (a->fts_statp->st_mtimespec.tv_sec < + b->fts_statp->st_mtimespec.tv_sec) + return -1; + if (a->fts_statp->st_mtimespec.tv_nsec > + b->fts_statp->st_mtimespec.tv_nsec) + return 1; + if (a->fts_statp->st_mtimespec.tv_nsec < + b->fts_statp->st_mtimespec.tv_nsec) + return -1; + return (strcoll(b->fts_name, a->fts_name)); } int acccmp(const FTSENT *a, const FTSENT *b) { - return (b->fts_statp->st_atime - a->fts_statp->st_atime); + if (b->fts_statp->st_atimespec.tv_sec > + a->fts_statp->st_atimespec.tv_sec) + return 1; + if (b->fts_statp->st_atimespec.tv_sec < + a->fts_statp->st_atimespec.tv_sec) + return -1; + if (b->fts_statp->st_atimespec.tv_nsec > + a->fts_statp->st_atimespec.tv_nsec) + return 1; + if (b->fts_statp->st_atimespec.tv_nsec < + a->fts_statp->st_atimespec.tv_nsec) + return -1; + return (strcoll(a->fts_name, b->fts_name)); } int revacccmp(const FTSENT *a, const FTSENT *b) { - return (a->fts_statp->st_atime - b->fts_statp->st_atime); + if (a->fts_statp->st_atimespec.tv_sec > + b->fts_statp->st_atimespec.tv_sec) + return 1; + if (a->fts_statp->st_atimespec.tv_sec < + b->fts_statp->st_atimespec.tv_sec) + return -1; + if (a->fts_statp->st_atimespec.tv_nsec > + b->fts_statp->st_atimespec.tv_nsec) + return 1; + if (a->fts_statp->st_atimespec.tv_nsec < + b->fts_statp->st_atimespec.tv_nsec) + return -1; + return (strcoll(b->fts_name, a->fts_name)); } int statcmp(const FTSENT *a, const FTSENT *b) { - return (b->fts_statp->st_ctime - a->fts_statp->st_ctime); + if (b->fts_statp->st_ctimespec.tv_sec > + a->fts_statp->st_ctimespec.tv_sec) + return 1; + if (b->fts_statp->st_ctimespec.tv_sec < + a->fts_statp->st_ctimespec.tv_sec) + return -1; + if (b->fts_statp->st_ctimespec.tv_nsec > + a->fts_statp->st_ctimespec.tv_nsec) + return 1; + if (b->fts_statp->st_ctimespec.tv_nsec < + a->fts_statp->st_ctimespec.tv_nsec) + return -1; + return (strcoll(a->fts_name, b->fts_name)); } int revstatcmp(const FTSENT *a, const FTSENT *b) { - return (a->fts_statp->st_ctime - b->fts_statp->st_ctime); + if (a->fts_statp->st_ctimespec.tv_sec > + b->fts_statp->st_ctimespec.tv_sec) + return 1; + if (a->fts_statp->st_ctimespec.tv_sec < + b->fts_statp->st_ctimespec.tv_sec) + return -1; + if (a->fts_statp->st_ctimespec.tv_nsec > + b->fts_statp->st_ctimespec.tv_nsec) + return 1; + if (a->fts_statp->st_ctimespec.tv_nsec < + b->fts_statp->st_ctimespec.tv_nsec) + return -1; + return (strcoll(b->fts_name, a->fts_name)); } From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 20 10:53:21 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3F71F16A4CE for ; Sun, 20 Jun 2004 10:53:21 +0000 (GMT) Received: from mail.emax.ru (ns2.emax.ru [217.73.252.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id 27C1743D1F for ; Sun, 20 Jun 2004 10:53:18 +0000 (GMT) (envelope-from zagarin@emax.ru) Received: from [213.232.241.154] (account zagarin HELO [192.168.1.16]) by mail.emax.ru (CommuniGate Pro SMTP 4.2b3) with ESMTP-TLS id 2049656 for freebsd-hackers@freebsd.org; Sun, 20 Jun 2004 14:52:53 +0400 Message-ID: <40D56C73.8090806@emax.ru> Date: Sun, 20 Jun 2004 14:52:35 +0400 From: Alexey Zagarin Organization: emax User-Agent: Mozilla Thunderbird 0.6 (X11/20040605) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: sshd & pam & getpwnam() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2004 10:53:21 -0000 Hello! Does anybody know, why sshd call getpwnam() even if user is authenticating via PAM? This broke remote authentication (RADIUS, TACACS+) when user doesn't exist in local password database. -- Alexey Zagarin emax telecommunications From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 20 14:47:12 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F1A8316A4CE for ; Sun, 20 Jun 2004 14:47:12 +0000 (GMT) Received: from mta04-svc.ntlworld.com (mta04-svc.ntlworld.com [62.253.162.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DFE643D49 for ; Sun, 20 Jun 2004 14:47:12 +0000 (GMT) (envelope-from scott@fishballoon.org) Received: from llama.fishballoon.org ([81.104.195.124]) by mta04-svc.ntlworld.comESMTP <20040620144558.LPSY24958.mta04-svc.ntlworld.com@llama.fishballoon.org>; Sun, 20 Jun 2004 15:45:58 +0100 Received: from tuatara.fishballoon.org ([192.168.1.6]) by llama.fishballoon.org with esmtp (Exim 4.34 (FreeBSD)) id 1Bc3ax-000OUH-UM; Sun, 20 Jun 2004 15:46:55 +0100 Received: (from scott@localhost) by tuatara.fishballoon.org (8.12.11/8.12.11/Submit) id i5KEkt18085327; Sun, 20 Jun 2004 15:46:55 +0100 (BST) (envelope-from scott) Date: Sun, 20 Jun 2004 15:46:54 +0100 From: Scott Mitchell To: David Malone Message-ID: <20040620144654.GG462@tuatara.fishballoon.org> References: <20040619175007.GB462@tuatara.fishballoon.org> <414787887.20040619210137@andric.com> <20040619193545.GC462@tuatara.fishballoon.org> <14210101.20040619220601@andric.com> <20040619225229.GE462@tuatara.fishballoon.org> <20040620085912.GA7301@walton.maths.tcd.ie> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="oC1+HKm2/end4ao3" Content-Disposition: inline In-Reply-To: <20040620085912.GA7301@walton.maths.tcd.ie> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 4.10-PRERELEASE i386 cc: freebsd-hackers@freebsd.org cc: Dimitry Andric Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2004 14:47:13 -0000 --oC1+HKm2/end4ao3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Jun 20, 2004 at 09:59:12AM +0100, David Malone wrote: > On Sat, Jun 19, 2004 at 11:52:29PM +0100, Scott Mitchell wrote: > > On Sat, Jun 19, 2004 at 10:06:01PM +0200, Dimitry Andric wrote: > > > Looking through ls source shows that the sorting is done by passing a > > > comparison function to fts_open(3). In the case of sorting by > > > modification time, the *only* comparison made is of the mtime fields: > > > > You did see the patch attached to my original post, right? It modifies all > > of these comparison functions to sort the two items by name (or reverse > > name) in the case that their timestamps are equal. > > Hi Scott, > > Could you produce a version of your patch that uses the nanoseconds > field too? I produced the one below, but I think the style in your > patch was nicer. Also, I wonder if the revblahcmp functions should > just call blahcmp with their arguments reversed? > > David. David, New patch attached that compares against the nanos field as well. It could stand a bit of cleaning up to remove the overly long lines. I'm not sure I'd want this in the tree unless we also had an option to display the nanoseconds - as it stands you could get items apparently ordered wrongly, unless you knew the value of their nanos fields. I could do that if people thought it would be useful. Scott -- =========================================================================== Scott Mitchell | PGP Key ID | "Eagles may soar, but weasels Cambridge, England | 0x54B171B9 | don't get sucked into jet engines" scott at fishballoon.org | 0xAA775B8B | -- Anon --oC1+HKm2/end4ao3 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ls.patch" Index: cmp.c =================================================================== RCS file: /home/ncvs/src/bin/ls/cmp.c,v retrieving revision 1.13 diff -u -r1.13 cmp.c --- cmp.c 6 Apr 2004 20:06:47 -0000 1.13 +++ cmp.c 20 Jun 2004 14:33:14 -0000 @@ -63,35 +63,47 @@ int modcmp(const FTSENT *a, const FTSENT *b) { - return (b->fts_statp->st_mtime - a->fts_statp->st_mtime); + return (a->fts_statp->st_mtimespec.tv_sec == b->fts_statp->st_mtimespec.tv_sec ? + (a->fts_statp->st_mtimespec.tv_nsec == b->fts_statp->st_mtimespec.tv_nsec ? + namecmp(a, b) : + b->fts_statp->st_mtimespec.tv_nsec - a->fts_statp->st_mtimespec.tv_nsec) : + b->fts_statp->st_mtimespec.tv_sec - a->fts_statp->st_mtimespec.tv_sec); } int revmodcmp(const FTSENT *a, const FTSENT *b) { - return (a->fts_statp->st_mtime - b->fts_statp->st_mtime); + return modcmp(b, a); } int acccmp(const FTSENT *a, const FTSENT *b) { - return (b->fts_statp->st_atime - a->fts_statp->st_atime); + return (a->fts_statp->st_atimespec.tv_sec == b->fts_statp->st_atimespec.tv_sec ? + (a->fts_statp->st_atimespec.tv_nsec == b->fts_statp->st_atimespec.tv_nsec ? + namecmp(a, b) : + b->fts_statp->st_atimespec.tv_nsec - a->fts_statp->st_atimespec.tv_nsec) : + b->fts_statp->st_atimespec.tv_sec - a->fts_statp->st_atimespec.tv_sec); } int revacccmp(const FTSENT *a, const FTSENT *b) { - return (a->fts_statp->st_atime - b->fts_statp->st_atime); + return acccmp(b, a); } int statcmp(const FTSENT *a, const FTSENT *b) { - return (b->fts_statp->st_ctime - a->fts_statp->st_ctime); + return (a->fts_statp->st_ctimespec.tv_sec == b->fts_statp->st_ctimespec.tv_sec ? + (a->fts_statp->st_ctimespec.tv_nsec == b->fts_statp->st_ctimespec.tv_nsec ? + namecmp(a, b) : + b->fts_statp->st_ctimespec.tv_nsec - a->fts_statp->st_ctimespec.tv_nsec) : + b->fts_statp->st_ctimespec.tv_sec - a->fts_statp->st_ctimespec.tv_sec); } int revstatcmp(const FTSENT *a, const FTSENT *b) { - return (a->fts_statp->st_ctime - b->fts_statp->st_ctime); + return statcmp(b, a); } --oC1+HKm2/end4ao3-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 20 21:38:29 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B84C16A4CE for ; Sun, 20 Jun 2004 21:38:29 +0000 (GMT) Received: from arginine.spc.org (arginine.spc.org [195.206.69.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id B275743D1F for ; Sun, 20 Jun 2004 21:38:28 +0000 (GMT) (envelope-from bms@spc.org) Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id C7A116530A; Sun, 20 Jun 2004 22:38:26 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 45975-03; Sun, 20 Jun 2004 22:38:26 +0100 (BST) Received: from empiric.dek.spc.org (host81-156-14-104.range81-156.btcentralplus.com [81.156.14.104]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by arginine.spc.org (Postfix) with ESMTP id CE45F651FC; Sun, 20 Jun 2004 22:38:25 +0100 (BST) Received: by empiric.dek.spc.org (Postfix, from userid 1001) id 502D46146; Sun, 20 Jun 2004 22:10:47 +0100 (BST) Date: Sun, 20 Jun 2004 22:10:47 +0100 From: Bruce M Simpson To: "Ing.Richard Andrysek" Message-ID: <20040620211047.GA786@empiric.dek.spc.org> Mail-Followup-To: "Ing.Richard Andrysek" , freebsd-hackers@freebsd.org References: <40D2D869.8030002@riedel.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="X1bOJ3K7DJ5YkBrT" Content-Disposition: inline In-Reply-To: <40D2D869.8030002@riedel.net> cc: freebsd-hackers@freebsd.org Subject: Re: SPDIF capture device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2004 21:38:29 -0000 --X1bOJ3K7DJ5YkBrT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, On Fri, Jun 18, 2004 at 01:56:25PM +0200, Ing.Richard Andrysek wrote: > I've read your question about SPDIF capture device on freebsd. I am=20 > currently looking for similar device.Have you found such one? Can you=20 > access subcode etc.? The Soyo Dragon Plus! K7V has a SPDIF input/output; this uses the snd_cmi driver. However, I think some machine specific incantations are necessary to use SPDIF mode, and I don't know what these are. I have such a board but it's not in Desktop use (it's in my CVS server). Some reverse engineering is probably needed here, but if the Linux drivers support this and a change can be crossported easily, I'll happily commit it if people have the means to test it. Regards, BMS --X1bOJ3K7DJ5YkBrT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Comment: '' iD8DBQFA1f1WueUpAYYNtTsRAi9cAKCFHZnUM6SRTQRAAWHRm9B+jkGfWwCeLplw iz6Id5l8SFrv7urmgnGUZ/Y= =VgaG -----END PGP SIGNATURE----- --X1bOJ3K7DJ5YkBrT-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 20 23:55:22 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0A5F16A4CF; Sun, 20 Jun 2004 23:55:22 +0000 (GMT) Received: from smtp2.server.rpi.edu (smtp2.server.rpi.edu [128.113.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5531E43D4C; Sun, 20 Jun 2004 23:55:15 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp2.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i5KNtDVu016672; Sun, 20 Jun 2004 19:55:13 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <008901c4566c$610d1300$7890a8c0@dyndns.org> References: <008901c4566c$610d1300$7890a8c0@dyndns.org> Date: Sun, 20 Jun 2004 19:55:11 -0400 To: "Cyrille Lefevre" , From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) cc: hackers@freebsd.org Subject: Re: -lthr vs. -pthread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2004 23:55:23 -0000 At 4:14 AM +0200 6/20/04, Cyrille Lefevre wrote: > >is it normal that the selected process is the last forked thread >and not the thread owner (father) ? I committed the changes, so people can try this if they want. Example: (48) ps -HO lwp,nlwp PID LWP NLWP TT STAT TIME COMMAND 1870 1870 1 ?? SL 0:00.13 sshd: gad@ttyp3 (sshd) 1871 1871 1 p3 SLs 0:00.09 -bash (bash) 2535 100002 6 p3 SL+ 0:00.00 ./cyr-thread 2535 100001 6 p3 SL+ 0:00.00 ./cyr-thread 2535 100004 6 p3 SL+ 0:00.00 ./cyr-thread 2535 2535 6 p3 SL+ 0:00.00 ./cyr-thread 2535 100000 6 p3 SL+ 0:00.00 ./cyr-thread 2535 100003 6 p3 SL+ 0:00.00 ./cyr-thread (49) ps -O lwp,nlwp PID LWP NLWP TT STAT TIME COMMAND 1870 1870 1 ?? S 0:00.13 sshd: gad@ttyp3 (sshd) 1871 1871 1 p3 Ss 0:00.09 -bash (bash) 2535 100004 6 p3 S+ 0:00.00 ./cyr-thread When the -H is not requested, why does process 2535 show up as thread-ID #100004 instead of #2535? Is that something that we need to change when copying info into kproc_info ? Or is that perfectly reasonable? I have not worked with threaded apps, so I am not sure what people would be expecting here. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 00:08:02 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C0AE16A4CE; Mon, 21 Jun 2004 00:08:02 +0000 (GMT) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FE2B43D49; Mon, 21 Jun 2004 00:08:02 +0000 (GMT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (sccrmhc13) with ESMTP id <20040621000759016008urfme>; Mon, 21 Jun 2004 00:07:59 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id RAA26601; Sun, 20 Jun 2004 17:07:57 -0700 (PDT) Date: Sun, 20 Jun 2004 17:07:56 -0700 (PDT) From: Julian Elischer To: Garance A Drosihn In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Cyrille Lefevre cc: hackers@freebsd.org cc: current@freebsd.org Subject: Re: -lthr vs. -pthread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 00:08:02 -0000 this is a question for marcel, but basically "this may change". In current code the thread_id of the first thread is set to be equal to the PID. Marcel and I have discussed reworking the thread_id code and in the new code this will possibly not be true. Under KSE teh original thread has probably exited.. and the one availabel to run is number 100004. Under KSE threads are ephemeral, and come-and go as needed. (so the ID actually doesn't mean anything of rgeat significance) On Sun, 20 Jun 2004, Garance A Drosihn wrote: > At 4:14 AM +0200 6/20/04, Cyrille Lefevre wrote: > > > >is it normal that the selected process is the last forked thread > >and not the thread owner (father) ? > > I committed the changes, so people can try this if they want. > Example: > > (48) ps -HO lwp,nlwp > PID LWP NLWP TT STAT TIME COMMAND > 1870 1870 1 ?? SL 0:00.13 sshd: gad@ttyp3 (sshd) > 1871 1871 1 p3 SLs 0:00.09 -bash (bash) > 2535 100002 6 p3 SL+ 0:00.00 ./cyr-thread > 2535 100001 6 p3 SL+ 0:00.00 ./cyr-thread > 2535 100004 6 p3 SL+ 0:00.00 ./cyr-thread > 2535 2535 6 p3 SL+ 0:00.00 ./cyr-thread > 2535 100000 6 p3 SL+ 0:00.00 ./cyr-thread > 2535 100003 6 p3 SL+ 0:00.00 ./cyr-thread > > (49) ps -O lwp,nlwp > PID LWP NLWP TT STAT TIME COMMAND > 1870 1870 1 ?? S 0:00.13 sshd: gad@ttyp3 (sshd) > 1871 1871 1 p3 Ss 0:00.09 -bash (bash) > 2535 100004 6 p3 S+ 0:00.00 ./cyr-thread > > When the -H is not requested, why does process 2535 show up as > thread-ID #100004 instead of #2535? Is that something that we > need to change when copying info into kproc_info ? Or is that > perfectly reasonable? I have not worked with threaded apps, > so I am not sure what people would be expecting here. > > -- > Garance Alistair Drosehn = gad@gilead.netel.rpi.edu > Senior Systems Programmer or gad@freebsd.org > Rensselaer Polytechnic Institute or drosih@rpi.edu > _______________________________________________ > 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 Mon Jun 21 00:27:31 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 143A516A4CE; Mon, 21 Jun 2004 00:27:31 +0000 (GMT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A51E43D5F; Mon, 21 Jun 2004 00:27:30 +0000 (GMT) (envelope-from marcel@xcllnt.net) Received: from dhcp50.pn.xcllnt.net (dhcp50.pn.xcllnt.net [192.168.4.250]) by ns1.xcllnt.net (8.12.11/8.12.11) with ESMTP id i5L0Qq7Y080473; Sun, 20 Jun 2004 17:26:52 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp50.pn.xcllnt.net (localhost [127.0.0.1]) i5L0QpeW003129; Sun, 20 Jun 2004 17:26:52 -0700 (PDT) (envelope-from marcel@dhcp50.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp50.pn.xcllnt.net (8.12.11/8.12.11/Submit) id i5L0QpE7003128; Sun, 20 Jun 2004 17:26:51 -0700 (PDT) (envelope-from marcel) Date: Sun, 20 Jun 2004 17:26:51 -0700 From: Marcel Moolenaar To: Julian Elischer Message-ID: <20040621002651.GA3086@dhcp50.pn.xcllnt.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i cc: Cyrille Lefevre cc: hackers@freebsd.org cc: Garance A Drosihn cc: current@freebsd.org Subject: Re: -lthr vs. -pthread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 00:27:31 -0000 On Sun, Jun 20, 2004 at 05:07:56PM -0700, Julian Elischer wrote: > this is a question for marcel, > but basically "this may change". In current code the thread_id of the > first thread is set to be equal to the PID. Marcel and I have discussed > reworking the thread_id code and in the new code this will possibly not > be true. Yes. We need to be sure however that we don't break core file creation. Historically the PRSTATUS note in the core file has the process ID. The current thread LWP allocation allows us to put the Thread ID in the note and have as many notes as there are threads. Non-threaded processes will create core files that are compatible with older tools. If we change the LWP allocation, we will break this and should probably use LWPSTATUS notes for the thread states and use the PRSTATUS note for the process state. In any case, this requires modifications to binutils, so needs to be coordinated. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 05:44:34 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 622FD16A4CE for ; Mon, 21 Jun 2004 05:44:34 +0000 (GMT) Received: from VARK.homeunix.com (c-67-174-240-84.client.comcast.net [67.174.240.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id D636943D39 for ; Mon, 21 Jun 2004 05:44:33 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.homeunix.com (localhost [127.0.0.1]) by VARK.homeunix.com (8.12.11/8.12.10) with ESMTP id i5L5i6YR000982; Sun, 20 Jun 2004 22:44:07 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.homeunix.com (8.12.11/8.12.10/Submit) id i5L5i6co000981; Sun, 20 Jun 2004 22:44:06 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Sun, 20 Jun 2004 22:44:06 -0700 From: David Schultz To: Scott Mitchell Message-ID: <20040621054406.GA927@VARK.homeunix.com> Mail-Followup-To: Scott Mitchell , David Malone , freebsd-hackers@FreeBSD.ORG, Dimitry Andric References: <20040619175007.GB462@tuatara.fishballoon.org> <414787887.20040619210137@andric.com> <20040619193545.GC462@tuatara.fishballoon.org> <14210101.20040619220601@andric.com> <20040619225229.GE462@tuatara.fishballoon.org> <20040620085912.GA7301@walton.maths.tcd.ie> <20040620144654.GG462@tuatara.fishballoon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040620144654.GG462@tuatara.fishballoon.org> cc: David Malone cc: freebsd-hackers@FreeBSD.ORG cc: Dimitry Andric Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 05:44:34 -0000 On Sun, Jun 20, 2004, Scott Mitchell wrote: > On Sun, Jun 20, 2004 at 09:59:12AM +0100, David Malone wrote: > > On Sat, Jun 19, 2004 at 11:52:29PM +0100, Scott Mitchell wrote: > > > On Sat, Jun 19, 2004 at 10:06:01PM +0200, Dimitry Andric wrote: > > > > Looking through ls source shows that the sorting is done by passing a > > > > comparison function to fts_open(3). In the case of sorting by > > > > modification time, the *only* comparison made is of the mtime fields: > > > > > > You did see the patch attached to my original post, right? It modifies all > > > of these comparison functions to sort the two items by name (or reverse > > > name) in the case that their timestamps are equal. > > > > Hi Scott, > > > > Could you produce a version of your patch that uses the nanoseconds > > field too? I produced the one below, but I think the style in your > > patch was nicer. Also, I wonder if the revblahcmp functions should > > just call blahcmp with their arguments reversed? > > > > David. > > David, > > New patch attached that compares against the nanos field as well. It could > stand a bit of cleaning up to remove the overly long lines. > > I'm not sure I'd want this in the tree unless we also had an option to > display the nanoseconds - as it stands you could get items apparently > ordered wrongly, unless you knew the value of their nanos fields. I could > do that if people thought it would be useful. Sorting on nanoseconds too is likely to be more confusing than useful. Even if we use one of the precious few option letters ls doesn't use already to add a nanosecond display, most people won't know about it because they don't care about nanoseconds. They might care when they notice---as you did---that the sort order isn't what they expected. Is the point of sorting on nanoseconds to totally order the files based on modification time? From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 06:17:06 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3AA6B16A4CE for ; Mon, 21 Jun 2004 06:17:06 +0000 (GMT) Received: from burka.carrier.kiev.ua (burka.carrier.kiev.ua [193.193.193.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD0C143D39 for ; Mon, 21 Jun 2004 06:17:04 +0000 (GMT) (envelope-from netch@lucky.net) Received: from netch@localhost [127.0.0.1] (netch@localhost [127.0.0.1]) by burka.carrier.kiev.ua with ESMTP id i5L6GqeV063023; Mon, 21 Jun 2004 09:16:56 +0300 (EEST) (envelope-from netch@burka.carrier.kiev.ua) Received: (from netch@localhost) by burka.carrier.kiev.ua (8.12.11/8.12.11/Submit) id i5L6Gqah063020; Mon, 21 Jun 2004 09:16:52 +0300 (EEST) (envelope-from netch) Date: Mon, 21 Jun 2004 09:16:52 +0300 From: Valentin Nechayev To: Andriy Tkachuk Message-ID: <20040621061652.GA96079@lucky.net> References: <20040619175007.GB462@tuatara.fishballoon.org> <414787887.20040619210137@andric.com> <20040619193545.GC462@tuatara.fishballoon.org> <14210101.20040619220601@andric.com> <004401c45640$f7d73b70$5f0210ac@ranger> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <004401c45640$f7d73b70$5f0210ac@ranger> X-42: On X-Verify-Sender: verified cc: freebsd-hackers@freebsd.org Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 06:17:06 -0000 Sun, Jun 20, 2004 at 02:34:04, andrit wrote about "Re: /bin/ls sorting bug?": >> And AFAICS, there's no way to tell ls: "first sort on time, >> then on filename, then on size", etc. This would make a nice addition >> though. :) > But there is nice sort command and power of unix. > Don't you remember the initial UNIX concept to make miracles by small > things fired together? :) Well, let's disable sorting in ls output totally and give this role to sort. I thinks folks won't adopt this idea, especially said that ls output isn't easily machine-parseable. -netch- From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 08:11:00 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5DE2716A4CE; Mon, 21 Jun 2004 08:11:00 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 72AAC43D2F; Mon, 21 Jun 2004 08:10:59 +0000 (GMT) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 21 Jun 2004 09:10:47 +0100 (BST) To: David Schultz In-reply-to: Your message of "Sun, 20 Jun 2004 22:44:06 PDT." <20040621054406.GA927@VARK.homeunix.com> X-Request-Do: Date: Mon, 21 Jun 2004 09:10:47 +0100 From: David Malone Message-ID: <200406210910.aa18808@salmon.maths.tcd.ie> cc: freebsd-hackers@FreeBSD.ORG cc: Dimitry Andric cc: Scott Mitchell Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 08:11:00 -0000 > Sorting on nanoseconds too is likely to be more confusing than > useful. Even if we use one of the precious few option letters ls > doesn't use already to add a nanosecond display, most people won't > know about it because they don't care about nanoseconds. They > might care when they notice---as you did---that the sort order > isn't what they expected. At the moment in FreeBSD the nanoseconds field is always zero, unless you twiddle vfs.timestamp_precision, so it would make no difference to joe user. For people that do set vfs.timestamp_precision, it would be nice if ls did the right thing (for example, test already compares the nanoseconds field, after someone submitted a PR because it didn't). > Is the point of sorting on nanoseconds to totally order the files > based on modification time? Depending on the clock resolution (which is partially determined by vfs.timestamp_precision and partially determined by the actual clock resolution), it may not be enough to totally order the files. David. From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 08:51:08 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D2AF816A4DC for ; Mon, 21 Jun 2004 08:51:08 +0000 (GMT) Received: from oasis.uptsoft.com (oasis.uptsoft.com [217.20.165.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA5FE43D45 for ; Mon, 21 Jun 2004 08:51:07 +0000 (GMT) (envelope-from devnull@oasis.uptsoft.com) Received: (from devnull@localhost) by oasis.uptsoft.com (8.11.6/linuxconf) id i5L8p6b09359 for freebsd-hackers@freebsd.org; Mon, 21 Jun 2004 11:51:06 +0300 Date: Mon, 21 Jun 2004 11:51:06 +0300 From: Sergey Lyubka To: freebsd-hackers@freebsd.org Message-ID: <20040621115106.A7011@oasis.uptsoft.com> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20040616173848.A8939@oasis.uptsoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20040616173848.A8939@oasis.uptsoft.com>; from devnull@uptsoft.com on Wed, Jun 16, 2004 at 05:38:48PM +0300 X-OS: FreeBSD 4.5-STABLE Subject: Re: memory mapped packet capturing - bpf replacement ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 08:51:09 -0000 Discussion on -current, "read vs mmap", explained this. If userland process does pre-fault allocated memory, ng_mmq appears to be considerably faster than pcap: # ./benchmark rl0 /dev/mmq15 20000 desc rcvd dropped seen totlen pps time (sec) mmq 76865 0 20000 1196617 17231 4.461 pcap 73337 37199 20000 1200000 16527 4.438 I will do more tests though. Question to the netgraph hackers. ng_mmq acts like ng_hole, i.e. it discards all mbufs passed to it. If I connect it directly to ng_ether, the network stack stops working. The question is - how to make it `transparent', so event the "lower" hook is connected, mbufs are still passed to upper network stack layers ? Is it possible without additional copies like ng_tee/ng_hub do ? -sergey From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 09:17:02 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 55FCE16A4CE; Mon, 21 Jun 2004 09:17:02 +0000 (GMT) Received: from faceman.servitor.co.uk (faceman.servitor.co.uk [80.71.15.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9469043D2D; Mon, 21 Jun 2004 09:17:01 +0000 (GMT) (envelope-from wiggy@servitor.co.uk) Received: from wiggy by faceman.servitor.co.uk with local (Exim 4.30) id 1BcKv3-0003mu-8X; Mon, 21 Jun 2004 10:16:49 +0100 Date: Mon, 21 Jun 2004 10:16:49 +0100 From: Paul Robinson To: David Malone Message-ID: <20040621091649.GA92422@iconoplex.co.uk> References: <20040621054406.GA927@VARK.homeunix.com> <200406210910.aa18808@salmon.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200406210910.aa18808@salmon.maths.tcd.ie> Sender: Paul Robinson cc: freebsd-hackers@FreeBSD.ORG cc: David Schultz cc: Scott Mitchell cc: Dimitry Andric Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 09:17:02 -0000 Guys, Hate to be the party-pooper, but this thread is starting to smell a bit odd. The smell reminds me of something... when I was a kid at school... during the break.... ahh, that's it. This thing smells like a bikeshed. :-) For what it's worth the original patch looked good to me. The nanosecond patch is fine too. Please, no more intimate discussion of a command line flag that few people use, and if it doesn't work correctly now could have been worked around with a pipe to sort. I'm guessing the messed up order was because the files that were out of kilter were the files being hard-linked to but don't have the time to check. So in some ways, the output was predictable. Either way, I say commit or let it die... no... more... ls... :-) -- Paul Robinson http://www.iconoplex.co.uk/ From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 09:24:10 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7714116A4D0; Mon, 21 Jun 2004 09:24:10 +0000 (GMT) Received: from mta03-svc.ntlworld.com (mta03-svc.ntlworld.com [62.253.162.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id BAA8A43D54; Mon, 21 Jun 2004 09:24:09 +0000 (GMT) (envelope-from scott@fishballoon.org) Received: from llama.fishballoon.org ([81.104.195.124]) by mta03-svc.ntlworld.comESMTP <20040621092302.NYVF28581.mta03-svc.ntlworld.com@llama.fishballoon.org>; Mon, 21 Jun 2004 10:23:02 +0100 Received: from scott by llama.fishballoon.org with local (Exim 4.34 (FreeBSD)) id 1BcL27-0001UP-QM; Mon, 21 Jun 2004 10:24:07 +0100 Date: Mon, 21 Jun 2004 10:24:07 +0100 From: Scott Mitchell To: David Malone Message-ID: <20040621092406.GA5069@llama.fishballoon.org> References: <20040621054406.GA927@VARK.homeunix.com> <200406210910.aa18808@salmon.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200406210910.aa18808@salmon.maths.tcd.ie> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 4.9-RELEASE-p4 i386 Sender: Scott Mitchell cc: freebsd-hackers@FreeBSD.ORG cc: David Schultz Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 09:24:10 -0000 On Mon, Jun 21, 2004 at 09:10:47AM +0100, David Malone wrote: > > Sorting on nanoseconds too is likely to be more confusing than > > useful. Even if we use one of the precious few option letters ls > > doesn't use already to add a nanosecond display, most people won't > > know about it because they don't care about nanoseconds. They > > might care when they notice---as you did---that the sort order > > isn't what they expected. > > At the moment in FreeBSD the nanoseconds field is always zero, > unless you twiddle vfs.timestamp_precision, so it would make no > difference to joe user. For people that do set vfs.timestamp_precision, > it would be nice if ls did the right thing (for example, test already > compares the nanoseconds field, after someone submitted a PR because > it didn't). I've asked the -standards people whether POSIX says anything about ls and nanoseconds. My research didn't turn up anything, but I'll let them have the final word. Given that our ls has ignored nanos for at least the last 10 years, and that it would make difference to 99% of users if it did, I don't think this is a major issue. I'm tempted to just commit the existing patch as it is, to fix the original bug, then talk about sorting on nanos, and maybe adding a new option to display them. > > Is the point of sorting on nanoseconds to totally order the files > > based on modification time? > > Depending on the clock resolution (which is partially determined > by vfs.timestamp_precision and partially determined by the actual > clock resolution), it may not be enough to totally order the files. But it (ls) would use the full resolution of the recorded timestamps to produce the displayed ordering, which is probably all you can reasonably ask of it... Scott -- =========================================================================== Scott Mitchell | PGP Key ID | "Eagles may soar, but weasels Cambridge, England | 0x54B171B9 | don't get sucked into jet engines" scott at fishballoon.org | 0xAA775B8B | -- Anon From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 20 14:00:10 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B06F916A4CE for ; Sun, 20 Jun 2004 14:00:10 +0000 (GMT) Received: from grosbein.pp.ru (grgw.svzserv.kemerovo.su [213.184.64.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D86443D49 for ; Sun, 20 Jun 2004 14:00:04 +0000 (GMT) (envelope-from eugen@grosbein.pp.ru) Received: from grosbein.pp.ru (eugen@localhost [127.0.0.1]) by grosbein.pp.ru (8.12.11/8.12.11) with ESMTP id i5KDxPpr000648 for ; Sun, 20 Jun 2004 21:59:25 +0800 (KRAST) (envelope-from eugen@grosbein.pp.ru) Received: (from eugen@localhost) by grosbein.pp.ru (8.12.11/8.12.11/Submit) id i5KDxOtR000647 for hackers@freebsd.org; Sun, 20 Jun 2004 21:59:24 +0800 (KRAST) (envelope-from eugen) Date: Sun, 20 Jun 2004 21:59:24 +0800 From: Eugene Grosbein To: hackers@freebsd.org Message-ID: <20040620135924.GA606@grosbein.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Mailman-Approved-At: Mon, 21 Jun 2004 12:01:28 +0000 Subject: writing ktrace output to serial port X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2004 14:00:10 -0000 Hi! I'm trying to debug kernel panic in 4.10-STABLE. It is 100% repeatable in my environment but this environment is very customized and it would be hard for others to reproduce it in my way (this includes non-standard build of libvgl and mplayer and his libs). So I want to see what is happening just before my mplayer crashes the kernel. The problem is that ktracing mplayer does not help as filesystem can't keep ktrace.out being written just before crash. I tried 'sync' mount, it does not help too. I decided to divert ktrace.out to /dev/cuaa0 so another FreeBSD will keep it. However, ktrace() in src/sys/kern/kern_trace.c does not permit writing to non-regular file. Why? Eugene Grosbein P.S. Please CC: me as I'm not in a list. From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 05:10:17 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F50316A4CE for ; Mon, 21 Jun 2004 05:10:17 +0000 (GMT) Received: from web53301.mail.yahoo.com (web53301.mail.yahoo.com [206.190.39.230]) by mx1.FreeBSD.org (Postfix) with SMTP id 0F2F443D53 for ; Mon, 21 Jun 2004 05:10:17 +0000 (GMT) (envelope-from non_secure@yahoo.com) Message-ID: <20040621051015.16393.qmail@web53301.mail.yahoo.com> Received: from [24.94.23.114] by web53301.mail.yahoo.com via HTTP; Sun, 20 Jun 2004 22:10:15 PDT Date: Sun, 20 Jun 2004 22:10:15 -0700 (PDT) From: Joe Schmoe To: hackers@freebsd.org MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 21 Jun 2004 12:01:28 +0000 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: crashing FreeBSD 5.2.1-RELEASE with tar (!) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 05:10:17 -0000 FreeBSD 5.2.1-RELEASE is easily crashed with tar. I have a Intel N440BX single CPU Pentium3, dual fxp0, onboard SCSI. 512M ram, and 256M swap. NO programs installed or running - just sshd. I recompiled the kernel, but I _only removed_ raid controllers and ethernet cards that I didn't need (and usb/pccard/firewire/etc.). Nothing was added to the kernel. So, all in all a very vanilla, simple, barebones system. tar up /usr into some other partition - /mnt for instance. Then untar it there: tar cvf /mnt/usr.tar /usr; cd /mnt ; tar xvf usr.tar The untar operation will never complete. The machine will always crash somewhere during the untar. In all occassions the crash is such that the machine simply reboots itself and is back up on the network in a few minutes. It is interesting to note that if I untar usr.tar in a directory in the / partition, the machine survives. It is only when untarring in another partition that the machine crashes. ALSO, the deeper you put the tar file in the non-root mount, the less of the tar file gets untarred before the crash. So if you untar it in /mnt, it gets through a fair amount of the tar file before crashing, but if you untar it in /mnt/test/test/test/test/test/test, it will crash _noticably_ sooner. What should I do next ? I cannot stress enough that this is an extremely barebones system, with very very common hardware, and a kernel that has nothing added - just superfluous things removed from it ... and I am crashing it by simply untarring a tar ball (!) thanks. --------------------------------- Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 13:30:04 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B0B116A4CE for ; Mon, 21 Jun 2004 13:30:04 +0000 (GMT) Received: from ussenterprise.ufp.org (ussenterprise.ufp.org [208.185.30.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBD6D43D41 for ; Mon, 21 Jun 2004 13:30:03 +0000 (GMT) (envelope-from bicknell@ussenterprise.ufp.org) Received: from ussenterprise.ufp.org (bicknell@localhost [127.0.0.1]) by ussenterprise.ufp.org (8.12.9/8.12.9) with ESMTP id i5LDU3tJ096733 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 21 Jun 2004 09:30:03 -0400 (EDT) Received: (from bicknell@localhost) by ussenterprise.ufp.org (8.12.9/8.12.9/Submit) id i5LDU3Uo096732 for freebsd-hackers@freebsd.org; Mon, 21 Jun 2004 09:30:03 -0400 (EDT) Date: Mon, 21 Jun 2004 09:30:03 -0400 From: Leo Bicknell To: freebsd-hackers@freebsd.org Message-ID: <20040621133003.GA96338@ussenterprise.ufp.org> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20040621054406.GA927@VARK.homeunix.com> <200406210910.aa18808@salmon.maths.tcd.ie> <20040621091649.GA92422@iconoplex.co.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline In-Reply-To: <20040621091649.GA92422@iconoplex.co.uk> Organization: United Federation of Planets X-PGP-Key: http://www.ufp.org/~bicknell/ Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 13:30:04 -0000 --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In a message written on Mon, Jun 21, 2004 at 10:16:49AM +0100, Paul Robinso= n wrote: > For what it's worth the original patch looked good to me. The nanosecond= =20 > patch is fine too. Please, no more intimate discussion of a command line= =20 I'd like to put forth a different argument why the nanosecond patch is a better patch. While I think the particular sort order (current behavior vrs non nano patch vrs nano patch) is largely unimportant, I think consistency is very important. It's quite common to do things like using diff on the output of commands like ls (indeed, I think several of the built in periodic scripts to this), and for that having a _reproduceable_ order is important. Since today, for almost all users nanos is 0 there's no impact on most of the users. For the few users where nanos isn't 0, the impact is that if we do the non-nanos patch now, and then at some point in the future add the nanos patch, at that transition old and new ls will produce different output for the nanos users. So, if we're going to alter the output and make people look at their diffs (or whatever) once with puzzlement, we should make sure it's only once. Put another way, the man page says: -t Sort by time modified (most recently modified first) before so= rt- ing the operands by lexicographical order. Since it doesn't have a resolution, if I was a nanos user and it didn't sort by nanos, I'd be a bit annoyed. Having -t work correctly is the right option. The fact that there is no way to display nanos is a separate bug. Don't let the existance of one bug prevent you =66rom fixing another one. Note, I advocate -T display nanos. Humm, I didn't want to debate command line options (as the parent suggested) but I put two in my post. Can't win 'em all. --=20 Leo Bicknell - bicknell@ufp.org - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org --vtzGhvizbBRQ85DL Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA1uLbNh6mMG5yMTYRAlazAJ9D7yfXTeO9czqfmsMVJlrj5S6f8ACfQp02 C1D6TQgm+NxSsfavMZ3aNh8= =7Vv7 -----END PGP SIGNATURE----- --vtzGhvizbBRQ85DL-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 15:29:36 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9709716A4CE for ; Mon, 21 Jun 2004 15:29:36 +0000 (GMT) Received: from mail.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A76D43D54 for ; Mon, 21 Jun 2004 15:29:36 +0000 (GMT) (envelope-from emaste@sandvine.com) Received: by mail.sandvine.com with Internet Mail Service (5.5.2657.72) id ; Mon, 21 Jun 2004 11:29:21 -0400 Message-ID: From: Ed Maste To: freebsd-hackers@freebsd.org Date: Mon, 21 Jun 2004 11:29:19 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: text/plain; charset="iso-8859-1" Subject: RE: memory mapped packet capturing - bpf replacement ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 15:29:36 -0000 Sergey Lyubka wrote: > Discussion on -current, "read vs mmap", explained this. > If userland process does pre-fault allocated memory, ng_mmq > appears to be considerably faster than pcap: Excellent! > If I connect it directly to ng_ether, the network stack stops working. > The question is - how to make it `transparent', so event the "lower" > hook is connected, mbufs are still passed to upper network > stack layers ? > Is it possible without additional copies like ng_tee/ng_hub do ? Perhaps you could have two hooks, one connected to each of the lower and upper ng_ether hooks. Then just copy the data into your ringbuffer and pass the mbuf back out the other hook? -ed From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 16:32:24 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A2B8816A4CE for ; Mon, 21 Jun 2004 16:32:24 +0000 (GMT) Received: from mail.cheapline.net (mail.cheapline.net [65.160.120.246]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80AC843D58 for ; Mon, 21 Jun 2004 16:32:24 +0000 (GMT) (envelope-from rh@matriplex.com) Received: from ts7-mail.matriplex.com (ts7-mail.matriplex.com [192.168.99.2]) by mail.cheapline.net (8.12.8p1/8.11.6) with ESMTP id i5LGWMkK087079; Mon, 21 Jun 2004 09:32:22 -0700 (PDT) (envelope-from rh@matriplex.com) Date: Mon, 21 Jun 2004 09:32:22 -0700 (PDT) From: Richard Hodges X-X-Sender: rh@mail.cheapline.net To: "Ing.Richard Andrysek" In-Reply-To: <40D2D869.8030002@riedel.net> Message-ID: <20040621092245.Q86863@mail.cheapline.net> References: <40D2D869.8030002@riedel.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org Subject: Re: SPDIF capture device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 16:32:24 -0000 On Fri, 18 Jun 2004, Ing.Richard Andrysek wrote: > Hi Richard, > > I've read your question about SPDIF capture device on freebsd. I am > currently looking for similar device.Have you found such one? Can you > access subcode etc.? Sorry, I never did find anything immediately useful for SPDIF capture. I did find a large number of false leads, though. These were mainly audio cards and chipsets that claimed to have SPDIF input, but the companies either refused to provide information or to even reply at all. Andrew Gordon had an interesting idea, to use something like this: http://www.gigatechnology.com/usbio.html If I had not solved my SPDIF problem (manufacturer documentation error), I probably would have build a capture device around some microcontroller, or maybe even a PLD connected to my host's parallel port. If you also want to capture the raw bits for testing your framing and subcodes, you may see the same kind of difficulties I had :-( Good luck! -Richard From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 16:33:08 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 29D5A16A4CE for ; Mon, 21 Jun 2004 16:33:08 +0000 (GMT) Received: from mail.gulfgate-inc.com (mail.gulfgate-inc.com [64.1.98.180]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64B5243D48 for ; Mon, 21 Jun 2004 16:33:07 +0000 (GMT) (envelope-from mpf@inodes.us) Received: (qmail 10481 invoked by uid 85); 21 Jun 2004 16:32:12 -0000 Received: from mpf@inodes.us by mail.gulfgate-inc.com by uid 89 with qmail-scanner-1.20 Clear:RC:1(192.168.0.4):. Processed in 0.041787 secs); 21 Jun 2004 16:32:12 -0000 Received: from unknown (HELO ?127.0.0.1?) (192.168.0.4) by 192.168.0.40 with SMTP; 21 Jun 2004 16:32:12 -0000 Message-ID: <40D70DC0.9030909@inodes.us> Date: Mon, 21 Jun 2004 11:33:04 -0500 From: Matt Freitag User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: dell wireless keyboard X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 16:33:08 -0000 I notice the exact same behavior with my wireless Logitechs which were purchased retail, they all appear to do this. Actually, if you notice it's always one of the previous keys your pressed, it's as if the repeat rate is somewhat delayed. This has occured in all OS's for me, regardless of tuning keyboard repeat and delay settings. -mpf Luke wrote: > >> I have recently set up FreeBSD on a Dell Inspiron 4600 and the >> wireless keyboard/mouse package that came with it has had 2 issues so >> far: >> >> --The keyboard tends to repeat letters when I type rapidly, but they >> don't repeat next to each other insead, one character apart. >> example: I type "www.freebsd.org" and what may come out on the screen >> "www.frfeebsds.como" It doesnpt always affect all the letters, and it >> seems that some, like 'a' and 'o' tend to repeat more often. > > > > I'm getting this same problem on my Dell Inspiron 8100 keyboard with > no FreeBSD and no wireless involved. > I guess that doesn't help you. I'm just saying it might be hardware. > _______________________________________________ > 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 Mon Jun 21 19:43:37 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D22E816A4CE for ; Mon, 21 Jun 2004 19:43:37 +0000 (GMT) Received: from mail006.syd.optusnet.com.au (mail006.syd.optusnet.com.au [211.29.132.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id A80AA43D2D for ; Mon, 21 Jun 2004 19:43:36 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) i5LJhIx14043; Tue, 22 Jun 2004 05:43:18 +1000 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])i5LJhIVd053061; Tue, 22 Jun 2004 05:43:18 +1000 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost)i5LJhIYg053060; Tue, 22 Jun 2004 05:43:18 +1000 (EST) (envelope-from pjeremy) Date: Tue, 22 Jun 2004 05:43:18 +1000 From: Peter Jeremy To: Joe Schmoe Message-ID: <20040621194318.GO1596@cirb503493.alcatel.com.au> References: <20040621051015.16393.qmail@web53301.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040621051015.16393.qmail@web53301.mail.yahoo.com> User-Agent: Mutt/1.4.2i cc: hackers@freebsd.org Subject: Re: crashing FreeBSD 5.2.1-RELEASE with tar (!) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 19:43:37 -0000 On Sun, 2004-Jun-20 22:10:15 -0700, Joe Schmoe wrote: >FreeBSD 5.2.1-RELEASE is easily crashed with tar. ENOUSEFULINFORMATION: Please read http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/advanced.html#KERNEL-PANIC-TROUBLESHOOTING Once you have a backtrace of your panic, please discuss your problem on freebsd-current@freebsd.org. Please wrap your text before 80 columns. Peter From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 23:32:09 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4515116A4CF for ; Mon, 21 Jun 2004 23:32:09 +0000 (GMT) Received: from VARK.homeunix.com (c-67-174-240-84.client.comcast.net [67.174.240.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id F21E943D48 for ; Mon, 21 Jun 2004 23:32:08 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.homeunix.com (localhost [127.0.0.1]) by VARK.homeunix.com (8.12.11/8.12.10) with ESMTP id i5LNVvcF001129; Mon, 21 Jun 2004 16:31:58 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.homeunix.com (8.12.11/8.12.10/Submit) id i5LNVvVB001128; Mon, 21 Jun 2004 16:31:57 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Mon, 21 Jun 2004 16:31:57 -0700 From: David Schultz To: David Malone Message-ID: <20040621233157.GA1072@VARK.homeunix.com> Mail-Followup-To: David Malone , Scott Mitchell , freebsd-hackers@FreeBSD.ORG, Dimitry Andric References: <20040621054406.GA927@VARK.homeunix.com> <200406210910.aa18808@salmon.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200406210910.aa18808@salmon.maths.tcd.ie> cc: freebsd-hackers@FreeBSD.ORG cc: Dimitry Andric cc: Scott Mitchell Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 23:32:09 -0000 On Mon, Jun 21, 2004, David Malone wrote: > > Sorting on nanoseconds too is likely to be more confusing than > > useful. Even if we use one of the precious few option letters ls > > doesn't use already to add a nanosecond display, most people won't > > know about it because they don't care about nanoseconds. They > > might care when they notice---as you did---that the sort order > > isn't what they expected. > > At the moment in FreeBSD the nanoseconds field is always zero, > unless you twiddle vfs.timestamp_precision, so it would make no > difference to joe user. For people that do set vfs.timestamp_precision, > it would be nice if ls did the right thing (for example, test already > compares the nanoseconds field, after someone submitted a PR because > it didn't). > > > Is the point of sorting on nanoseconds to totally order the files > > based on modification time? > > Depending on the clock resolution (which is partially determined > by vfs.timestamp_precision and partially determined by the actual > clock resolution), it may not be enough to totally order the files. Yep, that was going to be my next point. I don't think this is particularly useful, or necessarily even a good idea, but AFAIK POSIX doesn't say anything about using a consistent timer resolution when processing file timestamps, so don't let that stop you... Now let's re-raise the *original* bikeshed of adding nanosecond support to sleep! From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 00:48:54 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DDD9016A4CE for ; Tue, 22 Jun 2004 00:48:54 +0000 (GMT) Received: from felix.gbch.net (gw.gbch.net [203.143.238.93]) by mx1.FreeBSD.org (Postfix) with SMTP id 0346E43D2D for ; Tue, 22 Jun 2004 00:48:52 +0000 (GMT) (envelope-from gjb@gbch.net) Received: (qmail 51082 invoked by uid 1001); 22 Jun 2004 10:48:50 +1000 Message-ID: Date: Tue, 22 Jun 2004 10:48:50 +1000 From: Greg Black To: freebsd-hackers@freebsd.org References: <20040621054406.GA927@VARK.homeunix.com> <200406210910.aa18808@salmon.maths.tcd.ie> <20040621091649.GA92422@iconoplex.co.uk> <20040621133003.GA96338@ussenterprise.ufp.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="O98KdSgI27dgYlM5" Content-Disposition: inline In-Reply-To: <20040621133003.GA96338@ussenterprise.ufp.org> User-Agent: Mutt/1.4.2.1i; gjb-muttsend.sh 1.5 2003-10-01 X-Uptime: 62 days X-Operating-System: FreeBSD 4.8-RELEASE i386 X-Location: Brisbane, Australia; 27.49841S 152.98439E X-URL: http://www.gbch.net/gjb.html X-Blog: http://www.gbch.net/gjb/blog/ X-Image-URL: http://www.gbch.net/gjb/gjb-auug048.gif X-PGP-Key-Fingerprint: EBB2 2A92 A79D 1533 AC00 3C46 5D83 B6FB 4B04 B7D6 X-Request-PGP: http://www.gbch.net/keys/4B04B7D6.asc Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 00:48:55 -0000 --O98KdSgI27dgYlM5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2004-06-21, Leo Bicknell wrote: > While I think the particular sort order (current behavior vrs non > nano patch vrs nano patch) is largely unimportant, I think consistency > is very important. It's quite common to do things like using diff > on the output of commands like ls (indeed, I think several of the > built in periodic scripts to this), and for that having a _reproduceable_ > order is important. The output of ls has never been good for reproduceable output for identical data. It frequently leads to gigantic "diffs" in periodic reports which makes them useless, as far as I can tell. Take the following case: $ mkdir foo $ touch foo/a [1] $ ls -l foo total 0 -rw-r--r-- 1 gjb gjb 0 Jun 22 10:25 a $ touch foo/b =20 [2] $ ls -l foo total 0 -rw-r--r-- 1 gjb gjb 0 Jun 22 10:25 a -rw-r--r-- 1 gjb gjb 0 Jun 22 10:26 b $ sudo chown nobody foo/a [3] $ ls -l foo total 0 -rw-r--r-- 1 nobody gjb 0 Jun 22 10:25 a -rw-r--r-- 1 gjb gjb 0 Jun 22 10:26 b If we diff the output of ls[1] and ls[2], we'll get a useful answer that shows us that "b" was added. But if we diff ls[2] and ls[3], it will appear as though every entry has changed, although only "b" has. When this happens in big directories, the consequences are astonishingly bad. What we need is a canonical output form for this kind of use that can be fed to a custom diff that can operate on individual fields. Oh, but wait, we can do it anyway using standard tools. Maybe somebody could fix the periodic scripts instead of continuing the ls bikeshed: [4] $ ls -l foo | tr -s ' ' total 0 -rw-r--r-- 1 gjb gjb 0 Jun 22 10:25 a -rw-r--r-- 1 gjb gjb 0 Jun 22 10:26 b $ sudo chown nobody foo/a [5] $ ls -l foo | tr -s ' ' total 0 -rw-r--r-- 1 nobody gjb 0 Jun 22 10:25 a -rw-r--r-- 1 gjb gjb 0 Jun 22 10:26 b The output of ls[4] is in our canonical format, i.e., with one space between fields; when diff'd against the output of ls[5], only the single changed file will show up. Great, this is useful output. Cheers, Greg --O98KdSgI27dgYlM5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) Comment: See http://www.gbch.net/keys.html for my public keys iD8DBQFA14HyXYO2+0sEt9YRAkimAJ9qDTmhrBhHsOrSIJ+8ADwHgUAyawCg1S/F r97jcxeoDrx3FZWXuxbA21s= =WrxQ -----END PGP SIGNATURE----- --O98KdSgI27dgYlM5-- From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 01:01:55 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 95BB816A4CE for ; Tue, 22 Jun 2004 01:01:55 +0000 (GMT) Received: from smtp3.server.rpi.edu (smtp3.server.rpi.edu [128.113.2.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E02C43D49 for ; Tue, 22 Jun 2004 01:01:55 +0000 (GMT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp3.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i5M11sF4018449; Mon, 21 Jun 2004 21:01:54 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: References: <20040621054406.GA927@VARK.homeunix.com> <200406210910.aa18808@salmon.maths.tcd.ie> <20040621091649.GA92422@iconoplex.co.uk> <20040621133003.GA96338@ussenterprise.ufp.org> Date: Mon, 21 Jun 2004 21:01:53 -0400 To: Greg Black , freebsd-hackers@freebsd.org From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: CanIt (www . canit . ca) Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 01:01:55 -0000 At 10:48 AM +1000 6/22/04, Greg Black wrote: > >The output of ls has never been good for reproduceable output >for identical data. It frequently leads to gigantic "diffs" >in periodic reports which makes them useless, as far as I can >tell. Take the following case: Hmm. I never thought much about that before. Perhaps we should use the output from the `stat' command for all of these tests in the periodic scripts. That way we could pick an exact format. Or maybe those scripts should take advantage of: LS_COLWIDTHS: If this variable is set, it is considered to be a colon- delimited list of minimum column widths. Unreasonable and insufficient widths are ignored (thus zero signifies a dynamically sized column). Not all columns have changeable widths. The fields are, in order: inode, block count, number of links, user name, group name, flags, file size, file name. Those might make the periodic checks more useful. Which scripts have this problem? In a very quick check, I only noticed an `ls' command in security/100.chksetuid. Anything else? Note that I am not volunteering to do the work, though... -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 01:01:58 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C531716A4D3; Tue, 22 Jun 2004 01:01:58 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B188F43D1D; Tue, 22 Jun 2004 01:01:57 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id i5M11qdq043359; Tue, 22 Jun 2004 10:31:52 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Tue, 22 Jun 2004 10:31:51 +0930 User-Agent: KMail/1.6.2 References: <20040620135924.GA606@grosbein.pp.ru> In-Reply-To: <20040620135924.GA606@grosbein.pp.ru> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200406221031.51655.doconnor@gsoft.com.au> X-Spam-Score: -4.9 () CARRIAGE_RETURNS,IN_REP_TO,PGP_SIGNATURE,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_02_03,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: hackers@freebsd.org cc: Eugene Grosbein Subject: Re: writing ktrace output to serial port X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 01:01:58 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sun, 20 Jun 2004 23:29, Eugene Grosbein wrote: > So I want to see what is happening just before my mplayer crashes the > kernel. The problem is that ktracing mplayer does not help as filesystem > can't keep ktrace.out being written just before crash. I tried 'sync' > mount, > it does not help too. > > I decided to divert ktrace.out to /dev/cuaa0 so another FreeBSD will keep > it. However, ktrace() in src/sys/kern/kern_trace.c does not permit writing > to non-regular file. Why? The actual syscall passes a filename, not a file descriptor so you'd have t= o=20 change that (or make a new syscall) if you wanted to change it at all :( It would be nice to be able to ktrace() to an fd (eg socket or pipe) though= :) See ktrace() in /usr/src/sys/kern/kern_ktrace.c:494 As for your problem.. Can you NFS mount? If you have no ethernet you could NFS mount over=20 PPP/SLIP :) (or PLIP if you have a parallel port) =2D --=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA14T/5ZPcIHs/zowRAhaIAJ9oHNNtZ+XHgZpjKIt+cBSV1pyvLACgrG5q Qxd19+DAEB6xAcph0rSZ5KI=3D =3DWl8n =2D----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 01:01:58 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C531716A4D3; Tue, 22 Jun 2004 01:01:58 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id B188F43D1D; Tue, 22 Jun 2004 01:01:57 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id i5M11qdq043359; Tue, 22 Jun 2004 10:31:52 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Tue, 22 Jun 2004 10:31:51 +0930 User-Agent: KMail/1.6.2 References: <20040620135924.GA606@grosbein.pp.ru> In-Reply-To: <20040620135924.GA606@grosbein.pp.ru> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200406221031.51655.doconnor@gsoft.com.au> X-Spam-Score: -4.9 () CARRIAGE_RETURNS,IN_REP_TO,PGP_SIGNATURE,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_02_03,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: hackers@freebsd.org cc: Eugene Grosbein Subject: Re: writing ktrace output to serial port X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 01:01:59 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sun, 20 Jun 2004 23:29, Eugene Grosbein wrote: > So I want to see what is happening just before my mplayer crashes the > kernel. The problem is that ktracing mplayer does not help as filesystem > can't keep ktrace.out being written just before crash. I tried 'sync' > mount, > it does not help too. > > I decided to divert ktrace.out to /dev/cuaa0 so another FreeBSD will keep > it. However, ktrace() in src/sys/kern/kern_trace.c does not permit writing > to non-regular file. Why? The actual syscall passes a filename, not a file descriptor so you'd have t= o=20 change that (or make a new syscall) if you wanted to change it at all :( It would be nice to be able to ktrace() to an fd (eg socket or pipe) though= :) See ktrace() in /usr/src/sys/kern/kern_ktrace.c:494 As for your problem.. Can you NFS mount? If you have no ethernet you could NFS mount over=20 PPP/SLIP :) (or PLIP if you have a parallel port) =2D --=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA14T/5ZPcIHs/zowRAhaIAJ9oHNNtZ+XHgZpjKIt+cBSV1pyvLACgrG5q Qxd19+DAEB6xAcph0rSZ5KI=3D =3DWl8n =2D----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 01:29:54 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A07F16A4CE; Tue, 22 Jun 2004 01:29:54 +0000 (GMT) Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98D2643D46; Tue, 22 Jun 2004 01:29:51 +0000 (GMT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (sccrmhc11) with ESMTP id <2004062201294201100r57dfe>; Tue, 22 Jun 2004 01:29:48 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id SAA43577; Mon, 21 Jun 2004 18:29:39 -0700 (PDT) Date: Mon, 21 Jun 2004 18:29:38 -0700 (PDT) From: Julian Elischer To: "Daniel O'Connor" In-Reply-To: <200406221031.51655.doconnor@gsoft.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org cc: hackers@freebsd.org cc: Eugene Grosbein Subject: Re: writing ktrace output to serial port X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 01:29:54 -0000 On Tue, 22 Jun 2004, Daniel O'Connor wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Sun, 20 Jun 2004 23:29, Eugene Grosbein wrote: > > So I want to see what is happening just before my mplayer crashes the > > kernel. The problem is that ktracing mplayer does not help as filesystem > > can't keep ktrace.out being written just before crash. I tried 'sync' > > mount, > > it does not help too. > > > > I decided to divert ktrace.out to /dev/cuaa0 so another FreeBSD will keep > > it. However, ktrace() in src/sys/kern/kern_trace.c does not permit writing > > to non-regular file. Why? > > The actual syscall passes a filename, not a file descriptor so you'd have to > change that (or make a new syscall) if you wanted to change it at all :( > > It would be nice to be able to ktrace() to an fd (eg socket or pipe) though :) > > See ktrace() in /usr/src/sys/kern/kern_ktrace.c:494 > > As for your problem.. > Can you NFS mount? If you have no ethernet you could NFS mount over > PPP/SLIP :) > (or PLIP if you have a parallel port) > it would be relatively easy to sent it to a netgraph ng_ksocket node and have the record sent out as a udp packet :-) From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 01:29:54 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A07F16A4CE; Tue, 22 Jun 2004 01:29:54 +0000 (GMT) Received: from sccrmhc11.comcast.net (sccrmhc11.comcast.net [204.127.202.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98D2643D46; Tue, 22 Jun 2004 01:29:51 +0000 (GMT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (sccrmhc11) with ESMTP id <2004062201294201100r57dfe>; Tue, 22 Jun 2004 01:29:48 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id SAA43577; Mon, 21 Jun 2004 18:29:39 -0700 (PDT) Date: Mon, 21 Jun 2004 18:29:38 -0700 (PDT) From: Julian Elischer To: "Daniel O'Connor" In-Reply-To: <200406221031.51655.doconnor@gsoft.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-hackers@freebsd.org cc: hackers@freebsd.org cc: Eugene Grosbein Subject: Re: writing ktrace output to serial port X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 01:29:54 -0000 On Tue, 22 Jun 2004, Daniel O'Connor wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Sun, 20 Jun 2004 23:29, Eugene Grosbein wrote: > > So I want to see what is happening just before my mplayer crashes the > > kernel. The problem is that ktracing mplayer does not help as filesystem > > can't keep ktrace.out being written just before crash. I tried 'sync' > > mount, > > it does not help too. > > > > I decided to divert ktrace.out to /dev/cuaa0 so another FreeBSD will keep > > it. However, ktrace() in src/sys/kern/kern_trace.c does not permit writing > > to non-regular file. Why? > > The actual syscall passes a filename, not a file descriptor so you'd have to > change that (or make a new syscall) if you wanted to change it at all :( > > It would be nice to be able to ktrace() to an fd (eg socket or pipe) though :) > > See ktrace() in /usr/src/sys/kern/kern_ktrace.c:494 > > As for your problem.. > Can you NFS mount? If you have no ethernet you could NFS mount over > PPP/SLIP :) > (or PLIP if you have a parallel port) > it would be relatively easy to sent it to a netgraph ng_ksocket node and have the record sent out as a udp packet :-) From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 03:37:03 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 73FAB16A4CE for ; Tue, 22 Jun 2004 03:37:03 +0000 (GMT) Received: from babyruth.hotpop.com (babyruth.hotpop.com [38.113.3.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FC1643D64 for ; Tue, 22 Jun 2004 03:37:03 +0000 (GMT) (envelope-from infamous41md@hotpop.com) Received: from hotpop.com (kubrick.hotpop.com [38.113.3.103]) by babyruth.hotpop.com (Postfix) with SMTP id 3789F630FDD for ; Tue, 22 Jun 2004 02:57:20 +0000 (UTC) Received: from localho.outernet (69.37.84.182.adsl.snet.net [69.37.84.182]) by smtp-2.hotpop.com (Postfix) with SMTP id 0CF1F629F84 for ; Tue, 22 Jun 2004 02:57:19 +0000 (UTC) Date: Mon, 21 Jun 2004 23:38:04 -0400 From: infamous41md@hotpop.com To: freebsd-hackers@freebsd.org Message-Id: <20040621233804.194deae4.infamous41md@hotpop.com> In-Reply-To: <20040619.170012.20320023.imp@bsdimp.com> References: <20040618221344.1848e9db.infamous42md@hotpop.com> <20040619.170012.20320023.imp@bsdimp.com> X-Mailer: Sylpheed version 0.9.11 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-HotPOP: ----------------------------------------------- Sent By HotPOP.com FREE Email Get your FREE POP email at www.HotPOP.com ----------------------------------------------- Subject: Re: lkm i/o port allocation problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 03:37:03 -0000 thanks much for the reply, im going to bring print this and bring it inside to my bsd box and see what happens. i'll let you know how it works out. On Sat, 19 Jun 2004 17:00:12 -0600 (MDT) "M. Warner Losh" wrote: > : /*I am trying to figure out how to port over an infrared reciever driver > : from linux to freebsd. i have been reading the developers book, as well as the > : source for sio/ep and several other char drivers that use i/o ports. i can't > : seem to get my i/o port allocation to work. whenever i request the region w/ > : bus_alloc_resource() it returns NULL to me the first time i load my module. > : however, once i try again, i get the message: > : > : ser0 at port 0x2f8-0x2ff on isa0 > > Do you have another driver at this range of ports? It is on my > machine: > > sio1 at port 0x2f8-0x2ff irq 3 on isa0 > > so you have to ensure that you don't have sio binding to this device. > You'll get bus_alloc_resource returning NULL in this case. > > : ser is the name of my module. so it seems that even tho the alloc call is > : failing, somehow i still have the region to myself??? > > I don't understand this statement at all. Just because the ISA bus > thinks your driver might have the resources, doesn't mean that your > driver actually has them. The information is there because many > devices might be at the same location (think aha and bt). > > : and now, even after i > : reboot my computer, whenever i try to load my module i immediately get the above > : error message. > > What error message. You included none in your comments. > > : so it seems that somehow, even tho it is restarted, it never lets go > : of the i/o region?? this module is not called at start time, it is > : only loaded when i give kldload command > > Maybe sio1 has claimed this device already. Maybe your system has > pnpbios/acpi listing the device? That's the usual reason... > > : my other problem is that in order to get the probe/attach functions to be > : called, i used the identify function in which i call the BUS_ADD_CHILD() > : function as i saw ep driver do. is this correct? > > No. You don't have to do this. In fact, you shouldn't generally do > this in your driver. You should either bind to the PNP ID (which gets > reprobed on every driver add), or you should add hints to the boot > loader. > > : b/c after i load my module > : once, the next time i try to load it this call always fails. > > That's because one usually doesn't need to do this :-). > > : static device_method_t ser_isa_methods[] = { > : /* Device interface */ > : DEVMETHOD(device_probe, ser_isa_probe), > : DEVMETHOD(device_attach, ser_isa_attach), > : DEVMETHOD(device_detach, ser_isa_detach), > : DEVMETHOD(device_identify, ser_isa_ident), > > You rarely need identify. In this case it is contraindicated. > > : static int ser_isa_probe(device_t dev) > : { > : uprintf("probing\n"); > : > : return 0; > : } > > Don't use uprintf. You will find that when you add the driver to the > boot process, you'll get a panic here because there's no controlling > terminal... > > : static void ser_isa_ident(driver_t *driv, device_t dev) > : { > : int ret = 0; > : device_t child; > : > : uprintf("identing\n"); > : > : child = BUS_ADD_CHILD(dev, 0, "ser", 0); > : if(child == NULL){ > : uprintf("bus add child == NULL\n"); > : return; > : } > : > : device_set_driver(child, driv); > : > : /* allocate i/o ports */ > : if( (ret = bus_set_resource(child, SYS_RES_IOPORT, 0, 0x2f8, 8)) ) > : uprintf("bus set bad, ret = %d\n", ret); > : > : } > > This isn't necessary. I'd not use it at all. > > : static int ser_isa_attach(device_t dev) > : { > : int rid; > : > : uprintf("attaching\n"); > : > : rid = 0; > : rp = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, 8, RF_ACTIVE); > : if(rp == NULL){ > : uprintf("bus alloc bad\n"); > : }else{ > : uprintf("allocated bus resources\n"); > : } > : > : return 0; > : } > > Chances are good this is failing because there's another device > already servicing the device that has this range. This may mean that > you will have to have your driver loaded at boot time so it doesn't do > that and you may also have to hack sio to return an indefinite probe > (some non-0 negative number). > > There's something called the softc. You should store store the > resource in the softc for the driver, not in a global. > > : static int ser_isa_detach(device_t dev) > : { > : /* give back i/o region */ > : if(rp){ > : if(bus_release_resource(dev, SYS_RES_IOPORT, 0, rp) == 0) > : uprintf("releasd resources\n"); > : else > : uprintf("error releasein\n"); > : } > : > : uprintf("detached\n"); > : return 0; > : } > > > Apart from the uprintf and sotfc comments above, there's nothign > really wrong here. > > : /* > : * Load handler that deals with the loading and unloading of a KLD. > : */ > : static int > : mdev_loader(struct module * m, int what, void *arg) > : { > : int err = 0; > : > : switch (what) { > : case MOD_LOAD: /* kldload */ > : break; > : case MOD_UNLOAD: > : break; > : default: > : err = EINVAL; > : break; > : } > : return (err); > : } > > You don't need this at all. In fact, it may be causing you problems. > Delete it. > > : DRIVER_MODULE(ser, isa, ser_isa_driver, ser_devclass, mdev_loader, 0); > _______________________________________________ > 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" -- -sean From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 03:59:39 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 402BC16A4CE for ; Tue, 22 Jun 2004 03:59:39 +0000 (GMT) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA4E843D5A for ; Tue, 22 Jun 2004 03:59:37 +0000 (GMT) (envelope-from eugen@grosbein.pp.ru) Received: from grosbein.pp.ru (kost [213.184.65.82])i5M3xZ0h023263 for ; Tue, 22 Jun 2004 11:59:36 +0800 (KRAST) (envelope-from eugen@grosbein.pp.ru) Message-ID: <40D7AE92.46DC29F0@grosbein.pp.ru> Date: Tue, 22 Jun 2004 11:59:14 +0800 From: Eugene Grosbein Organization: SVZServ X-Mailer: Mozilla 4.8 [en] (Win98; U) X-Accept-Language: ru,en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Subject: Re: writing ktrace output to serial port X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 03:59:39 -0000 Julian Elischer wrote: > > > I decided to divert ktrace.out to /dev/cuaa0 so another FreeBSD will keep > > > it. However, ktrace() in src/sys/kern/kern_trace.c does not permit writing > > > to non-regular file. Why? > > As for your problem.. > > Can you NFS mount? If you have no ethernet you could NFS mount over > > PPP/SLIP :) > > (or PLIP if you have a parallel port) > > > > it would be relatively easy to sent it to a netgraph ng_ksocket node and > have the record sent out as a udp packet :-) Thank you, people, for your time. But my question was not how to solve my problem. (I do no rely on NFS when sender system is going to crash and is not so familiar with netgraph.) I just removed check from kernel source and now ktrace successfully writes to /dev/cuaa0 in test cases (I've not tried to reproduce the crash yet). So the question is: why is the check for regilar file there? Eugene From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 05:40:01 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0173D16A4CE for ; Tue, 22 Jun 2004 05:40:01 +0000 (GMT) Received: from TRANG.nuxi.com (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id CCE6D43D46 for ; Tue, 22 Jun 2004 05:40:00 +0000 (GMT) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by TRANG.nuxi.com (8.12.11/8.12.11) with ESMTP id i5M5ds0t020169; Mon, 21 Jun 2004 22:39:54 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.11/8.12.11/Submit) id i5M5drxC020168; Mon, 21 Jun 2004 22:39:53 -0700 (PDT) (envelope-from obrien) Date: Mon, 21 Jun 2004 22:39:53 -0700 From: "David O'Brien" To: Paul Robinson Message-ID: <20040622053953.GA19677@dragon.nuxi.com> References: <20040621054406.GA927@VARK.homeunix.com> <200406210910.aa18808@salmon.maths.tcd.ie> <20040621091649.GA92422@iconoplex.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040621091649.GA92422@iconoplex.co.uk> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 5.2-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 cc: freebsd-hackers@FreeBSD.ORG Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 05:40:01 -0000 On Mon, Jun 21, 2004 at 10:16:49AM +0100, Paul Robinson wrote: > Hate to be the party-pooper, but this thread is starting to smell a bit odd. > The smell reminds me of something... when I was a kid at school... during > the break.... ahh, that's it. This thing smells like a bikeshed. :-) Uh, Paul, Let me introduce you to that key on your keyboard between the 'S' and 'F' keys. Its the 'D' key. Amoung its other good uses (like being used twice in "David") is that most MUA's use it to delete emails and threads you don't care to participate in. > For what it's worth the original patch looked good to me. The nanosecond > patch is fine too. Please, no more intimate discussion of a command line > flag that few people use, and if it doesn't work correctly now could have > been worked around with a pipe to sort. I use -t *all* the time with I do a long listing (ie, -l). I know I'm not alone in knowing the "-t" option to 'ls' exists. -- -- David (obrien@FreeBSD.org) From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 07:15:14 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BE0016A4CE for ; Tue, 22 Jun 2004 07:15:14 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD01A43D4C for ; Tue, 22 Jun 2004 07:15:13 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id C8AD4530D; Tue, 22 Jun 2004 09:15:09 +0200 (CEST) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id 6A74C530A; Tue, 22 Jun 2004 09:15:01 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 2602) id 3A832B86C; Tue, 22 Jun 2004 09:15:01 +0200 (CEST) To: Clifton Royston References: <20040617205549.GA19254@lava.net> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Tue, 22 Jun 2004 09:15:01 +0200 In-Reply-To: <20040617205549.GA19254@lava.net> (Clifton Royston's message of "Thu, 17 Jun 2004 10:55:49 -1000") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on flood.des.no X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=no version=2.63 cc: hackers@freebsd.org Subject: Re: Sticky/sgid/suid bits safe on regular files? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 07:15:14 -0000 Clifton Royston writes: > I need to add a feature to an application where it can keep tabs on > whether one specific action has ever been taken on any given file, one > of possibly hundreds of thousands of a dynamically changing file set. man extattr DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 07:29:48 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40FBD16A4CE; Tue, 22 Jun 2004 07:29:48 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3B1F43D48; Tue, 22 Jun 2004 07:29:46 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id i5M7TWJG052167; Tue, 22 Jun 2004 16:59:32 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Tue, 22 Jun 2004 16:59:31 +0930 User-Agent: KMail/1.6.2 References: <20040617205549.GA19254@lava.net> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200406221659.31501.doconnor@gsoft.com.au> X-Spam-Score: -4.9 () CARRIAGE_RETURNS,IN_REP_TO,PGP_SIGNATURE,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= cc: hackers@freebsd.org cc: Clifton Royston Subject: Re: Sticky/sgid/suid bits safe on regular files? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 07:29:48 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 22 Jun 2004 16:45, Dag-Erling Sm=F8rgrav wrote: > Clifton Royston writes: > > I need to add a feature to an application where it can keep tabs on > > whether one specific action has ever been taken on any given file, one > > of possibly hundreds of thousands of a dynamically changing file set. > > man extattr I think he wanted to use sticky/sgid/suid because they get removed when the= =20 file is changed so the application can go back and see if they've been=20 changed. That doesn't happen to attributes. Also, I don't think attributes work over NFS(?) =2D --=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA19/b5ZPcIHs/zowRAu6YAKCLvYy9Ozy0flatbqdd11xA7YLDOwCgqtcD /JdlWxeXWPxnd3qaTU6pb9A=3D =3DsH9/ =2D----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 07:29:48 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40FBD16A4CE; Tue, 22 Jun 2004 07:29:48 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3B1F43D48; Tue, 22 Jun 2004 07:29:46 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id i5M7TWJG052167; Tue, 22 Jun 2004 16:59:32 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Tue, 22 Jun 2004 16:59:31 +0930 User-Agent: KMail/1.6.2 References: <20040617205549.GA19254@lava.net> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200406221659.31501.doconnor@gsoft.com.au> X-Spam-Score: -4.9 () CARRIAGE_RETURNS,IN_REP_TO,PGP_SIGNATURE,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= cc: hackers@freebsd.org cc: Clifton Royston Subject: Re: Sticky/sgid/suid bits safe on regular files? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 07:29:48 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 22 Jun 2004 16:45, Dag-Erling Sm=F8rgrav wrote: > Clifton Royston writes: > > I need to add a feature to an application where it can keep tabs on > > whether one specific action has ever been taken on any given file, one > > of possibly hundreds of thousands of a dynamically changing file set. > > man extattr I think he wanted to use sticky/sgid/suid because they get removed when the= =20 file is changed so the application can go back and see if they've been=20 changed. That doesn't happen to attributes. Also, I don't think attributes work over NFS(?) =2D --=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA19/b5ZPcIHs/zowRAu6YAKCLvYy9Ozy0flatbqdd11xA7YLDOwCgqtcD /JdlWxeXWPxnd3qaTU6pb9A=3D =3DsH9/ =2D----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 08:09:22 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DA4B16A4CE; Tue, 22 Jun 2004 08:09:22 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4405543D2F; Tue, 22 Jun 2004 08:09:22 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 3DCEB530D; Tue, 22 Jun 2004 10:08:59 +0200 (CEST) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id A1A1E530A; Tue, 22 Jun 2004 10:08:52 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 2602) id 8323AB86C; Tue, 22 Jun 2004 10:08:52 +0200 (CEST) To: "Daniel O'Connor" References: <20040617205549.GA19254@lava.net> <200406221659.31501.doconnor@gsoft.com.au> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Tue, 22 Jun 2004 10:08:52 +0200 In-Reply-To: <200406221659.31501.doconnor@gsoft.com.au> (Daniel O'Connor's message of "Tue, 22 Jun 2004 16:59:31 +0930") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on flood.des.no X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=no version=2.63 cc: freebsd-hackers@freebsd.org cc: hackers@freebsd.org cc: Clifton Royston Subject: Re: Sticky/sgid/suid bits safe on regular files? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 08:09:22 -0000 "Daniel O'Connor" writes: > I think he wanted to use sticky/sgid/suid because they get removed when t= he > file is changed no they don't. > so the application can go back and see if they've been > changed. That doesn't happen to attributes. > > Also, I don't think attributes work over NFS(?) they should, at least with v4. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 08:09:22 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7DA4B16A4CE; Tue, 22 Jun 2004 08:09:22 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4405543D2F; Tue, 22 Jun 2004 08:09:22 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 3DCEB530D; Tue, 22 Jun 2004 10:08:59 +0200 (CEST) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id A1A1E530A; Tue, 22 Jun 2004 10:08:52 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 2602) id 8323AB86C; Tue, 22 Jun 2004 10:08:52 +0200 (CEST) To: "Daniel O'Connor" References: <20040617205549.GA19254@lava.net> <200406221659.31501.doconnor@gsoft.com.au> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Tue, 22 Jun 2004 10:08:52 +0200 In-Reply-To: <200406221659.31501.doconnor@gsoft.com.au> (Daniel O'Connor's message of "Tue, 22 Jun 2004 16:59:31 +0930") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on flood.des.no X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=no version=2.63 cc: freebsd-hackers@freebsd.org cc: hackers@freebsd.org cc: Clifton Royston Subject: Re: Sticky/sgid/suid bits safe on regular files? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 08:09:22 -0000 "Daniel O'Connor" writes: > I think he wanted to use sticky/sgid/suid because they get removed when t= he > file is changed no they don't. > so the application can go back and see if they've been > changed. That doesn't happen to attributes. > > Also, I don't think attributes work over NFS(?) they should, at least with v4. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 08:12:21 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C43616A4CE; Tue, 22 Jun 2004 08:12:21 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B34243D1F; Tue, 22 Jun 2004 08:12:17 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id i5M8Bm9L053563; Tue, 22 Jun 2004 17:41:48 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=) Date: Tue, 22 Jun 2004 17:41:48 +0930 User-Agent: KMail/1.6.2 References: <20040617205549.GA19254@lava.net> <200406221659.31501.doconnor@gsoft.com.au> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200406221741.48309.doconnor@gsoft.com.au> X-Spam-Score: -4.1 () CARRIAGE_RETURNS,IN_REP_TO,PGP_SIGNATURE,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: freebsd-hackers@freebsd.org cc: hackers@freebsd.org cc: Clifton Royston Subject: Re: Sticky/sgid/suid bits safe on regular files? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 08:12:21 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 22 Jun 2004 17:38, Dag-Erling Sm=F8rgrav wrote: > "Daniel O'Connor" writes: > > I think he wanted to use sticky/sgid/suid because they get removed when > > the file is changed > > no they don't. Oops, guess I'm used to using vi which does move/unlink - sorry! > > so the application can go back and see if they've been > > changed. That doesn't happen to attributes. > > > > Also, I don't think attributes work over NFS(?) > > they should, at least with v4. Ahh neat :) =2D --=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA1+nE5ZPcIHs/zowRArgLAJ9G1O5G3m7yhUdhPNJ+9akvIPQrawCcDEok dtSRkR0D9sDR2xVqosxUA6Q=3D =3D45iX =2D----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 08:12:21 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C43616A4CE; Tue, 22 Jun 2004 08:12:21 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B34243D1F; Tue, 22 Jun 2004 08:12:17 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id i5M8Bm9L053563; Tue, 22 Jun 2004 17:41:48 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=) Date: Tue, 22 Jun 2004 17:41:48 +0930 User-Agent: KMail/1.6.2 References: <20040617205549.GA19254@lava.net> <200406221659.31501.doconnor@gsoft.com.au> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Message-Id: <200406221741.48309.doconnor@gsoft.com.au> X-Spam-Score: -4.1 () CARRIAGE_RETURNS,IN_REP_TO,PGP_SIGNATURE,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: freebsd-hackers@freebsd.org cc: hackers@freebsd.org cc: Clifton Royston Subject: Re: Sticky/sgid/suid bits safe on regular files? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 08:12:21 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 22 Jun 2004 17:38, Dag-Erling Sm=F8rgrav wrote: > "Daniel O'Connor" writes: > > I think he wanted to use sticky/sgid/suid because they get removed when > > the file is changed > > no they don't. Oops, guess I'm used to using vi which does move/unlink - sorry! > > so the application can go back and see if they've been > > changed. That doesn't happen to attributes. > > > > Also, I don't think attributes work over NFS(?) > > they should, at least with v4. Ahh neat :) =2D --=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFA1+nE5ZPcIHs/zowRArgLAJ9G1O5G3m7yhUdhPNJ+9akvIPQrawCcDEok dtSRkR0D9sDR2xVqosxUA6Q=3D =3D45iX =2D----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 09:15:53 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF03B16A4CE for ; Tue, 22 Jun 2004 09:15:53 +0000 (GMT) Received: from faceman.servitor.co.uk (faceman.servitor.co.uk [80.71.15.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FBA643D48 for ; Tue, 22 Jun 2004 09:15:53 +0000 (GMT) (envelope-from wiggy@servitor.co.uk) Received: from wiggy by faceman.servitor.co.uk with local (Exim 4.30) id 1BchNg-000Aue-Mu for freebsd-hackers@FreeBSD.ORG; Tue, 22 Jun 2004 10:15:52 +0100 Date: Tue, 22 Jun 2004 10:15:52 +0100 From: Paul Robinson To: freebsd-hackers@FreeBSD.ORG Message-ID: <20040622091552.GD25838@iconoplex.co.uk> References: <20040621054406.GA927@VARK.homeunix.com> <200406210910.aa18808@salmon.maths.tcd.ie> <20040621091649.GA92422@iconoplex.co.uk> <20040622053953.GA19677@dragon.nuxi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040622053953.GA19677@dragon.nuxi.com> Sender: Paul Robinson Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 09:15:53 -0000 On Mon, Jun 21, 2004 at 10:39:53PM -0700, David O'Brien wrote: > Let me introduce you to that key on your keyboard between the 'S' and 'F' > keys. Its the 'D' key. Amoung its other good uses (like being used > twice in "David") is that most MUA's use it to delete emails and threads > you don't care to participate in. OK, well, if we're going to carry on being generally facetious then I could point out you could have deleted my e-mail instead of answering it. So, please, don't start dictating to me about deleting e-mail instead of replying to it as it just makes you look very stupid. This thread is about a small patch to ls. Note how it has generated more traffic than any other subject on -hackers in the last 30 days. Note that nearly all the e-mails do not contribute anything more than "I think it's a good idea"/"I think it's a bad idea" with some vague assertions about how ls has been 'broken' for the last 10 years with nobody really noticing much or about adding functionality that nobody has asked for to date and risks breaking lots of scripts that currently use ls. Now tell me this is not one huge bikeshed THAT SHOULD DIE. > I use -t *all* the time with I do a long listing (ie, -l). I know I'm > not alone in knowing the "-t" option to 'ls' exists. Being aware of it's existence does not mean that you find the output of the -t command to break in cases where you are dealing with hard links. Are you saying the output is broken for you? Are you saying that you've never been able to work around that without a pipe to sort? Or are you just contributing further to this thread because you think people want to hear all about you and what you think? I have some news which may come as a suprise to you... Either commit the patch, or don't commit the patch. All I'm saying is that it might now be time to stop bikeshedding. This is, quite frankly, bordering on the ridiculous. -- Paul Robinson http://www.iconoplex.co.uk/ From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 12:30:58 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C92F116A4CE; Mon, 21 Jun 2004 12:30:58 +0000 (GMT) Received: from smarthost.enta.net (smarthost.enta.net [195.74.97.231]) by mx1.FreeBSD.org (Postfix) with ESMTP id 868EE43D1F; Mon, 21 Jun 2004 12:30:58 +0000 (GMT) (envelope-from jacs@gnome.co.uk) Received: from smartsmtp.enta.net (smtp.enta.net [195.74.97.230]) by smarthost.enta.net (Postfix) with ESMTP id 8240F17DB; Mon, 21 Jun 2004 13:34:20 +0100 (BST) Received: from smtp.enta.net (localhost [127.0.0.1]) by smartsmtp.enta.net (8.12.3/8.12.3) with ESMTP id i5LCmNl9089013; Mon, 21 Jun 2004 13:48:24 +0100 (BST) (envelope-from jacs@gnome.co.uk) Received: from hawk.gnome.co.uk (81-31-113-153.adsl.entanet.co.uk [81.31.113.153]) by smtp.enta.net (Postfix) with SMTP id 399B89681E; Mon, 21 Jun 2004 13:48:23 +0100 (BST) Received: from kite (kite.gnome.co.uk [192.168.123.75]) by hawk.gnome.co.uk (8.12.10/8.12.10) with SMTP id i5LCUht1005584; Mon, 21 Jun 2004 13:30:43 +0100 (BST) (envelope-from jacs@gnome.co.uk) Message-ID: <011f01c4578b$923d7b70$4b7ba8c0@gnome.co.uk> From: "Chris Stenton" To: Date: Mon, 21 Jun 2004 13:30:43 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Scanned-By: MIMEDefang 2.43 X-Mailman-Approved-At: Tue, 22 Jun 2004 12:08:49 +0000 cc: hackers@freebsd.org Subject: pthread - fork - execv problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 12:30:59 -0000 I am trying to help port over an app thats posix threaded. One thread uses fork,dup2 and execv to start a child programme in this case an mp3 player. However, under FreeBSD-5.2.1, the execv causes all the threads in the parent process to be blocked until the child process returns. Is there a mechanism to get around this. Thanks Chris From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 12:36:24 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A39DD16A4CE for ; Mon, 21 Jun 2004 12:36:24 +0000 (GMT) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id E548A43D39 for ; Mon, 21 Jun 2004 12:36:23 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (gbshkj@localhost [127.0.0.1]) by lurza.secnetix.de (8.12.11/8.12.11) with ESMTP id i5LCZowO060152 for ; Mon, 21 Jun 2004 14:35:50 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.12.11/8.12.11/Submit) id i5LCZo3Y060151; Mon, 21 Jun 2004 14:35:50 +0200 (CEST) (envelope-from olli) Date: Mon, 21 Jun 2004 14:35:50 +0200 (CEST) Message-Id: <200406211235.i5LCZo3Y060151@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG In-Reply-To: <20040621061652.GA96079@lucky.net> X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.10-RELEASE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Tue, 22 Jun 2004 12:08:49 +0000 Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 12:36:24 -0000 Valentin Nechayev wrote: > Sun, Jun 20, 2004 at 02:34:04, andrit wrote about "Re: /bin/ls sorting bug?": > > But there is nice sort command and power of unix. > > Don't you remember the initial UNIX concept to make miracles by small > > things fired together? :) > > Well, let's disable sorting in ls output totally and give this role to sort. > I thinks folks won't adopt this idea, especially said that ls output > isn't easily machine-parseable. That's why I've always wanted an ls flag to output the time stamp in time_t form (i.e. seconds since the epoch). Would make a lot of scripts a lot easier. (Yes, I know we've got "/usr/bin/stat -r", but that's not portable.) Regards Oliver PS: Don't get me wrong; I'm _not_ asking for such a flag to ls, as it wouldn't help for portable scripts. PPS: FWIW, I like the patch (the second one which takes nanoseconds correctly into account). I would also suggest an option to display the nanoseconds in ls -l output. Maybe when -T is specified twice ...? (That way we wouldn't waste yet another letter.) -- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "FreeBSD is Yoda, Linux is Luke Skywalker" -- Daniel C. Sobral From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 17:15:46 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C398C16A4CE for ; Mon, 21 Jun 2004 17:15:46 +0000 (GMT) Received: from meketrex.pix.net (meketrex.pix.net [192.111.45.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B15143D58 for ; Mon, 21 Jun 2004 17:15:46 +0000 (GMT) (envelope-from lidl@meketrex.pix.net) Received: (from lidl@localhost) by meketrex.pix.net (8.11.6/8.11.6) id i5LHFcF14819; Mon, 21 Jun 2004 13:15:38 -0400 (EDT) Date: Mon, 21 Jun 2004 13:15:37 -0400 From: "Kurt J. Lidl" To: Cyrille Lefevre Message-ID: <20040621131537.D9593@pix.net> References: <20040617205549.GA19254@lava.net> <070301c454c4$8f17ee90$7890a8c0@dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <070301c454c4$8f17ee90$7890a8c0@dyndns.org>; from clefevre-lists@9online.fr on Fri, Jun 18, 2004 at 01:41:05AM +0200 X-Mailman-Approved-At: Tue, 22 Jun 2004 12:08:49 +0000 cc: hackers@freebsd.org cc: Clifton Royston Subject: Re: Sticky/sgid/suid bits safe on regular files? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2004 17:15:46 -0000 On Fri, Jun 18, 2004 at 01:41:05AM +0200, Cyrille Lefevre wrote: > "Clifton Royston" wrote: > [snip] > > Can anybody confirm for me that the suid, sgid, and sticky bit are in > > fact no-ops for FreeBSD on regular non-executable files, as it appears > > they should be? > > how about the use of hard link which is not os depedent ? Then you have twice as many directory entries for the system to manage, which might be a resource hog if you have many files. -Kurt From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 08:19:10 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 26AB816A4CE for ; Tue, 22 Jun 2004 08:19:10 +0000 (GMT) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 618FA43D53 for ; Tue, 22 Jun 2004 08:19:09 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (bshkjo@localhost [127.0.0.1]) by lurza.secnetix.de (8.12.11/8.12.11) with ESMTP id i5M8Ilej005195; Tue, 22 Jun 2004 10:18:47 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.12.11/8.12.11/Submit) id i5M8IkEV005194; Tue, 22 Jun 2004 10:18:46 +0200 (CEST) (envelope-from olli) Date: Tue, 22 Jun 2004 10:18:46 +0200 (CEST) Message-Id: <200406220818.i5M8IkEV005194@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, gjb@gbch.net In-Reply-To: X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.10-RELEASE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Tue, 22 Jun 2004 12:08:49 +0000 Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 08:19:10 -0000 Greg Black wrote: > On 2004-06-21, Leo Bicknell wrote: > > While I think the particular sort order (current behavior vrs non > > nano patch vrs nano patch) is largely unimportant, I think consistency > > is very important. It's quite common to do things like using diff > > on the output of commands like ls (indeed, I think several of the > > built in periodic scripts to this), and for that having a _reproduceable_ > > order is important. > > The output of ls has never been good for reproduceable output > for identical data. It frequently leads to gigantic "diffs" in > periodic reports which makes them useless, as far as I can > tell. Take the following case: > [...] > What we need is a canonical output form for this kind of use > that can be fed to a custom diff that can operate on individual > fields. I always use "diff -Bb" for things like that, i.e. to ignore any changes in whitespace. Works perfectly fine. Maybe someone should just add "-b" to the diff command in those periodic scripts? Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "I started using PostgreSQL around a month ago, and the feeling is similar to the switch from Linux to FreeBSD in '96 -- 'wow!'." -- Oddbjorn Steffensen From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 12:17:36 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA91E16A4CE for ; Tue, 22 Jun 2004 12:17:36 +0000 (GMT) Received: from mail806.megamailservers.com (mail806.carrierinternetsolutions.com [69.49.106.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73A4543D1D for ; Tue, 22 Jun 2004 12:17:36 +0000 (GMT) (envelope-from strick@covad.net) X-POP-User: strick.covad.net Received: from mist.nodomain (h-67-101-100-248.snfccasy.dynamic.covad.net [67.101.100.248])i5MCHZFK008766 for ; Tue, 22 Jun 2004 08:17:35 -0400 Received: from mist.nodomain (localhost [127.0.0.1]) by mist.nodomain (8.12.11/8.12.11) with ESMTP id i5MCHYlS003486; Tue, 22 Jun 2004 05:17:34 -0700 (PDT) (envelope-from dan@mist.nodomain) Received: (from dan@localhost) by mist.nodomain (8.12.11/8.12.11/Submit) id i5MCHYvj003485; Tue, 22 Jun 2004 05:17:34 -0700 (PDT) (envelope-from dan) Date: Tue, 22 Jun 2004 05:17:34 -0700 (PDT) From: Dan Strick Message-Id: <200406221217.i5MCHYvj003485@mist.nodomain> To: freebsd-hackers@freebsd.org cc: dan@mist.nodomain Subject: Re: Sticky/sgid/suid bits safe on regular files? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 12:17:37 -0000 Daniel O'Connor wrote: >> > I think he wanted to use sticky/sgid/suid because they get removed > when the file is changed. >> and Dag-Erling S?rgrav responded: >> > no they don't. >> Actually, they do. (just the sgid/suid bits) I believe this was an ancient BSD security enhancement in case someone accidentally left a world writeable suid file around. Dan Strick From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 14:57:17 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 561EF16A4CE; Tue, 22 Jun 2004 14:57:17 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 127FB43D54; Tue, 22 Jun 2004 14:57:17 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i5MEuXN6077186; Tue, 22 Jun 2004 09:56:33 -0500 (CDT) (envelope-from dan) Date: Tue, 22 Jun 2004 09:56:33 -0500 From: Dan Nelson To: Chris Stenton Message-ID: <20040622145632.GF86471@dan.emsphone.com> References: <011f01c4578b$923d7b70$4b7ba8c0@gnome.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <011f01c4578b$923d7b70$4b7ba8c0@gnome.co.uk> X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: threads@freebsd.org cc: hackers@freebsd.org Subject: Re: pthread - fork - execv problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 14:57:17 -0000 In the last episode (Jun 21), Chris Stenton said: > I am trying to help port over an app thats posix threaded. One thread > uses fork, dup2 and execv to start a child programme in this case an > mp3 player. However, under FreeBSD-5.2.1, the execv causes all the > threads in the parent process to be blocked until the child process > returns. Is there a mechanism to get around this. Do you have a small testcase? I have not seen your problem in any other threaded programs on FreeBSD. It may be an application bug. After a fork both processes are independant. The child should not be able to affect the parent like this, unless the parent does something like holding a mutex used by all the threads and calling wait(). -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 18:01:33 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2FEF816A4D3 for ; Tue, 22 Jun 2004 18:01:33 +0000 (GMT) Received: from mta07-svc.ntlworld.com (mta07-svc.ntlworld.com [62.253.162.47]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F69143D58 for ; Tue, 22 Jun 2004 18:01:32 +0000 (GMT) (envelope-from scott@fishballoon.org) Received: from llama.fishballoon.org ([81.104.195.124]) by mta07-svc.ntlworld.comESMTP <20040622180146.UBKI5696.mta07-svc.ntlworld.com@llama.fishballoon.org> for ; Tue, 22 Jun 2004 19:01:46 +0100 Received: from tuatara.fishballoon.org ([192.168.1.6]) by llama.fishballoon.org with esmtp (Exim 4.34 (FreeBSD)) id 1BcpaN-0007nz-9m for freebsd-hackers@freebsd.org; Tue, 22 Jun 2004 19:01:31 +0100 Received: (from scott@localhost) by tuatara.fishballoon.org (8.12.11/8.12.11/Submit) id i5MI1UPF000489 for freebsd-hackers@freebsd.org; Tue, 22 Jun 2004 19:01:30 +0100 (BST) (envelope-from scott) Date: Tue, 22 Jun 2004 19:01:29 +0100 From: Scott Mitchell To: freebsd-hackers@freebsd.org Message-ID: <20040622180129.GA461@tuatara.fishballoon.org> References: <20040619175007.GB462@tuatara.fishballoon.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040619175007.GB462@tuatara.fishballoon.org> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 4.10-STABLE i386 Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 18:01:33 -0000 Well, -standards says that POSIX is silent on the subject of ls and nanoseconds, so I guess we can do whatever we like... I was going to just commit my original patch and be done with it, but David appears to have beaten me to it: http://www.freebsd.org/cgi/cvsweb.cgi/src/bin/ls/cmp.c Anyway, bikeshed over :-) Scott From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 18:26:54 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A59D16A4CE; Tue, 22 Jun 2004 18:26:54 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20C2F43D49; Tue, 22 Jun 2004 18:26:54 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i5MIQXdL017275; Tue, 22 Jun 2004 13:26:33 -0500 (CDT) (envelope-from dan) Date: Tue, 22 Jun 2004 13:26:33 -0500 From: Dan Nelson To: Chris Stenton Message-ID: <20040622182632.GJ86471@dan.emsphone.com> References: <011f01c4578b$923d7b70$4b7ba8c0@gnome.co.uk> <20040622145632.GF86471@dan.emsphone.com> <20040622154056.GA8733@diogenis.ceid.upatras.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040622154056.GA8733@diogenis.ceid.upatras.gr> X-OS: FreeBSD 5.2-CURRENT User-Agent: Mutt/1.5.6i cc: threads@freebsd.org cc: hackers@freebsd.org Subject: Re: pthread - fork - execv problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 18:26:54 -0000 In the last episode (Jun 22), Nikos Ntarmos said: > On Tue, Jun 22, 2004 at 09:56:33AM -0500, Dan Nelson wrote: > > It may be an application bug. After a fork both processes are > > independant. The child should not be able to affect the parent > > like this, unless the parent does something like holding a mutex > > used by all the threads and calling wait(). > > ... or the child holding a mutex before the fork(2) syscall. FWIW the > Linux info for libc and the NetBSD and Solaris man pages mention > pthread_atfork(3), used to install handlers to take care of such > cases. FreeBSD seems to not know of any such function, so chances are > that fork()'ing from inside a posix thread is not supported (?). It's definitely a possibility. libpthread in -current does support pthread_atfork, and I have a patch (below) that adds the same functionality to libc_r and libthr that I need to send-pr. Pointy hat to the original committer for breaking ABI compatibility. http://dan.allantgroup.com/FreeBSD/ -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 19:29:40 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B1B2A16A4CE for ; Tue, 22 Jun 2004 19:29:40 +0000 (GMT) Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 93BAA43D5E for ; Tue, 22 Jun 2004 19:29:40 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 25292 invoked from network); 22 Jun 2004 19:29:39 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 22 Jun 2004 19:29:39 -0000 Received: from 10.50.41.233 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i5MJTaGa019114; Tue, 22 Jun 2004 15:29:36 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-hackers@FreeBSD.org Date: Tue, 22 Jun 2004 15:30:37 -0400 User-Agent: KMail/1.6 References: <20040618223051.60c40991.infamous42md@hotpop.com> In-Reply-To: <20040618223051.60c40991.infamous42md@hotpop.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200406221530.37170.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: infamous42md@hotpop.com Subject: Re: lkm i/o port allocation problems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 19:29:40 -0000 On Friday 18 June 2004 10:30 pm, infamous42md@hotpop.com wrote: > sorry, i used the wrong email addy to send that email, i've resent it using > the correct one. I believe your problem may be that you are probing PnP BIOS or other PnP ISA devices. You should reject any device that has a PnP HID. For example, in rc(4) I did: static int rc_probe(device_t dev) { u_int port; int i, found; /* * We don't know of any PnP ID's for these cards. */ if (isa_get_logicalid(dev) != 0) return (ENXIO); ... } Also, you shouldn't have to use 'device_set_driver()' in your identify routine. To be honest, you also don't really need an identify routine so long as you have hints (on 5.x) for the ser0 device (like: hint.ser.0.at="isa" hint.ser.0.port="0x2f8" Or a line in the kernel config (on 4.x) like so: device ser0 at isa? port 0x2f8 -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 19:43:07 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8494216A4CE for ; Tue, 22 Jun 2004 19:43:07 +0000 (GMT) Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 660DB43D58 for ; Tue, 22 Jun 2004 19:43:07 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 14476 invoked from network); 22 Jun 2004 19:43:07 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 22 Jun 2004 19:42:59 -0000 Received: from 10.50.41.233 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i5MJguYG019196; Tue, 22 Jun 2004 15:42:56 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-hackers@FreeBSD.org Date: Tue, 22 Jun 2004 15:43:57 -0400 User-Agent: KMail/1.6 References: <20040621054406.GA927@VARK.homeunix.com> <20040621133003.GA96338@ussenterprise.ufp.org> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200406221543.57056.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx Subject: Re: /bin/ls sorting bug? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 19:43:07 -0000 On Monday 21 June 2004 08:48 pm, Greg Black wrote: > On 2004-06-21, Leo Bicknell wrote: > > While I think the particular sort order (current behavior vrs non > > nano patch vrs nano patch) is largely unimportant, I think consistency > > is very important. It's quite common to do things like using diff > > on the output of commands like ls (indeed, I think several of the > > built in periodic scripts to this), and for that having a _reproduceable_ > > order is important. > > The output of ls has never been good for reproduceable output > for identical data. It frequently leads to gigantic "diffs" in > periodic reports which makes them useless, as far as I can > tell. Take the following case: > > $ mkdir foo > $ touch foo/a > [1] $ ls -l foo > total 0 > -rw-r--r-- 1 gjb gjb 0 Jun 22 10:25 a > $ touch foo/b > [2] $ ls -l foo > total 0 > -rw-r--r-- 1 gjb gjb 0 Jun 22 10:25 a > -rw-r--r-- 1 gjb gjb 0 Jun 22 10:26 b > $ sudo chown nobody foo/a > [3] $ ls -l foo > total 0 > -rw-r--r-- 1 nobody gjb 0 Jun 22 10:25 a > -rw-r--r-- 1 gjb gjb 0 Jun 22 10:26 b > > If we diff the output of ls[1] and ls[2], we'll get a useful > answer that shows us that "b" was added. > > But if we diff ls[2] and ls[3], it will appear as though every > entry has changed, although only "b" has. When this happens in > big directories, the consequences are astonishingly bad. diff -b -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 20:19:11 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6294416A4CE; Tue, 22 Jun 2004 20:19:11 +0000 (GMT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id E204F43D49; Tue, 22 Jun 2004 20:19:10 +0000 (GMT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id i5MKIpon018521; Tue, 22 Jun 2004 16:18:51 -0400 (EDT) Date: Tue, 22 Jun 2004 16:18:51 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Dan Nelson In-Reply-To: <20040622182632.GJ86471@dan.emsphone.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org cc: threads@freebsd.org cc: Chris Stenton Subject: Re: pthread - fork - execv problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 20:19:11 -0000 On Tue, 22 Jun 2004, Dan Nelson wrote: > In the last episode (Jun 22), Nikos Ntarmos said: > > On Tue, Jun 22, 2004 at 09:56:33AM -0500, Dan Nelson wrote: > > > It may be an application bug. After a fork both processes are > > > independant. The child should not be able to affect the parent > > > like this, unless the parent does something like holding a mutex > > > used by all the threads and calling wait(). > > > > ... or the child holding a mutex before the fork(2) syscall. FWIW the > > Linux info for libc and the NetBSD and Solaris man pages mention > > pthread_atfork(3), used to install handlers to take care of such > > cases. FreeBSD seems to not know of any such function, so chances are > > that fork()'ing from inside a posix thread is not supported (?). > > It's definitely a possibility. > > libpthread in -current does support pthread_atfork, and I have a patch > (below) that adds the same functionality to libc_r and libthr that I > need to send-pr. Pointy hat to the original committer for breaking ABI > compatibility. Whaa? Adding a function doesn't break ABI, and I don't want to maintain 3 thread libraries. -- Dan Eischen From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 21:08:40 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CB44916A4CF; Tue, 22 Jun 2004 21:08:40 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7DB5643D5A; Tue, 22 Jun 2004 21:08:40 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i5ML8L2G051110; Tue, 22 Jun 2004 16:08:21 -0500 (CDT) (envelope-from dan) Date: Tue, 22 Jun 2004 16:08:21 -0500 From: Dan Nelson To: Daniel Eischen Message-ID: <20040622210820.GA17392@dan.emsphone.com> References: <20040622182632.GJ86471@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: hackers@freebsd.org cc: threads@freebsd.org cc: Chris Stenton Subject: Re: pthread - fork - execv problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 21:08:40 -0000 In the last episode (Jun 22), Daniel Eischen said: > > libpthread in -current does support pthread_atfork, and I have a > > patch (below) that adds the same functionality to libc_r and libthr > > that I need to send-pr. Pointy hat to the original committer for > > breaking ABI compatibility. http://dan.allantgroup.com/FreeBSD/ > > Whaa? Adding a function doesn't break ABI, and I don't want to > maintain 3 thread libraries. It does if an application detects pthread_fork during configure and uses it. You then can't use libmap to redirect libpthread to one of the other thread libraries for testing, since you'll get an undefined symbol error at runtime. Nikos Ntarmos also noticed that there's no pthread_atfork manpage. We could probably just use the Single Unix one. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 22 21:10:47 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A1BFA16A4CE for ; Tue, 22 Jun 2004 21:10:47 +0000 (GMT) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0741043D58 for ; Tue, 22 Jun 2004 21:10:47 +0000 (GMT) (envelope-from freebsd-hackers@m.gmane.org) Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BcsXM-0007xA-00 for ; Tue, 22 Jun 2004 23:10:36 +0200 Received: from ool-435489e5.dyn.optonline.net ([67.84.137.229]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Jun 2004 23:10:36 +0200 Received: from lxv by ool-435489e5.dyn.optonline.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 22 Jun 2004 23:10:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Alex Vasylenko Date: Tue, 22 Jun 2004 16:58:16 -0400 Lines: 13 Message-ID: <40D89D68.7090801@omut.org> References: <011f01c4578b$923d7b70$4b7ba8c0@gnome.co.uk> <20040622145632.GF86471@dan.emsphone.com> <20040622154056.GA8733@diogenis.ceid.upatras.gr> <20040622182632.GJ86471@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ool-435489e5.dyn.optonline.net User-Agent: Mozilla Thunderbird 0.7 (Windows/20040616) X-Accept-Language: en-us, en In-Reply-To: <20040622182632.GJ86471@dan.emsphone.com> Sender: news Subject: Re: pthread - fork - execv problem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2004 21:10:47 -0000 Dan Nelson wrote: > libpthread in -current does support pthread_atfork, and I have a patch > (below) that adds the same functionality to libc_r and libthr that I > need to send-pr. Pointy hat to the original committer for breaking ABI > compatibility. > > http://dan.allantgroup.com/FreeBSD/ > A man page to complement your patch is in PR docs/68201 -- Alex. From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 23 02:20:07 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D652B16A4CE for ; Wed, 23 Jun 2004 02:20:07 +0000 (GMT) Received: from mail.via.net (mail.via.net [209.81.9.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4E7643D46 for ; Wed, 23 Jun 2004 02:20:07 +0000 (GMT) (envelope-from joe@via.net) Received: from [209.81.2.10] (monk.via.net [209.81.2.10]) by mail.via.net (8.12.9p1/8.12.7) with ESMTP id i5N2HS18092099; Tue, 22 Jun 2004 19:17:31 -0700 (PDT) (envelope-from joe@via.net) User-Agent: Microsoft-Entourage/10.1.1.2418 Date: Tue, 22 Jun 2004 19:17:30 -0700 From: joe mcguckin To: Richard Hodges , "Ing.Richard Andrysek" Message-ID: In-Reply-To: <20040621092245.Q86863@mail.cheapline.net> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: SPDIF capture device? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jun 2004 02:20:07 -0000 RME makes a PCI card that has SPDIF, AES/EBU and TOSLINK i/o. DIGI96/8. Linux drivers for this card are available, so with a little porting effort on someone's part, you'd have a very high quality sound interface for FreeBSD. On 6/21/04 9:32 AM, "Richard Hodges" wrote: > On Fri, 18 Jun 2004, Ing.Richard Andrysek wrote: > >> Hi Richard, >> >> I've read your question about SPDIF capture device on freebsd. I am >> currently looking for similar device.Have you found such one? Can you >> access subcode etc.? > > Sorry, I never did find anything immediately useful for SPDIF capture. I > did find a large number of false leads, though. These were mainly audio > cards and chipsets that claimed to have SPDIF input, but the companies > either refused to provide information or to even reply at all. > > Andrew Gordon had an interesting idea, to use something like this: > http://www.gigatechnology.com/usbio.html > > If I had not solved my SPDIF problem (manufacturer documentation error), I > probably would have build a capture device around some microcontroller, or > maybe even a PLD connected to my host's parallel port. > > If you also want to capture the raw bits for testing your framing and > subcodes, you may see the same kind of difficulties I had :-( > > Good luck! > > -Richard > _______________________________________________ > 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" > -- Joe McGuckin ViaNet Communications 994 San Antonio Road Palo Alto, CA 94303 Phone: 650-213-1302 Cell: 650-207-0372 Fax: 650-969-2124 From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 23 02:39:23 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 15C0916A4D1 for ; Wed, 23 Jun 2004 02:39:23 +0000 (GMT) Received: from web53403.mail.yahoo.com (web53403.mail.yahoo.com [206.190.37.50]) by mx1.FreeBSD.org (Postfix) with SMTP id 92C9A43D48 for ; Wed, 23 Jun 2004 02:39:22 +0000 (GMT) (envelope-from prady_p@yahoo.com) Message-ID: <20040623023036.6240.qmail@web53403.mail.yahoo.com> Received: from [24.166.107.199] by web53403.mail.yahoo.com via HTTP; Tue, 22 Jun 2004 19:30:36 PDT Date: Tue, 22 Jun 2004 19:30:36 -0700 (PDT) From: pradeep reddy punnam To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: regarding signaling........ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jun 2004 02:39:23 -0000 Hi, i am modifing my ../netinet/ip_input.c code so that kernel can inform a user process about the arrival of a packet, i want to use signaling mechanism for this , i know the pid of the process to which the signal should be send, i am looking for exact function that can help me in sending SIGIO to procss... i tryed to use the kill and psignal functions but the system going panic when the packet arrives...may be my use of the fuctions is wrong... can i call a system call from the kernel.... somebody tell me what functions are suitable to call for such a situation.... thanking you... --prady. --------------------------------- Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 23 02:47:04 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5DA2B16A4CE for ; Wed, 23 Jun 2004 02:47:04 +0000 (GMT) Received: from web53406.mail.yahoo.com (web53406.mail.yahoo.com [206.190.37.53]) by mx1.FreeBSD.org (Postfix) with SMTP id E826D43D45 for ; Wed, 23 Jun 2004 02:47:03 +0000 (GMT) (envelope-from prady_p@yahoo.com) Message-ID: <20040623024623.31040.qmail@web53406.mail.yahoo.com> Received: from [24.166.107.199] by web53406.mail.yahoo.com via HTTP; Tue, 22 Jun 2004 19:46:23 PDT Date: Tue, 22 Jun 2004 19:46:23 -0700 (PDT) From: pradeep reddy punnam To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: regarding signals... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jun 2004 02:47:04 -0000 Hi, i am modifing my ../netinet/ip_input.c code so that kernel can inform a user process about the arrival of a packet, i want to use signaling mechanism for this , i know the pid of the process to which the signal should be send, i am looking for exact function that can help me in sending SIGIO to procss... i tryed to use the kill and psignal functions but the system going panic when the packet arrives...may be my use of the fuctions is wrong... can i call a system call from the kernel.... somebody tell me what functions are suitable to call for such a situation.... thanking you... --prady. --------------------------------- Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 23 03:23:46 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E808016A4CE for ; Wed, 23 Jun 2004 03:23:46 +0000 (GMT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB73543D49 for ; Wed, 23 Jun 2004 03:23:46 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.11/8.12.11) with ESMTP id i5N3N5Bh053115; Tue, 22 Jun 2004 20:23:09 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200406230323.i5N3N5Bh053115@gw.catspoiler.org> Date: Tue, 22 Jun 2004 20:23:05 -0700 (PDT) From: Don Lewis To: prady_p@yahoo.com In-Reply-To: <20040623024623.31040.qmail@web53406.mail.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: freebsd-hackers@FreeBSD.org Subject: Re: regarding signals... X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jun 2004 03:23:47 -0000 On 22 Jun, pradeep reddy punnam wrote: > Hi, > > i am modifing my ../netinet/ip_input.c code so that kernel can inform a > user process about the arrival of a packet, i want to use signaling > mechanism for this , i know the pid of the process to which the signal > should be send, i am looking for exact function that can help me in > sending SIGIO to procss... > i tryed to use the kill and psignal functions but the system going > panic when the packet arrives...may be my use of the fuctions is wrong... > can i call a system call from the kernel.... > somebody tell me what functions are suitable to call for such a > situation.... > thanking you... Take a look at how the various FIOSETOWN ioctl() handlers are written. The pid or process group id is passed to ioctl(), and the kernel passes this to fsetown(), which does a lookup on the pid (or pgrp id) and stores a pointer to the process or process group in a struct sigio, and a pointer to this structures is stored in the location specified as the second argument to fsetown(). When the file descriptor that was passed to ioctl() is closed, funsetown() gets called. When an event that should trigger the SIGIO is detected, pgsigio() should be called with a pointer to a pointer to the appropriate struct sigio. One of the things that gets handled automagically is that when the process or process group that is supposed to receive the SIGIO exits, the SIGIO handling is disabled so that some other process that inherits the same pid at a later time doesn't start receiving unexpected signals. Instead of writing some custom kernel code for this, why don't you just use bpf, which already implements the FIOSETOWN ioctl() call? From owner-freebsd-hackers@FreeBSD.ORG Wed Jun 23 06:18:35 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CDDF516A4CE for ; Wed, 23 Jun 2004 06:18:35 +0000 (GMT) Received: from fulcrum.mig-29.net (dsl-200-78-45-190.prod-infinitum.com.mx [200.78.45.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EB8343D2D for ; Wed, 23 Jun 2004 06:18:35 +0000 (GMT) (envelope-from mig@mig-29.net) Received: by fulcrum.mig-29.net (Postfix, from userid 1000) id C31F233DED; Wed, 23 Jun 2004 01:18:16 -0500 (CDT) Date: Wed, 23 Jun 2004 01:18:16 -0500 From: Manuel Rabade Garcia To: hackers@freebsd.org Message-ID: <20040623061816.GB731@mig-29.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="82I3+IH0IqGh5yIs" Content-Disposition: inline Content-Transfer-Encoding: 8bit X-GPG-Key: 1024D/AA3325C0 2002-09-30 X-GPG-Fingerprint: D2E5 76E1 CE2D 8783 545D 1F41 399B 5765 AA33 25C0 X-MOBILE: (+52 55) 13 99 27 87 X-URL: http://mig-29.net User-Agent: Mutt/1.5.6i Subject: Sony DSC P73 and umass failed (CBI reset failed, STALLED) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jun 2004 06:18:35 -0000 --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi everyone, i buy a Sony DSC P73 Digital Camera wich supports USB Normal mode (as a 'standard' storage device), PTP mode and Picture Bridge (for other Sony devices i think). I use FreeBSD 5.2.1 (see dmesg above) and when i connect it the umass fails to detect the storage device and kernel says: umass0: Sony Sony DSC, rev 2.00/5.00, addr 2 umass0: CBI reset failed, STALLED umass0: CBI reset failed, STALLED umass0: CBI reset failed, STALLED umass0: CBI reset failed, STALLED umass0: CBI reset failed, STALLED The output of 'usbdevs -v' is: mig@fulcrum:~$ usbdevs -v Controller /dev/usb0: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 addr 2: low speed, power 100 mA, config 1, Microsoft Trackball Explorer®(0x0024), Microsoft(0x045e), rev 1.21 port 2 powered Controller /dev/usb1: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 addr 2: full speed, self powered, config 1, Sony DSC(0x0010), Sony(0x054c), rev 5.00 port 2 powered I don't know if its the correct place, i wana send a pr but i don't know what other information could be useful (the dmesg and usbdevs i think are not enough), i am very interested in coperating to get it working :). Thanks to everyone and keep up the good work :) -- Manuel Rabade Garcia WWW - http://mig-29.net GPG - 1024D/AA3325C0 2002-09-30 Fingerprint - D2E5 76E1 CE2D 8783 545D 1F41 399B 5765 AA33 25C0 --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename="dmesg.txt" Content-Transfer-Encoding: 8bit Copyright (c) 1992-2004 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.2.1-RELEASE-p5 #0: Tue Apr 20 13:36:34 CDT 2004 root@:/usr/obj/usr/src/sys/FULCRUM Preloaded elf kernel "/boot/kernel/kernel" at 0xc0b4e000. Preloaded elf module "/boot/modules/linux.ko" at 0xc0b4e1cc. Preloaded acpi_dsdt "/boot/acpi_dsdt.aml" at 0xc0b4e278. Preloaded elf module "/boot/modules/nvidia.ko" at 0xc0b4e2c0. Preloaded elf module "/boot/modules/acpi.ko" at 0xc0b4e36c. Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Mobile Intel(R) Pentium(R) 4 - M CPU 2.00GHz (1993.54-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf27 Stepping = 7 Features=0xbfebf9ff real memory = 536748032 (511 MB) avail memory = 511143936 (487 MB) netsmb_dev: loaded Pentium Pro MTRR support enabled VESA: v3.0, 32768k memory, flags:0x1, mode table:0xc0877782 (1000022) VESA: NVidia ACPI: DSDT was overridden. ACPI-0375: *** Info: Table [DSDT] replaced by host OS npx0: [FAST] npx0: on motherboard npx0: INT 16 interface acpi0: on motherboard pcibios: BIOS version 2.10 Using $PIR table, 11 entries at 0xc00fbb90 Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0 acpi_cpu0: port 0x530-0x537 on acpi0 acpi_tz0: port 0x530-0x537 on acpi0 acpi_acad0: on acpi0 acpi_cmbat0: on acpi0 acpi_cmbat1: on acpi0 acpi_lid0: on acpi0 acpi_button0: on acpi0 acpi_button1: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib0: slot 29 INTA is routed to irq 11 pcib0: slot 29 INTC is routed to irq 11 pcib0: slot 31 INTB is routed to irq 11 pcib0: slot 31 INTB is routed to irq 11 agp0: mem 0xe8000000-0xebffffff at device 0.0 on pci0 pcib1: at device 1.0 on pci0 pci1: on pcib1 pcib1: slot 0 INTA is routed to irq 11 nvidia0: mem 0xdff80000-0xdfffffff,0xe0000000-0xe7ffffff,0xfc000000-0xfcffffff irq 11 at device 0.0 on pci1 uhci0: port 0xbf80-0xbf9f irq 11 at device 29.0 on pci0 usb0: on uhci0 usb0: USB revision 1.0 uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered ums0: Microsoft Microsoft Trackball Explorer®, rev 1.10/1.21, addr 2, iclass 3/1 ums0: 5 buttons and Z dir. uhci1: port 0xbf20-0xbf3f irq 11 at device 29.2 on pci0 usb1: on uhci1 usb1: USB revision 1.0 uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 2 ports with 2 removable, self powered pcib2: at device 30.0 on pci0 pci2: on pcib2 pcib2: slot 0 INTA is routed to irq 11 pcib2: slot 1 INTA is routed to irq 11 xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0xec80-0xecff mem 0xf8fffc00-0xf8fffc7f irq 11 at device 0.0 on pci2 xl0: Ethernet address: 00:08:74:e5:9e:ba miibus0: on xl0 ukphy0: on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto cbb0: at device 1.0 on pci2 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 pcib2: slot 1 INTA is routed to irq 11 cbb0: [MPSAFE] cbb1: at device 1.1 on pci2 cardbus1: on cbb1 pccard1: <16-bit PCCard bus> on cbb1 pcib2: slot 1 INTA is routed to irq 11 cbb1: [MPSAFE] fwohci0: mem 0xf8ff8000-0xf8ffbfff,0xf8fff000-0xf8fff7ff irq 11 at device 1.2 on pci2 fwohci0: OHCI version 1.0 (ROM=1) fwohci0: No. of Isochronous channel is 4. fwohci0: EUI64 32:4f:c0:00:08:40:d8:41 fwohci0: Phy 1394a available S400, 1 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 sbp0: on firewire0 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 32:4f:c0:40:d8:41 fwohci0: Initiate bus reset fwohci0: BUS reset fwohci0: node_id=0xc000ffc0, gen=1, CYCLEMASTER mode firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0xbfa0-0xbfaf,0x374-0x377,0x170-0x177,0x3f4-0x3f7,0x1f0-0x1f7 at device 31.1 on pci0 ata0: at 0x1f0 irq 14 on atapci0 ata0: [MPSAFE] ata1: at 0x170 irq 15 on atapci0 ata1: [MPSAFE] pcm0: port 0xdc80-0xdcbf,0xd800-0xd8ff irq 11 at device 31.5 on pci0 pcm0: pci0: at device 31.6 (no driver attached) atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: flags 0x1 irq 1 on atkbdc0 kbd0 at atkbd0 psm0: irq 12 on atkbdc0 psm0: model GlidePoint, device ID 0 speaker0 port 0x67,0x65,0x63,0x61 on acpi0 fdc0: port 0x3f7,0x3f2-0x3f5 irq 6 drq 2 on acpi0 fdc0: FIFO enabled, 8 bytes threshold fd0: <1440-KB 3.5" drive> on fdc0 drive 0 sio0 port 0x3f8-0x3ff irq 4 on acpi0 sio0: type 16550A sio1 port 0x280-0x287,0x2f8-0x2ff irq 3 drq 3 on acpi0 sio1: type 16550A ppc0 port 0x778-0x77b,0x378-0x37f irq 7 drq 1 on acpi0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/8 bytes threshold ppbus0: on ppc0 plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 orm0: