From mraymond@sgi.com Mon Aug 2 10:17:33 2004 Received: with ECARTIS (v1.0.0; list fam); Mon, 02 Aug 2004 10:17:38 -0700 (PDT) Received: from omx1.americas.sgi.com (omx1-ext.sgi.com [192.48.179.11]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i72HHW6x029881 for ; Mon, 2 Aug 2004 10:17:33 -0700 Received: from flecktone.americas.sgi.com (flecktone.americas.sgi.com [192.48.203.135]) by omx1.americas.sgi.com (8.12.10/8.12.9/linux-outbound_gateway-1.1) with ESMTP id i72HHT0f005966 for ; Mon, 2 Aug 2004 12:17:29 -0500 Received: from daisy-e236.americas.sgi.com (daisy-e236.americas.sgi.com [128.162.236.214]) by flecktone.americas.sgi.com (8.12.9/8.12.10/SGI_generic_relay-1.2) with ESMTP id i72HHSOV44172208; Mon, 2 Aug 2004 12:17:28 -0500 (CDT) Received: from goliath.americas.sgi.com (goliath.americas.sgi.com [128.162.232.85]) by daisy-e236.americas.sgi.com (8.12.9/SGI-server-1.8) with ESMTP id i72HHS5N11242045; Mon, 2 Aug 2004 12:17:28 -0500 (CDT) Received: from goliath.americas.sgi.com by goliath.americas.sgi.com (SGI-8.12.5/SGI-client-1.7) via ESMTP id i72HHSdG092954; Mon, 2 Aug 2004 12:17:28 -0500 (CDT) Received: (from mraymond@localhost) by goliath.americas.sgi.com (SGI-8.12.5/8.12.5/Submit) id i72HHRDR091673; Mon, 2 Aug 2004 12:17:27 -0500 (CDT) Date: Mon, 2 Aug 2004 12:17:27 -0500 From: Michael Raymond To: Stefan Haun Cc: fam@oss.sgi.com Subject: Re: Java wrapper for libfam Message-ID: <20040802121727.A92939@goliath.americas.sgi.com> References: <20040801015603.GT3892@woodstock.peanuts> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20040801015603.GT3892@woodstock.peanuts>; from mail@tuxathome.de on Sun, Aug 01, 2004 at 03:56:03AM +0200 X-archive-position: 269 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: mraymond@sgi.com Precedence: bulk X-list: fam I don't know of one. Michael On Sun, Aug 01, 2004 at 03:56:03AM +0200, Stefan Haun wrote: > Hi, > > I wonder if there is a java wrapper for the fam library? > > If so, where can I find it? If not, I'm gonna write one. > > Greetings, > Stefan Haun -- Michael A. Raymond Office: (651) 683-3434 Core OS Group Real-Time System Software From folkert@vanheusden.com Thu Aug 5 05:41:32 2004 Received: with ECARTIS (v1.0.0; list fam); Thu, 05 Aug 2004 05:41:38 -0700 (PDT) Received: from keetweej.vanheusden.com (nobody@keetweej.xs4all.nl [213.84.46.114]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i75CfVVp007122 for ; Thu, 5 Aug 2004 05:41:32 -0700 Received: by keetweej.vanheusden.com (Postfix, from userid 1000) id EC3EC46F05; Thu, 5 Aug 2004 14:41:26 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by keetweej.vanheusden.com (Postfix) with ESMTP id B809A2FBF3 for ; Thu, 5 Aug 2004 14:41:26 +0200 (CEST) Date: Thu, 5 Aug 2004 14:41:26 +0200 (CEST) From: Folkert van Heusden X-X-Sender: To: Subject: monitoring a complete path in one go Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 270 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: folkert@vanheusden.com Precedence: bulk X-list: fam Hi, My program multitail enables users to monitor not only a file, but also a directory of files. One can then set to monitor for example: /var/log/apache*/*/* As you can see it supports multiple levels of directories. Currently I'm using glob() to get a list of files matching the given pattern and then calculate the difference with the previous run, every 5 seconds. My question now is: will I also be able to do this with FAM? Or will I need to retrieve complete directory-listings for each level (/var/log/apache1, /var/log/apache2, /var/log/apache1/site1, /var/log/apache1/site2, etc.) and start monitoring each of them? Or can I just pass "/var/log/apache*/*/*" to fam? Folkert van Heusden +------------------------------------------------------------------+ |UNIX admin? Then give MultiTail (http://vanheusden.com/multitail/)| |a try, it brings monitoring logfiles to a different level! See | |http://vanheusden.com/multitail/features.html for a feature list. | +------------------------------------------= www.unixsoftware.nl =-+ From levin@lanart.it Thu Aug 5 07:39:59 2004 Received: with ECARTIS (v1.0.0; list fam); Thu, 05 Aug 2004 07:40:04 -0700 (PDT) Received: from mail-relay-2.tiscali.it (mail-relay-2.tiscali.it [213.205.33.42]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i75EdwBp013234 for ; Thu, 5 Aug 2004 07:39:58 -0700 Received: from [192.168.0.15] (62.10.84.19) by mail-relay-2.tiscali.it (7.1.021.3) id 40F419A700630B1C for fam@oss.sgi.com; Thu, 5 Aug 2004 16:39:49 +0200 Message-ID: <411246B3.5020904@lanart.it> Date: Thu, 05 Aug 2004 16:39:47 +0200 From: Andrei Levin User-Agent: Mozilla Thunderbird 0.6 (X11/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: fam@oss.sgi.com Subject: Problems compiling FAM 2.7.0 on Slackware 10. Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-archive-position: 271 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: levin@lanart.it Precedence: bulk X-list: fam I am trying to compile FAM-2.7.0 on Slackware 10. Seems like a problem with gcc: mkdir .libs g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -DFAM_CONF=\"/usr/local/etc/fam.conf\" -g -O2 -c Client.c++ -MT Client.lo -MD -MP -MF .deps/Client.TPlo -fPIC -DPIC In file included from /usr/include/c++/3.3.4/backward/iostream.h:31, from Client.c++:37: /usr/include/c++/3.3.4/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated. /usr/include/c++/3.3.4/iostream:274: internal compiler error: in value_format, at dwarf2out.c:6471 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. make[2]: *** [Client.lo] Error 1 make[2]: Leaving directory `/usr/local/src/mail/fam-2.7.0/lib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/src/mail/fam-2.7.0' make: *** [all] Error 2 Can you please assist me? Andrei Levin -- Lan.Art s.r.l. via Passo Fogolana, 45 35020 Codevigo (PD) tel. 049-5850375 fax 049-9784042 http://www.lanart.it From dviner@yahoo-inc.com Thu Aug 5 08:28:39 2004 Received: with ECARTIS (v1.0.0; list fam); Thu, 05 Aug 2004 08:28:45 -0700 (PDT) Received: from penxng.smca.yahoo.com (penxng.smca.yahoo.com [204.119.24.188]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i75FSdFp017286 for ; Thu, 5 Aug 2004 08:28:39 -0700 Received: by penxng.smca.yahoo.com with Internet Mail Service (5.5.2656.59) id ; Thu, 5 Aug 2004 08:25:25 -0700 Message-ID: <263A1F717ECDED40AA969F98D1CF122E063ED0B3@penxng.smca.yahoo.com> From: "Viner, David" To: "'Folkert van Heusden'" , fam@oss.sgi.com Subject: RE: monitoring a complete path in one go Date: Thu, 5 Aug 2004 08:25:25 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain X-archive-position: 272 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: dviner@yahoo-inc.com Precedence: bulk X-list: fam my understanding of fam's current implementation is that you need to tell fam each directory that you want it to monitor. there's no option that I'm aware of which allows you to recursively watch directories... altho that seems like an interesting (tho potentially resource consumptive) option that we might add. dave -----Original Message----- From: Folkert van Heusden [mailto:folkert@vanheusden.com] Sent: Thursday, August 05, 2004 5:41 AM To: fam@oss.sgi.com Subject: monitoring a complete path in one go Hi, My program multitail enables users to monitor not only a file, but also a directory of files. One can then set to monitor for example: /var/log/apache*/*/* As you can see it supports multiple levels of directories. Currently I'm using glob() to get a list of files matching the given pattern and then calculate the difference with the previous run, every 5 seconds. My question now is: will I also be able to do this with FAM? Or will I need to retrieve complete directory-listings for each level (/var/log/apache1, /var/log/apache2, /var/log/apache1/site1, /var/log/apache1/site2, etc.) and start monitoring each of them? Or can I just pass "/var/log/apache*/*/*" to fam? Folkert van Heusden +------------------------------------------------------------------+ |UNIX admin? Then give MultiTail (http://vanheusden.com/multitail/)| |a try, it brings monitoring logfiles to a different level! See | |http://vanheusden.com/multitail/features.html for a feature list. | +------------------------------------------= www.unixsoftware.nl =-+ From folkert@vanheusden.com Thu Aug 5 09:38:46 2004 Received: with ECARTIS (v1.0.0; list fam); Thu, 05 Aug 2004 09:38:52 -0700 (PDT) Received: from keetweej.vanheusden.com (nobody@keetweej.xs4all.nl [213.84.46.114]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i75Gcjle019503 for ; Thu, 5 Aug 2004 09:38:46 -0700 Received: by keetweej.vanheusden.com (Postfix, from userid 1000) id D6F3646F05; Thu, 5 Aug 2004 18:38:40 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by keetweej.vanheusden.com (Postfix) with ESMTP id B22B22FBF3; Thu, 5 Aug 2004 18:38:40 +0200 (CEST) Date: Thu, 5 Aug 2004 18:38:40 +0200 (CEST) From: Folkert van Heusden X-X-Sender: To: "Viner, David" Cc: Subject: RE: monitoring a complete path in one go In-Reply-To: <263A1F717ECDED40AA969F98D1CF122E063ED0B3@penxng.smca.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-archive-position: 273 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: folkert@vanheusden.com Precedence: bulk X-list: fam Hi, Thanks for your reply. To clarify things: what I meant was not neccessarily recursively going through directory-trees, but more like this: imagine a directory tree like this: /var/log/apache1.3/site1/ site2/ apache2.x/site3/ site4/ In my example, I wanted to monitor all files in the directories of site1, site2, site3 and site4: NOT the subdirectories of site1-4(!). So in my current implementation I would call glob("/var/log/apache*/site*/*", ...);. I went through the FAM documentation and it looks as this is not possible with FAM, am I right? On Thu, 5 Aug 2004, Viner, David wrote: > Date: Thu, 5 Aug 2004 08:25:25 -0700 > From: "Viner, David" > To: 'Folkert van Heusden' , fam@oss.sgi.com > Subject: RE: monitoring a complete path in one go > > my understanding of fam's current implementation is that you need to tell > fam each directory that you want it to monitor. there's no option that I'm > aware of which allows you to recursively watch directories... altho that > seems like an interesting (tho potentially resource consumptive) option that > we might add. > > dave > > -----Original Message----- > From: Folkert van Heusden [mailto:folkert@vanheusden.com] > Sent: Thursday, August 05, 2004 5:41 AM > To: fam@oss.sgi.com > Subject: monitoring a complete path in one go > > > Hi, > > My program multitail enables users to monitor not only a file, but also a > directory of files. One can then set to monitor for example: > /var/log/apache*/*/* > As you can see it supports multiple levels of directories. > Currently I'm using glob() to get a list of files matching the given pattern > and then calculate the difference with the previous run, every 5 seconds. > > My question now is: will I also be able to do this with FAM? Or will I need > to retrieve complete directory-listings for each level (/var/log/apache1, > /var/log/apache2, /var/log/apache1/site1, /var/log/apache1/site2, etc.) and > start monitoring each of them? Or can I just pass "/var/log/apache*/*/*" to > fam? > > > Folkert van Heusden > > +------------------------------------------------------------------+ > |UNIX admin? Then give MultiTail (http://vanheusden.com/multitail/)| > |a try, it brings monitoring logfiles to a different level! See | > |http://vanheusden.com/multitail/features.html for a feature list. | > +------------------------------------------= www.unixsoftware.nl =-+ > > Folkert van Heusden +------------------------------------------------------------------+ |UNIX admin? Then give MultiTail (http://vanheusden.com/multitail/)| |a try, it brings monitoring logfiles to a different level! See | |http://vanheusden.com/multitail/features.html for a feature list. | +------------------------------------------= www.unixsoftware.nl =-+ From dviner@yahoo-inc.com Thu Aug 5 10:00:23 2004 Received: with ECARTIS (v1.0.0; list fam); Thu, 05 Aug 2004 10:00:36 -0700 (PDT) Received: from penxng.smca.yahoo.com (penxng.smca.yahoo.com [204.119.24.188]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i75H0Nhb019995 for ; Thu, 5 Aug 2004 10:00:23 -0700 Received: by penxng.smca.yahoo.com with Internet Mail Service (5.5.2656.59) id ; Thu, 5 Aug 2004 09:57:11 -0700 Message-ID: <263A1F717ECDED40AA969F98D1CF122E063ED0B8@penxng.smca.yahoo.com> From: "Viner, David" To: "'Folkert van Heusden'" , "Viner, David" Cc: fam@oss.sgi.com Subject: RE: monitoring a complete path in one go Date: Thu, 5 Aug 2004 09:57:11 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain X-archive-position: 274 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: dviner@yahoo-inc.com Precedence: bulk X-list: fam I think you'd need to invoke FAMMonitorDirectory 4 times, one for each directory site1, site2, site3, site4. I don't think * can be used in the path name. dave -----Original Message----- From: Folkert van Heusden [mailto:folkert@vanheusden.com] Sent: Thursday, August 05, 2004 9:39 AM To: Viner, David Cc: fam@oss.sgi.com Subject: RE: monitoring a complete path in one go Hi, Thanks for your reply. To clarify things: what I meant was not neccessarily recursively going through directory-trees, but more like this: imagine a directory tree like this: /var/log/apache1.3/site1/ site2/ apache2.x/site3/ site4/ In my example, I wanted to monitor all files in the directories of site1, site2, site3 and site4: NOT the subdirectories of site1-4(!). So in my current implementation I would call glob("/var/log/apache*/site*/*", ...);. I went through the FAM documentation and it looks as this is not possible with FAM, am I right? On Thu, 5 Aug 2004, Viner, David wrote: > Date: Thu, 5 Aug 2004 08:25:25 -0700 > From: "Viner, David" > To: 'Folkert van Heusden' , fam@oss.sgi.com > Subject: RE: monitoring a complete path in one go > > my understanding of fam's current implementation is that you need to tell > fam each directory that you want it to monitor. there's no option that I'm > aware of which allows you to recursively watch directories... altho that > seems like an interesting (tho potentially resource consumptive) option that > we might add. > > dave > > -----Original Message----- > From: Folkert van Heusden [mailto:folkert@vanheusden.com] > Sent: Thursday, August 05, 2004 5:41 AM > To: fam@oss.sgi.com > Subject: monitoring a complete path in one go > > > Hi, > > My program multitail enables users to monitor not only a file, but also a > directory of files. One can then set to monitor for example: > /var/log/apache*/*/* > As you can see it supports multiple levels of directories. > Currently I'm using glob() to get a list of files matching the given pattern > and then calculate the difference with the previous run, every 5 seconds. > > My question now is: will I also be able to do this with FAM? Or will I need > to retrieve complete directory-listings for each level (/var/log/apache1, > /var/log/apache2, /var/log/apache1/site1, /var/log/apache1/site2, etc.) and > start monitoring each of them? Or can I just pass "/var/log/apache*/*/*" to > fam? > > > Folkert van Heusden > > +------------------------------------------------------------------+ > |UNIX admin? Then give MultiTail (http://vanheusden.com/multitail/)| > |a try, it brings monitoring logfiles to a different level! See | > |http://vanheusden.com/multitail/features.html for a feature list. | > +------------------------------------------= www.unixsoftware.nl =-+ > > Folkert van Heusden +------------------------------------------------------------------+ |UNIX admin? Then give MultiTail (http://vanheusden.com/multitail/)| |a try, it brings monitoring logfiles to a different level! See | |http://vanheusden.com/multitail/features.html for a feature list. | +------------------------------------------= www.unixsoftware.nl =-+ From dviner@yahoo-inc.com Thu Aug 5 15:15:50 2004 Received: with ECARTIS (v1.0.0; list fam); Thu, 05 Aug 2004 15:15:55 -0700 (PDT) Received: from penxng.smca.yahoo.com (penxng.smca.yahoo.com [204.119.24.188]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i75MFm8F032526 for ; Thu, 5 Aug 2004 15:15:50 -0700 Received: by penxng.smca.yahoo.com with Internet Mail Service (5.5.2656.59) id ; Thu, 5 Aug 2004 15:12:22 -0700 Message-ID: <263A1F717ECDED40AA969F98D1CF122E063ED0C1@penxng.smca.yahoo.com> From: "Viner, David" To: "'Andrei Levin'" , fam@oss.sgi.com Subject: RE: Problems compiling FAM 2.7.0 on Slackware 10. Date: Thu, 5 Aug 2004 15:12:21 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C47B39.475B88F0" X-archive-position: 275 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: dviner@yahoo-inc.com Precedence: bulk X-list: fam This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C47B39.475B88F0 Content-Type: text/plain here's a quick patch that should make it compile without warnings. let me know if this works: dave -----Original Message----- From: Andrei Levin [mailto:levin@lanart.it] Sent: Thursday, August 05, 2004 7:40 AM To: fam@oss.sgi.com Subject: Problems compiling FAM 2.7.0 on Slackware 10. I am trying to compile FAM-2.7.0 on Slackware 10. Seems like a problem with gcc: mkdir .libs g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -DFAM_CONF=\"/usr/local/etc/fam.conf\" -g -O2 -c Client.c++ -MT Client.lo -MD -MP -MF .deps/Client.TPlo -fPIC -DPIC In file included from /usr/include/c++/3.3.4/backward/iostream.h:31, from Client.c++:37: /usr/include/c++/3.3.4/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated. /usr/include/c++/3.3.4/iostream:274: internal compiler error: in value_format, at dwarf2out.c:6471 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. make[2]: *** [Client.lo] Error 1 make[2]: Leaving directory `/usr/local/src/mail/fam-2.7.0/lib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/src/mail/fam-2.7.0' make: *** [all] Error 2 Can you please assist me? Andrei Levin -- Lan.Art s.r.l. via Passo Fogolana, 45 35020 Codevigo (PD) tel. 049-5850375 fax 049-9784042 http://www.lanart.it ------_=_NextPart_000_01C47B39.475B88F0 Content-Type: application/octet-stream; name="fam-warnings.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="fam-warnings.patch" ? .deps=0A= ? .libs=0A= ? Makefile=0A= ? famd=0A= Index: Client.c++=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/fam/fam/src/Client.c++,v=0A= retrieving revision 1.1=0A= diff -u -p -u -w -r1.1 Client.c++=0A= --- Client.c++ 4 Dec 2003 18:27:21 -0000 1.1=0A= +++ Client.c++ 5 Aug 2004 22:13:51 -0000=0A= @@ -24,7 +24,7 @@=0A= =0A= #include =0A= #include =0A= -#include =0A= +#include =0A= =0A= in_addr=0A= Client::LOCALHOST()=0A= Index: IMon.c++=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/fam/fam/src/IMon.c++,v=0A= retrieving revision 1.1=0A= diff -u -p -u -w -r1.1 IMon.c++=0A= --- IMon.c++ 4 Dec 2003 18:27:21 -0000 1.1=0A= +++ IMon.c++ 5 Aug 2004 22:13:51 -0000=0A= @@ -40,7 +40,7 @@=0A= #include "Interest.h"=0A= #include "Log.h"=0A= #include "Scheduler.h"=0A= -#include "alloc.h"=0A= +#include =0A= =0A= int IMon::imonfd =3D -2;=0A= IMon::EventHandler IMon::ehandler =3D NULL;=0A= ------_=_NextPart_000_01C47B39.475B88F0-- From dviner@yahoo-inc.com Fri Aug 6 15:10:57 2004 Received: with ECARTIS (v1.0.0; list fam); Fri, 06 Aug 2004 15:11:02 -0700 (PDT) Received: from penxng.smca.yahoo.com (penxng.smca.yahoo.com [204.119.24.188]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i76MAuVV002483 for ; Fri, 6 Aug 2004 15:10:56 -0700 Received: by penxng.smca.yahoo.com with Internet Mail Service (5.5.2656.59) id ; Fri, 6 Aug 2004 15:07:44 -0700 Message-ID: <263A1F717ECDED40AA969F98D1CF122E063ED0C8@penxng.smca.yahoo.com> From: "Viner, David" To: fam@oss.sgi.com Subject: patches to 2.7.0 codebase Date: Fri, 6 Aug 2004 15:07:43 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C47C01.CC37FF90" X-archive-position: 276 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: dviner@yahoo-inc.com Precedence: bulk X-list: fam This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C47C01.CC37FF90 Content-Type: text/plain hi, I'm working on making the fam source compile on freebsd. here are a few patches that help make this work. configuration.patch alters configure.ac and config.h.in to look for several headers which are assumed to exist in the code, and adds a HAVE_XXX_H define. src.patch fixes up a few header includes in the fam/src/ dir. nothing major. mntent-include-fix.patch, mntent_compat.h, and mntent_compat.c++ offer a compatibility layer for operating systems which don't have mntent.h built in naturally. if the os has one, then that one is used. otherwise, we use this implementation (which does the same thing). using these patches (and new files), I was able to compile on FreeBSD 4 machine using the following version of ports autoconf-2.59 automake-1.5,1 m4-1.4 libtool-1.5.2 I followed these steps to build it after applying the patches: % libtoolize --force % aclocal % automake % autoconf % ./configure % make And it compiled. I also tested these changes on a Linux machine, and they seem to work ok. dave ------_=_NextPart_000_01C47C01.CC37FF90 Content-Type: application/octet-stream; name="src.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="src.patch" Index: src/IMon.c++=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/fam/fam/src/IMon.c++,v=0A= retrieving revision 1.1=0A= diff -u -r1.1 IMon.c++=0A= --- src/IMon.c++ 4 Dec 2003 18:27:21 -0000 1.1=0A= +++ src/IMon.c++ 6 Aug 2004 21:13:16 -0000=0A= @@ -34,7 +34,14 @@=0A= #endif=0A= #endif=0A= =0A= +#if HAVE_SYS_SYSMACROS_H=0A= #include =0A= +#else=0A= +// on freebsd, these are in sys/types.h=0A= +#if HAVE_SYS_TYPES_H=0A= +#include =0A= +#endif /* SYS_TYPES_H */=0A= +#endif /* SYS_SYSMACROS_H */=0A= #include =0A= =0A= #include "Interest.h"=0A= Index: src/Interest.c++=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/fam/fam/src/Interest.c++,v=0A= retrieving revision 1.2=0A= diff -u -r1.2 Interest.c++=0A= --- src/Interest.c++ 15 Jan 2004 21:29:37 -0000 1.2=0A= +++ src/Interest.c++ 6 Aug 2004 21:13:16 -0000=0A= @@ -23,7 +23,13 @@=0A= #include "Interest.h"=0A= =0A= #include =0A= +#ifdef HAVE_SYS_SYSMACROS_H=0A= #include =0A= +#else=0A= +#ifdef HAVE_SYS_TYPES_H=0A= +#include =0A= +#endif /* HAVE_SYS_TYPES_H */=0A= +#endif /* HAVE_SYS_SYSMACROS_H */=0A= =0A= #include =0A= #include =0A= Index: src/Listener.c++=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/fam/fam/src/Listener.c++,v=0A= retrieving revision 1.1=0A= diff -u -r1.1 Listener.c++=0A= --- src/Listener.c++ 4 Dec 2003 18:27:21 -0000 1.1=0A= +++ src/Listener.c++ 6 Aug 2004 21:13:16 -0000=0A= @@ -35,6 +35,8 @@=0A= #include =0A= #include =0A= #include =0A= +#include =0A= +#include =0A= =0A= #include =0A= =0A= @@ -209,11 +211,11 @@=0A= #endif=0A= =0A= char *tmpfile =3D tempnam("/tmp", ".fam");=0A= -#ifdef HAVE_SOCKADDR_SUN_LEN=0A= - sockaddr_un sun =3D { sizeof(sockaddr_un), AF_UNIX, "" };=0A= -#else=0A= - sockaddr_un sun =3D { AF_UNIX, "" };=0A= -#endif=0A= + sockaddr_un sun;=0A= + memset(&sun, 0, sizeof(struct sockaddr_un));=0A= + sun.sun_family =3D AF_UNIX;=0A= + strcpy(sun.sun_path,"");=0A= +=0A= if(strlen(tmpfile) >=3D (sizeof(sun.sun_path) - 1))=0A= {=0A= Log::error("tmpnam() too long for sun_path (%d >=3D %d)!",=0A= @@ -283,11 +285,11 @@=0A= =0A= // Get the new socket.=0A= =0A= -#ifdef HAVE_SOCKADDR_SUN_LEN=0A= - struct sockaddr_un sun =3D { sizeof(sockaddr_un), AF_UNIX, "" = };=0A= -#else=0A= - struct sockaddr_un sun =3D { AF_UNIX, "" };=0A= -#endif=0A= + sockaddr_un sun;=0A= + memset(&sun, 0, sizeof(struct sockaddr_un));=0A= + sun.sun_family =3D AF_UNIX;=0A= + strcpy(sun.sun_path,"");=0A= +=0A= socklen_t sunlen =3D sizeof(sun);=0A= int client_fd =3D accept(ofd, (struct sockaddr *) &sun, = &sunlen);=0A= if (client_fd < 0)=0A= @@ -349,11 +351,10 @@=0A= void=0A= Listener::dirty_ugly_hack()=0A= {=0A= -#ifdef HAVE_SOCKADDR_SUN_LEN=0A= - static sockaddr_un sun =3D { sizeof (sockaddr_un), AF_UNIX, = "/tmp/.fam_socket" };=0A= -#else=0A= - static sockaddr_un sun =3D { AF_UNIX, "/tmp/.fam_socket" };=0A= -#endif=0A= + static sockaddr_un sun;=0A= + memset(&sun, 0, sizeof(struct sockaddr_un));=0A= + sun.sun_family =3D AF_UNIX;=0A= + strcpy(sun.sun_path, "/tmp/.fam_socket");=0A= =0A= int sock =3D socket(PF_UNIX, SOCK_STREAM, 0);=0A= if (sock < 0)=0A= Index: src/Log.c++=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/fam/fam/src/Log.c++,v=0A= retrieving revision 1.1=0A= diff -u -r1.1 Log.c++=0A= --- src/Log.c++ 4 Dec 2003 18:27:21 -0000 1.1=0A= +++ src/Log.c++ 6 Aug 2004 21:13:16 -0000=0A= @@ -28,9 +28,9 @@=0A= #include =0A= #include =0A= #include =0A= +#include =0A= #include =0A= #include =0A= -#include =0A= #include =0A= #include =0A= #ifdef HAVE_AUDIT=0A= Index: src/Makefile.am=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/fam/fam/src/Makefile.am,v=0A= retrieving revision 1.1=0A= diff -u -r1.1 Makefile.am=0A= --- src/Makefile.am 4 Dec 2003 18:31:05 -0000 1.1=0A= +++ src/Makefile.am 6 Aug 2004 21:13:16 -0000=0A= @@ -71,6 +71,8 @@=0A= main.c++ \=0A= timeval.c++ \=0A= timeval.h \=0A= + mntent_compat.c++ \=0A= + mntent.h \=0A= @MONITOR_FUNCS@.c++=0A= =0A= EXTRA_famd_SOURCES =3D IMonIrix.c++ IMonLinux.c++ IMonNone.c++=0A= Index: src/main.c++=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/fam/fam/src/main.c++,v=0A= retrieving revision 1.1=0A= diff -u -r1.1 main.c++=0A= --- src/main.c++ 4 Dec 2003 18:27:21 -0000 1.1=0A= +++ src/main.c++ 6 Aug 2004 21:13:16 -0000=0A= @@ -40,6 +40,7 @@=0A= #include "Cred.h"=0A= #include "Interest.h"=0A= =0A= +=0A= const char *program_name;=0A= =0A= // These are options which are read from the configuration file & = the=0A= @@ -84,7 +85,7 @@=0A= "fam, version %s\n"=0A= "Use: %s [ -f | -d | -v ] [ -l | -t seconds ] [ -T seconds ] = \\\n"=0A= "\t\t\t\t[ -p prog.vers ] [ -L ] [ -c config_file ] [-C]\n",=0A= - VERSION, program_name);=0A= + PACKAGE_VERSION, program_name);=0A= fprintf(stderr, "\t-f\t\tstay in foreground\n");=0A= fprintf(stderr, "\t-d\t\tdebug\n");=0A= fprintf(stderr, "\t-v\t\tverbose\n");=0A= ------_=_NextPart_000_01C47C01.CC37FF90 Content-Type: application/octet-stream; name="configuration.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="configuration.patch" Index: configure.ac=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/fam/fam/configure.ac,v=0A= retrieving revision 1.1=0A= diff -u -r1.1 configure.ac=0A= --- configure.ac 4 Dec 2003 18:27:18 -0000 1.1=0A= +++ configure.ac 6 Aug 2004 21:37:50 -0000=0A= @@ -4,9 +4,9 @@=0A= # Initialization of autoconf.=0A= AC_PREREQ(2.57)=0A= AC_INIT(fam, 2.7.0, fam@oss.sgi.com)=0A= -AM_INIT_AUTOMAKE=0A= +AM_INIT_AUTOMAKE(fam, 2.7.0, fam@oss.sgi.com)=0A= dnl AC_CONFIG_SRCDIR([acconfig.h])=0A= -AM_CONFIG_HEADER([config.h])=0A= +AM_CONFIG_HEADER(config.h)=0A= AC_LANG(C++)=0A= =0A= # Variables used by the FAM source.=0A= @@ -31,7 +31,7 @@=0A= # Checks for header files.=0A= AC_HEADER_STDC=0A= AC_HEADER_DIRENT=0A= -AC_CHECK_HEADERS([fcntl.h limits.h linux/imon.h netinet/in.h rpc/rpc.h = rpcsvc/mount.h stddef.h stdlib.h string.h syslog.h sys/imon.h = sys/param.h sys/select.h sys/statvfs.h sys/syssgi.h sys/time.h = sys/types.h sys/un.h unistd.h])=0A= +AC_CHECK_HEADERS([fcntl.h limits.h linux/imon.h mntent.h netinet/in.h = rpc/rpc.h rpcsvc/mount.h stddef.h stdlib.h string.h syslog.h sys/imon.h = sys/param.h sys/select.h sys/statvfs.h sys/sysmacros.h sys/syssgi.h = sys/time.h sys/types.h sys/un.h unistd.h ])=0A= =0A= if test "$have_sys_imon_h"; then=0A= MONITOR_FUNCS=3DIMonIRIX=0A= Index: config.h.in=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/fam/fam/config.h.in,v=0A= retrieving revision 1.2=0A= diff -u -r1.2 config.h.in=0A= --- config.h.in 4 Dec 2003 18:27:18 -0000 1.2=0A= +++ config.h.in 6 Aug 2004 21:37:50 -0000=0A= @@ -37,6 +144,9 @@=0A= /* Define to 1 if you have the header file. */=0A= #undef HAVE_MEMORY_H=0A= =0A= +/* Define to 1 if you have the header file. */=0A= +#undef HAVE_MNTENT_H=0A= +=0A= /* Define to 1 if you have the header file, and it defines = `DIR'. */=0A= #undef HAVE_NDIR_H=0A= =0A= @@ -105,6 +215,9 @@=0A= /* Define to 1 if you have the header file. */=0A= #undef HAVE_SYS_STAT_H=0A= =0A= +/* Define to 1 if you have the header file. */=0A= +#undef HAVE_SYS_SYSMACROS_H=0A= +=0A= /* Define to 1 if you have the header file. */=0A= #undef HAVE_SYS_SYSSGI_H=0A= =0A= ------_=_NextPart_000_01C47C01.CC37FF90 Content-Type: application/octet-stream; name="mntent-include-fix.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="mntent-include-fix.patch" Index: FileSystem.c++=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/fam/fam/src/FileSystem.c++,v=0A= retrieving revision 1.1=0A= diff -u -r1.1 FileSystem.c++=0A= --- FileSystem.c++ 4 Dec 2003 18:27:21 -0000 1.1=0A= +++ FileSystem.c++ 6 Aug 2004 21:54:06 -0000=0A= @@ -22,7 +22,7 @@=0A= =0A= #include "FileSystem.h"=0A= =0A= -#include =0A= +#include "mntent_compat.h"=0A= #include =0A= =0A= #include "Event.h"=0A= Index: FileSystemTable.c++=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/fam/fam/src/FileSystemTable.c++,v=0A= retrieving revision 1.1=0A= diff -u -r1.1 FileSystemTable.c++=0A= --- FileSystemTable.c++ 4 Dec 2003 18:27:21 -0000 1.1=0A= +++ FileSystemTable.c++ 6 Aug 2004 21:54:06 -0000=0A= @@ -23,7 +23,7 @@=0A= #include =0A= #include "FileSystemTable.h"=0A= =0A= -#include =0A= +#include "mntent_compat.h"=0A= #include =0A= #include =0A= =0A= Index: NFSFileSystem.c++=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/fam/fam/src/NFSFileSystem.c++,v=0A= retrieving revision 1.1=0A= diff -u -r1.1 NFSFileSystem.c++=0A= --- NFSFileSystem.c++ 4 Dec 2003 18:27:21 -0000 1.1=0A= +++ NFSFileSystem.c++ 6 Aug 2004 21:54:06 -0000=0A= @@ -24,7 +24,7 @@=0A= #include "NFSFileSystem.h"=0A= =0A= #include =0A= -#include =0A= +#include "mntent_compat.h"=0A= #include =0A= #include =0A= #include =0A= ------_=_NextPart_000_01C47C01.CC37FF90 Content-Type: application/octet-stream; name="mntent_compat.h" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="mntent_compat.h" /* -*-C++-*-=0A= =0A= mntent.h=0A= =0A= Copyright (C) 2002 Alan Eldridge=0A= =0A= This program is free software; you can redistribute it and/or = modify=0A= it under the terms of the GNU General Public License as published = by=0A= the Free Software Foundation; either version 2, or (at your = option)=0A= any later version.=0A= =0A= This program is distributed in the hope that it will be useful,=0A= but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the=0A= GNU General Public License for more details.=0A= =0A= You should have received a copy of the GNU General Public License=0A= along with this program; if not, write to the Free Software = Foundation,=0A= Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. =0A= =0A= $Id$=0A= =0A= 2002/09/08 alane@geeksrus.net=0A= */=0A= =0A= #ifdef HAVE_MNTENT_H=0A= #include =0A= #else=0A= =0A= #ifndef mntent_h_=0A= #define mntent_h_=0A= =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= =0A= #define MOUNTED "dummy"=0A= #define MNTTYPE_NFS "nfs"=0A= =0A= const int MOPTSLEN (256 - (MNAMELEN * 2 + MFSNAMELEN + 2 * = sizeof(int)));=0A= =0A= struct mntent {=0A= public: =0A= char mnt_fsname[ MNAMELEN ];=0A= char mnt_dir[ MNAMELEN ];=0A= char mnt_type[ MFSNAMELEN ];=0A= char mnt_opts[ MOPTSLEN ];=0A= int mnt_freq, mnt_passno;=0A= private:=0A= void clear();=0A= public:=0A= mntent() {=0A= clear();=0A= }=0A= struct mntent *from_statfs(struct statfs *pst);=0A= };=0A= =0A= FILE *setmntent(const char *szfn, char *szrw);=0A= struct mntent *getmntent(FILE *pf);=0A= char *hasmntopt(const struct mntent *pmnt, const char *szopt);=0A= int endmntent(FILE *pf);=0A= =0A= #endif /* mntent_h_ */=0A= #endif /* not HAVE_MNTENT_H */=0A= =0A= ------_=_NextPart_000_01C47C01.CC37FF90 Content-Type: application/octet-stream; name="mntent_compat.c++" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="mntent_compat.c++" /* -*-C++-*-=0A= =0A= mntent.c++=0A= =0A= Copyright (C) 2002 Alan Eldridge=0A= =0A= This program is free software; you can redistribute it and/or = modify=0A= it under the terms of the GNU General Public License as published = by=0A= the Free Software Foundation; either version 2, or (at your = option)=0A= any later version.=0A= =0A= This program is distributed in the hope that it will be useful,=0A= but WITHOUT ANY WARRANTY; without even the implied warranty of=0A= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the=0A= GNU General Public License for more details.=0A= =0A= You should have received a copy of the GNU General Public License=0A= along with this program; if not, write to the Free Software = Foundation,=0A= Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. =0A= =0A= $Id: mntent_compat.cc,v 1.3 2002/09/08 18:42:20 alane Exp $=0A= =0A= 2002/09/08 alane@geeksrus.net=0A= */=0A= =0A= #include "config.h"=0A= #ifndef HAVE_MNTENT_H=0A= =0A= #include "mntent_compat.h"=0A= =0A= #include =0A= =0A= // globals (yuck, but easier for debugging)=0A= =0A= mntent G_mntent;=0A= int G_mntpos;=0A= int G_mntsize;=0A= bool G_mntfOpen =3D false;=0A= struct statfs *G_pmntstat =3D 0;=0A= =0A= // map option flags to names=0A= =0A= struct optmap {=0A= int fl;=0A= std::string st;=0A= };=0A= =0A= static struct optmap omap[] =3D {=0A= { MNT_SYNCHRONOUS, "sync" },=0A= { MNT_NOEXEC, "noexec" },=0A= { MNT_NOSUID, "nosuid" },=0A= { MNT_NODEV, "nodev" },=0A= { MNT_UNION, "union" },=0A= { MNT_ASYNC, "async" },=0A= { MNT_NOATIME, "noatime" },=0A= { MNT_NOCLUSTERR, "noclusterr" },=0A= { MNT_NOCLUSTERW, "noclusterw" },=0A= { MNT_NOSYMFOLLOW, "nosymfollow" },=0A= { MNT_SUIDDIR, "suiddir" },=0A= { 0, "noop" }=0A= };=0A= =0A= // zap everything for clarity=0A= =0A= void=0A= mntent::clear()=0A= {=0A= memset(mnt_fsname, 0, sizeof(mnt_fsname));=0A= memset(mnt_dir, 0, sizeof(mnt_dir));=0A= memset(mnt_type, 0, sizeof(mnt_type));=0A= memset(mnt_opts, 0, sizeof(mnt_opts));=0A= mnt_freq =3D mnt_passno =3D 0;=0A= }=0A= =0A= // fake it from a statfs struct=0A= =0A= mntent *=0A= mntent::from_statfs(struct statfs *pst)=0A= {=0A= =0A= clear();=0A= strcpy(mnt_fsname, pst->f_mntfromname);=0A= strcpy(mnt_dir, pst->f_mntonname);=0A= strcpy(mnt_type, pst->f_fstypename);=0A= mnt_freq =3D mnt_passno =3D 0;=0A= =0A= std::string opts;=0A= int fl =3D pst->f_flags;=0A= =0A= opts +=3D (fl & MNT_RDONLY) ? "ro" : "rw";=0A= for (optmap *pmp =3D omap; pmp->fl !=3D 0; pmp++) {=0A= if ((fl & pmp->fl) !=3D 0) {=0A= opts +=3D (" " + pmp->st);=0A= }=0A= }=0A= strcpy(mnt_opts, opts.c_str());=0A= =0A= return this;=0A= }=0A= =0A= // "rewind" the mtab file =0A= =0A= FILE *=0A= setmntent(const char *, char *)=0A= {=0A= if (!G_mntfOpen) {=0A= G_mntfOpen =3D true;=0A= }=0A= =0A= G_mntpos =3D 0;=0A= G_mntsize =3D getmntinfo(&G_pmntstat, MNT_NOWAIT);=0A= =0A= return reinterpret_cast(1);=0A= }=0A= =0A= // return ptr to opt string if present=0A= =0A= char *=0A= hasmntopt(const mntent *pmnt, const char *szopt)=0A= {=0A= std::string opt(szopt);=0A= std::string mntopts(pmnt->mnt_opts);=0A= =0A= std::string::size_type pos =3D mntopts.find(opt);=0A= const char *szret =3D (pos =3D=3D std::string::npos) ? "" : = pmnt->mnt_opts + pos;=0A= =0A= return const_cast(szret);=0A= }=0A= =0A= // get next mntent until all gone, then return 0=0A= =0A= struct mntent *=0A= getmntent(FILE *)=0A= {=0A= if (!G_mntfOpen) {=0A= return 0;=0A= } else if (G_mntpos < G_mntsize) {=0A= return G_mntent.from_statfs(G_pmntstat + G_mntpos++);=0A= } else {=0A= G_mntfOpen =3D false;=0A= return 0;=0A= }=0A= }=0A= =0A= // "close" the mtab file=0A= =0A= int =0A= endmntent(FILE *)=0A= {=0A= G_mntfOpen =3D false;=0A= return 0;=0A= }=0A= =0A= #endif /* ifndef HAVE_MNTENT_H */=0A= =0A= ------_=_NextPart_000_01C47C01.CC37FF90-- From kalou@kalou.net Fri Aug 6 15:44:41 2004 Received: with ECARTIS (v1.0.0; list fam); Fri, 06 Aug 2004 15:44:45 -0700 (PDT) Received: from Olivier-Kaloudoffs-Computer.local ([80.119.4.134]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i76MieIR003286 for ; Fri, 6 Aug 2004 15:44:40 -0700 Received: by Olivier-Kaloudoffs-Computer.local (Postfix, from userid 508) id 3EAFDBDA650; Sat, 7 Aug 2004 00:44:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by Olivier-Kaloudoffs-Computer.local (Postfix) with ESMTP id 2146EBDA64B for ; Sat, 7 Aug 2004 00:44:28 +0200 (CEST) Date: Sat, 7 Aug 2004 00:44:27 +0200 (CEST) From: Olivier Kaloudoff X-X-Sender: ikal@olivier-kaloudoffs-computer.local To: fam@oss.sgi.com Subject: Re: patches to 2.7.0 codebase Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-archive-position: 277 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: kalou@kalou.net Precedence: bulk X-list: fam On Fri, 6 Aug 2004, Viner, David wrote: > hi, Hi David, > I'm working on making the fam source compile on freebsd. here are a few > patches that help make this work. It seems to be nice stuff :) (...) > using these patches (and new files), I was able to compile on FreeBSD 4 > machine using the following version of ports That's really cool, can you tell us more about the license for these patches ? There were previous mntent patches without the right license, which could not be included in the main source tree, what about this one ? To give you feedback, I should be able to try a compile in a few days on Mac OSX 10.3.4 . Best Regards, Olivier From dviner@yahoo-inc.com Mon Aug 9 09:31:54 2004 Received: with ECARTIS (v1.0.0; list fam); Mon, 09 Aug 2004 09:32:00 -0700 (PDT) Received: from penxng.smca.yahoo.com (penxng.smca.yahoo.com [204.119.24.188]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i79GVsP3024959 for ; Mon, 9 Aug 2004 09:31:54 -0700 Received: by penxng.smca.yahoo.com with Internet Mail Service (5.5.2656.59) id ; Mon, 9 Aug 2004 09:28:40 -0700 Message-ID: <263A1F717ECDED40AA969F98D1CF122E063ED0CD@penxng.smca.yahoo.com> From: "Viner, David" To: fam@oss.sgi.com Subject: RE: patches to 2.7.0 codebase Date: Mon, 9 Aug 2004 09:28:39 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain X-archive-position: 278 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: dviner@yahoo-inc.com Precedence: bulk X-list: fam Hi, I've spoken with the folks who wrote the original versions of this patch, and they are willing to incorporate these patches into the mainline codebase. A quick glance at the other header files in src/ subdir shows that they all are licensed under the GPL. So, I think these new files are fine as they are licensed under the GPL as well. dave -----Original Message----- From: Olivier Kaloudoff [mailto:kalou@kalou.net] Sent: Friday, August 06, 2004 3:44 PM To: fam@oss.sgi.com Subject: Re: patches to 2.7.0 codebase On Fri, 6 Aug 2004, Viner, David wrote: > hi, Hi David, > I'm working on making the fam source compile on freebsd. here are a few > patches that help make this work. It seems to be nice stuff :) (...) > using these patches (and new files), I was able to compile on FreeBSD 4 > machine using the following version of ports That's really cool, can you tell us more about the license for these patches ? There were previous mntent patches without the right license, which could not be included in the main source tree, what about this one ? To give you feedback, I should be able to try a compile in a few days on Mac OSX 10.3.4 . Best Regards, Olivier From dviner@yahoo-inc.com Tue Aug 10 11:53:53 2004 Received: with ECARTIS (v1.0.0; list fam); Tue, 10 Aug 2004 11:53:58 -0700 (PDT) Received: from penxng.smca.yahoo.com (penxng.smca.yahoo.com [204.119.24.188]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id i7AIrrx0008654 for ; Tue, 10 Aug 2004 11:53:53 -0700 Received: by penxng.smca.yahoo.com with Internet Mail Service (5.5.2656.59) id ; Tue, 10 Aug 2004 11:50:37 -0700 Message-ID: <263A1F717ECDED40AA969F98D1CF122E063ED0F2@penxng.smca.yahoo.com> From: "Viner, David" To: fam@oss.sgi.com Subject: can we remove acconfig.h? Date: Tue, 10 Aug 2004 11:50:36 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain X-archive-position: 279 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: dviner@yahoo-inc.com Precedence: bulk X-list: fam Hi all, I'm definitely not an expert in automake/autoconf stuff, but it looks to me like the code in source forge doesn't use the acconfig.h at all. http://cvs.sourceforge.net/viewcvs.py/fam/fam/configure.ac?annotate=1.1#8 this line (#8) looks to me like it comments out the only usage of acconfig.h my understanding of acconfig.h is that it is meant to generate config.h.in. That is, autoheader will use /usr/local/share/autoconf/acconfig.h (or other appropriate location) as the basis for the new config.h.in. It will scan configure.ac looking for things to define, and then it will append anything in acconfig.h to the end of the new config.h.in. since we seem to be maintaining config.h.in directly, is there any purpose in maintaining acconfig.h as well? thanks dave From benadler@gmx.net Sat Aug 14 15:05:24 2004 Received: with ECARTIS (v1.0.0; list fam); Sat, 14 Aug 2004 15:05:29 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by oss.sgi.com (8.13.0/8.13.0) with SMTP id i7EM5Nvn024809 for ; Sat, 14 Aug 2004 15:05:23 -0700 Received: (qmail 2931 invoked by uid 65534); 14 Aug 2004 22:05:11 -0000 Received: from pop13-188.catv.wtnet.de (EHLO petterson) (213.209.124.189) by mail.gmx.net (mp020) with SMTP; 15 Aug 2004 00:05:11 +0200 X-Authenticated: #151891 From: Benjamin Adler To: fam@oss.sgi.com Subject: fam questions Date: Sun, 15 Aug 2004 00:05:20 +0200 User-Agent: KMail/1.6.82 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200408150005.20685.benadler@gmx.net> X-archive-position: 280 X-ecartis-version: Ecartis v1.0.0 Sender: fam-bounce@oss.sgi.com Errors-to: fam-bounce@oss.sgi.com X-original-sender: benadler@gmx.net Precedence: bulk X-list: fam Hi! I'm trying to build a KDE app that will have to watch a complete directory tree and wants to be informed of any changes in that tree. After realizing KDirWatch is not really everything I need, I have a few questions: When famd is running and I tell KDirWatch to recursively monitor /tmp and create the file /tmp/foo.txt, I get a notification. When I create the file /tmp/foo/bar.txt, I get no notification, so its not recursive. When famd is not running, the notifications are faster, but not recursive either and they only contain the directory of the changed file, not even the filename. Why is that? There was no entry named either dnotify or imon in my gentoo 2.6.7 kernel. Which of these two is currently in the kernel, and whats is available as a patch for linux 2.6? How can I find out what fam is using to get the notifications? "famd -f -d -v" doesn't help. What do I need for KDirWatch to reliably and recursively deliver a notification of a changed file/directory in the tree? While reading up on fam, I got the impression that noone is really satisfied with how fam/dnotify/imon work. If I understood correctly, it cannot easily watch directories recursively, it cannot watch large numbers of files/directories, it cannot send ONE event AFTER a file has changed but always sends multiple events WHILE a file is being written to, it makes unmounting a watched directory difficult etc. Is there any effort underway to fix these flaws? thank you! Ben Adler