diff options
author | Marinus Schraal <foser@gentoo.org> | 2006-03-10 13:53:11 +0000 |
---|---|---|
committer | Marinus Schraal <foser@gentoo.org> | 2006-03-10 13:53:11 +0000 |
commit | 1f5295bd84956ddf2627cf79001ccfd2fd03a045 (patch) | |
tree | 725be529224990b354e2281ba21c050f35897cf4 /app-admin/fam | |
parent | Version bump (#125464). Fix compile warnings and CFLAGS. (diff) | |
download | historical-1f5295bd84956ddf2627cf79001ccfd2fd03a045.tar.gz historical-1f5295bd84956ddf2627cf79001ccfd2fd03a045.tar.bz2 historical-1f5295bd84956ddf2627cf79001ccfd2fd03a045.zip |
remove old versions and large patch (#123634)
Package-Manager: portage-2.1_pre4-r1
Diffstat (limited to 'app-admin/fam')
-rw-r--r-- | app-admin/fam/Manifest | 37 | ||||
-rw-r--r-- | app-admin/fam/fam-2.7.0-r1.ebuild | 75 | ||||
-rw-r--r-- | app-admin/fam/fam-2.7.0-r2.ebuild | 79 | ||||
-rw-r--r-- | app-admin/fam/fam-2.7.0-r3.ebuild | 83 | ||||
-rw-r--r-- | app-admin/fam/fam-2.7.0.ebuild | 67 | ||||
-rw-r--r-- | app-admin/fam/files/digest-fam-2.7.0 | 1 | ||||
-rw-r--r-- | app-admin/fam/files/digest-fam-2.7.0-r1 | 1 | ||||
-rw-r--r-- | app-admin/fam/files/digest-fam-2.7.0-r2 | 1 | ||||
-rw-r--r-- | app-admin/fam/files/digest-fam-2.7.0-r3 | 1 | ||||
-rw-r--r-- | app-admin/fam/files/fam-2.7.0-dnotify.patch | 975 |
10 files changed, 0 insertions, 1320 deletions
diff --git a/app-admin/fam/Manifest b/app-admin/fam/Manifest index d98c7a5ddcfe..94b9bf01c02e 100644 --- a/app-admin/fam/Manifest +++ b/app-admin/fam/Manifest @@ -1,42 +1,12 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - MD5 dcd68bccebff81a748c29ebb44e2ab5b ChangeLog 9240 RMD160 c323eef4b7db1ac489fbbb08b1dc9f7c5a483135 ChangeLog 9240 SHA256 f12c74450fbaaeb0f8b328fbe1e0a0df9e54f8533605e6ad62cb71d9dae7e70d ChangeLog 9240 -MD5 a23feab85a6a00218b5804e3b2827f33 fam-2.7.0-r1.ebuild 2086 -RMD160 9abe11c55775e5c25cd942740c584728729d8d41 fam-2.7.0-r1.ebuild 2086 -SHA256 13e139e7a208f9fb4b52deff081bf1d168cdeb8284dcfbf36f398a68fd6a6065 fam-2.7.0-r1.ebuild 2086 -MD5 4afdfca5a280bbf47fd9c78161ee2ea8 fam-2.7.0-r2.ebuild 2108 -RMD160 bb122c67a79e0a6e48510a16f7bf859016145565 fam-2.7.0-r2.ebuild 2108 -SHA256 cb7a3e32995bdddd9361f313ffd0d2d48a29b7ac8ce3ac5f3fdf57d07f25f48f fam-2.7.0-r2.ebuild 2108 -MD5 f9cee5e3d759df412507b01928327dd8 fam-2.7.0-r3.ebuild 2190 -RMD160 0600c01da39c5c87ecb5ec59f175927d97548a89 fam-2.7.0-r3.ebuild 2190 -SHA256 4985479f67da9af15d32413e98460774eca82eb08e945956983526274a3acba7 fam-2.7.0-r3.ebuild 2190 MD5 b2e57532d3263061eb9728a528ca5d79 fam-2.7.0-r4.ebuild 2342 RMD160 8a92aacd35e85a6a69f45b100fb3f98dc2f80b41 fam-2.7.0-r4.ebuild 2342 SHA256 77ccd498e410b174b2df981b69685ba29336eb1ec9ba08a7d5010aa70006fe47 fam-2.7.0-r4.ebuild 2342 -MD5 067a8c7dc9a851716d40256fe989928c fam-2.7.0.ebuild 1924 -RMD160 8dbb647b7db044eada968cafcfe208a272405c7f fam-2.7.0.ebuild 1924 -SHA256 58d6f78908ae054ee82ed795126bbaf44db730f2bed40747e6f22973313ff667 fam-2.7.0.ebuild 1924 -MD5 a7434bbb78ba9e735212e8b1e5bb0a0f files/digest-fam-2.7.0 61 -RMD160 737259b260f8343471f21fe6301090f30363ffee files/digest-fam-2.7.0 61 -SHA256 a33125727837d0e4b8e32a13ec5db658c76adec6c40038663dfa44e7e94d2b31 files/digest-fam-2.7.0 61 -MD5 a7434bbb78ba9e735212e8b1e5bb0a0f files/digest-fam-2.7.0-r1 61 -RMD160 737259b260f8343471f21fe6301090f30363ffee files/digest-fam-2.7.0-r1 61 -SHA256 a33125727837d0e4b8e32a13ec5db658c76adec6c40038663dfa44e7e94d2b31 files/digest-fam-2.7.0-r1 61 -MD5 a7434bbb78ba9e735212e8b1e5bb0a0f files/digest-fam-2.7.0-r2 61 -RMD160 737259b260f8343471f21fe6301090f30363ffee files/digest-fam-2.7.0-r2 61 -SHA256 a33125727837d0e4b8e32a13ec5db658c76adec6c40038663dfa44e7e94d2b31 files/digest-fam-2.7.0-r2 61 -MD5 a7434bbb78ba9e735212e8b1e5bb0a0f files/digest-fam-2.7.0-r3 61 -RMD160 737259b260f8343471f21fe6301090f30363ffee files/digest-fam-2.7.0-r3 61 -SHA256 a33125727837d0e4b8e32a13ec5db658c76adec6c40038663dfa44e7e94d2b31 files/digest-fam-2.7.0-r3 61 MD5 e70eb4d8ddb0a9ab5f670edb44717e79 files/digest-fam-2.7.0-r4 128 RMD160 6bdd7cb303be3fad677823045928d2fc6bab36c4 files/digest-fam-2.7.0-r4 128 SHA256 de895b409efdc77f2225989a163d62be1fc69b8ef532905029edba9c29b90346 files/digest-fam-2.7.0-r4 128 -MD5 46e90fb6975cfcaa7f5946ab36aa2023 files/fam-2.7.0-dnotify.patch 26419 -RMD160 e30e8fc0090af026951316218223fd322f3dc690 files/fam-2.7.0-dnotify.patch 26419 -SHA256 8d0bc57a587bd374ff1ad5c75852dc655b71a2cd9cb355f0abdeb882ae7aed4c files/fam-2.7.0-dnotify.patch 26419 MD5 8c541d3766c6671c15c8cad4d6ef671b files/fam-2.7.0-gcc41.patch 724 RMD160 a10d46759952e51ccbdcd50e0d3a109e2bf93fda files/fam-2.7.0-gcc41.patch 724 SHA256 cad37a5a6b756b1c2b536f1b8dc9b73abf97f0d6cf98f50e15e8003001270043 files/fam-2.7.0-gcc41.patch 724 @@ -52,10 +22,3 @@ SHA256 1ce8019d276ef5f9ddaa38d0fc0eff12f66934eea21931b1f98ad8bcafc22bd9 files/fa MD5 68a04e23ccfb7971cff8ce012aee659c metadata.xml 221 RMD160 71f7378b604618cc82dd25cf498259ca9e971437 metadata.xml 221 SHA256 f5caf0a487300525ba716466e1fffb0d9ab526e3c6477d61db48f7e7d84612d0 metadata.xml 221 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.2.1 (GNU/Linux) - -iD8DBQFECmB12+ySkm8kpY0RAgs2AJ927lTdXu8OyRKK5WONK5n0UxxYNACdFqo+ -3WAPPLr2P2jXDd47OFfTzGs= -=iwNP ------END PGP SIGNATURE----- diff --git a/app-admin/fam/fam-2.7.0-r1.ebuild b/app-admin/fam/fam-2.7.0-r1.ebuild deleted file mode 100644 index 79018ffe0a87..000000000000 --- a/app-admin/fam/fam-2.7.0-r1.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/fam/fam-2.7.0-r1.ebuild,v 1.13 2005/01/01 10:58:49 eradicator Exp $ - -inherit libtool eutils gnuconfig - -DESCRIPTION="FAM, the File Alteration Monitor" -HOMEPAGE="http://oss.sgi.com/projects/fam/" -SRC_URI="ftp://oss.sgi.com/projects/fam/download/stable/${P}.tar.gz" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -KEYWORDS="~alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sparc ~x86" -IUSE="" - -DEPEND=">=net-nds/portmap-5b-r6" - -PROVIDE="virtual/fam" - -src_unpack() { - unpack ${A} - - cd ${S} - # dnotify patch #43027 - epatch ${FILESDIR}/${P}-dnotify.patch - - # Fix permission problems with user* in FEATURES (#35307) - chmod u+w ${S}/configure - - # Please do not remove this again - fixes $S and $D in libtool linker - # scripts (.la files) - cd ${S}; elibtoolize -} - -src_compile() { - gnuconfig_update - econf || die "econf failed" - emake || die "emake failed" -} - -src_install() { - make install DESTDIR="${D}" || die - - dosed "s:local_only = false:local_only = true:g" conf/fam.conf - - exeinto /etc/init.d - doexe ${FILESDIR}/famd - - dodoc AUTHORS ChangeLog INSTALL NEWS TODO README -} - -pkg_postinst() { - einfo "To enable fam on boot you will have to add it to the" - einfo "default profile, issue the following command as root to do so." - echo - einfo "rc-update add famd default" - - # temporary warning for people upgrading - # 6-12-03 foser <foser@gentoo.org> - echo - echo - ewarn "IMPORTANT INFO FOR USERS UPGRADING FROM OLDER (<2.7.0) FAM VERSIONS :" - echo - einfo "With the 2.7.0 version the fam daemon moved to sbin and was" - einfo "renamed from 'fam' to 'famd'. These changes are for consistency" - einfo "reasons also applied to the Gentoo init script. This means you" - einfo "will have to remove fam from the default runlevel and add famd." - einfo "This can be done by issueing the following commands :" - echo - einfo "rc-update del fam" - einfo "rc-update add famd default" - einfo "rm /etc/init.d/fam" - echo - einfo "The last command removes the old init script." -} diff --git a/app-admin/fam/fam-2.7.0-r2.ebuild b/app-admin/fam/fam-2.7.0-r2.ebuild deleted file mode 100644 index 7c6b39582b74..000000000000 --- a/app-admin/fam/fam-2.7.0-r2.ebuild +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/fam/fam-2.7.0-r2.ebuild,v 1.15 2005/12/16 10:45:39 flameeyes Exp $ - -inherit libtool eutils gnuconfig - -DESCRIPTION="FAM, the File Alteration Monitor" -HOMEPAGE="http://oss.sgi.com/projects/fam/" -SRC_URI="ftp://oss.sgi.com/projects/fam/download/stable/${P}.tar.gz" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sh sparc x86" -IUSE="" - -DEPEND=">=net-nds/portmap-5b-r6 - !app-admin/gamin" -PROVIDE="virtual/fam" - -src_unpack() { - unpack ${A} - - cd ${S} - # dnotify patch #43027 - epatch ${FILESDIR}/${P}-dnotify.patch - - # Fix permission problems with user* in FEATURES (#35307) - chmod u+w ${S}/configure - - gnuconfig_update - libtoolize --copy --force - - # Please do not remove this again - fixes $S and $D in libtool linker - # scripts (.la files) - cd ${S}; elibtoolize -} - -src_install() { - - make install DESTDIR="${D}" || die - - dosed "s:local_only = false:local_only = true:g" /etc/fam.conf - - exeinto /etc/init.d - doexe ${FILESDIR}/famd - - dodoc AUTHORS ChangeLog INSTALL NEWS TODO README - -} - -pkg_postinst() { - - einfo "To enable fam on boot you will have to add it to the" - einfo "default profile, issue the following command as root to do so." - echo - einfo "rc-update add famd default" - - # temporary warning for people upgrading - # 6-12-03 foser <foser@gentoo.org> - if [ -e /etc/init.d/fam ] - then - echo - echo - ewarn "IMPORTANT INFO FOR USERS UPGRADING FROM OLDER (<2.7.0) FAM VERSIONS :" - echo - einfo "With the 2.7.0 version the fam daemon moved to sbin and was" - einfo "renamed from 'fam' to 'famd'. These changes are for consistency" - einfo "reasons also applied to the Gentoo init script. This means you" - einfo "will have to remove fam from the default runlevel and add famd." - einfo "This can be done by issueing the following commands :" - echo - einfo "rc-update del fam" - einfo "rc-update add famd default" - einfo "rm /etc/init.d/fam" - echo - einfo "The last command removes the old init script." - fi - -} diff --git a/app-admin/fam/fam-2.7.0-r3.ebuild b/app-admin/fam/fam-2.7.0-r3.ebuild deleted file mode 100644 index f1ae07c20079..000000000000 --- a/app-admin/fam/fam-2.7.0-r3.ebuild +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/fam/fam-2.7.0-r3.ebuild,v 1.3 2005/12/16 10:45:39 flameeyes Exp $ - -inherit libtool eutils gnuconfig - -DESCRIPTION="FAM, the File Alteration Monitor" -HOMEPAGE="http://oss.sgi.com/projects/fam/" -SRC_URI="ftp://oss.sgi.com/projects/fam/download/stable/${P}.tar.gz" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="" - -DEPEND=">=net-nds/portmap-5b-r6 - !app-admin/gamin" -PROVIDE="virtual/fam" - -src_unpack() { - unpack ${A} - - cd ${S} - - # large file patch #76679 - epatch ${FILESDIR}/${P}-largefiles.patch - - # dnotify patch #43027 - epatch ${FILESDIR}/${P}-dnotify.patch - - # Fix permission problems with user* in FEATURES (#35307) - chmod u+w ${S}/configure - - gnuconfig_update - libtoolize --copy --force - - # Please do not remove this again - fixes $S and $D in libtool linker - # scripts (.la files) - cd ${S}; elibtoolize -} - -src_install() { - - make install DESTDIR="${D}" || die - - dosed "s:local_only = false:local_only = true:g" /etc/fam.conf - - exeinto /etc/init.d - doexe ${FILESDIR}/famd - - dodoc AUTHORS ChangeLog INSTALL NEWS TODO README - -} - -pkg_postinst() { - - einfo "To enable fam on boot you will have to add it to the" - einfo "default profile, issue the following command as root to do so." - echo - einfo "rc-update add famd default" - - # temporary warning for people upgrading - # 6-12-03 foser <foser@gentoo.org> - if [ -e /etc/init.d/fam ] - then - echo - echo - ewarn "IMPORTANT INFO FOR USERS UPGRADING FROM OLDER (<2.7.0) FAM VERSIONS :" - echo - einfo "With the 2.7.0 version the fam daemon moved to sbin and was" - einfo "renamed from 'fam' to 'famd'. These changes are for consistency" - einfo "reasons also applied to the Gentoo init script. This means you" - einfo "will have to remove fam from the default runlevel and add famd." - einfo "This can be done by issueing the following commands :" - echo - einfo "rc-update del fam" - einfo "rc-update add famd default" - einfo "rm /etc/init.d/fam" - echo - einfo "The last command removes the old init script." - fi - -} diff --git a/app-admin/fam/fam-2.7.0.ebuild b/app-admin/fam/fam-2.7.0.ebuild deleted file mode 100644 index 5d84b3ca24b5..000000000000 --- a/app-admin/fam/fam-2.7.0.ebuild +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/fam/fam-2.7.0.ebuild,v 1.22 2005/01/01 10:58:49 eradicator Exp $ - -inherit libtool eutils gnuconfig - -DESCRIPTION="FAM, the File Alteration Monitor" -HOMEPAGE="http://oss.sgi.com/projects/fam/" -SRC_URI="ftp://oss.sgi.com/projects/fam/download/stable/${P}.tar.gz" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 mips ppc s390 sparc x86" -IUSE="" - -DEPEND=">=net-nds/portmap-5b-r6" - -PROVIDE="virtual/fam" - -src_unpack() { - unpack ${A} - - # Fix permission problems with user* in FEATURES (#35307) - chmod u+w ${S}/configure - - # Please do not remove this again - fixes $S and $D in libtool linker - # scripts (.la files) - cd ${S}; elibtoolize - - gnuconfig_update -} - -src_install() { - make install DESTDIR="${D}" || die - - dosed "s:local_only = false:local_only = true:g" conf/fam.conf - - exeinto /etc/init.d - doexe ${FILESDIR}/famd - - dodoc AUTHORS ChangeLog INSTALL NEWS TODO README -} - -pkg_postinst() { - einfo "To enable fam on boot you will have to add it to the" - einfo "default profile, issue the following command as root to do so." - echo - einfo "rc-update add famd default" - - # temporary warning for people upgrading - # 6-12-03 foser <foser@gentoo.org> - echo - echo - ewarn "IMPORTANT INFO FOR USERS UPGRADING FROM OLDER (<2.7.0) FAM VERSIONS :" - echo - einfo "With the 2.7.0 version the fam daemon moved to sbin and was" - einfo "renamed from 'fam' to 'famd'. These changes are for consistency" - einfo "reasons also applied to the Gentoo init script. This means you" - einfo "will have to remove fam from the default runlevel and add famd." - einfo "This can be done by issueing the following commands :" - echo - einfo "rc-update del fam" - einfo "rc-update add famd default" - einfo "rm /etc/init.d/fam" - echo - einfo "The last command removes the old init script." -} diff --git a/app-admin/fam/files/digest-fam-2.7.0 b/app-admin/fam/files/digest-fam-2.7.0 deleted file mode 100644 index 107b73637116..000000000000 --- a/app-admin/fam/files/digest-fam-2.7.0 +++ /dev/null @@ -1 +0,0 @@ -MD5 1bf3ae6c0c58d3201afc97c6a4834e39 fam-2.7.0.tar.gz 301974 diff --git a/app-admin/fam/files/digest-fam-2.7.0-r1 b/app-admin/fam/files/digest-fam-2.7.0-r1 deleted file mode 100644 index 107b73637116..000000000000 --- a/app-admin/fam/files/digest-fam-2.7.0-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 1bf3ae6c0c58d3201afc97c6a4834e39 fam-2.7.0.tar.gz 301974 diff --git a/app-admin/fam/files/digest-fam-2.7.0-r2 b/app-admin/fam/files/digest-fam-2.7.0-r2 deleted file mode 100644 index 107b73637116..000000000000 --- a/app-admin/fam/files/digest-fam-2.7.0-r2 +++ /dev/null @@ -1 +0,0 @@ -MD5 1bf3ae6c0c58d3201afc97c6a4834e39 fam-2.7.0.tar.gz 301974 diff --git a/app-admin/fam/files/digest-fam-2.7.0-r3 b/app-admin/fam/files/digest-fam-2.7.0-r3 deleted file mode 100644 index 107b73637116..000000000000 --- a/app-admin/fam/files/digest-fam-2.7.0-r3 +++ /dev/null @@ -1 +0,0 @@ -MD5 1bf3ae6c0c58d3201afc97c6a4834e39 fam-2.7.0.tar.gz 301974 diff --git a/app-admin/fam/files/fam-2.7.0-dnotify.patch b/app-admin/fam/files/fam-2.7.0-dnotify.patch deleted file mode 100644 index 4f87fe191160..000000000000 --- a/app-admin/fam/files/fam-2.7.0-dnotify.patch +++ /dev/null @@ -1,975 +0,0 @@ ---- fam-2.7.0/src/DNotify.c++ 2004-01-30 00:00:00.000000000 +0100 -+++ fam-2.7.0.dnotify/src/DNotify.c++ 2004-01-30 00:00:00.000000000 +0100 -@@ -0,0 +1,582 @@ -+// Copyright (C) 2001 Red Hat, Inc. All Rights Reserved. -+// Copyright (C) 1999 Silicon Graphics, Inc. All Rights Reserved. -+// -+// This program is free software; you can redistribute it and/or modify it -+// under the terms of version 2 of the GNU General Public License as -+// published by the Free Software Foundation. -+// -+// This program is distributed in the hope that it would be useful, but -+// WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Further, any -+// license provided herein, whether implied or otherwise, is limited to -+// this program in accordance with the express provisions of the GNU -+// General Public License. Patent licenses, if any, provided herein do not -+// apply to combinations of this program with other product or programs, or -+// any other product whatsoever. This program is distributed without any -+// warranty that the program is delivered free of the rightful claim of any -+// third person by way of infringement or the like. See the GNU General -+// Public License for more details. -+// -+// You should have received a copy of the GNU General Public License along -+// with this program; if not, write the Free Software Foundation, Inc., 59 -+// Temple Place - Suite 330, Boston MA 02111-1307, USA. -+ -+#define _GNU_SOURCE -+#include <fcntl.h> -+ -+#include <string.h> -+#include <signal.h> -+#include <stdio.h> -+#include <unistd.h> -+#include <sys/types.h> -+#include <sys/stat.h> -+#include <libgen.h> -+ -+#include "DNotify.h" -+ -+#include "Interest.h" -+#include "Log.h" -+#include "Scheduler.h" -+#include <memory> -+ -+ -+int DNotify::pipe_write_fd = -2; -+int DNotify::pipe_read_fd = -2; -+volatile sig_atomic_t DNotify::queue_overflowed = 0; -+volatile sig_atomic_t DNotify::queue_changed = 0; -+int DNotify::change_queue[QUEUESIZE]; -+volatile int DNotify::queue_head = 0; // Only modified by read handler -+volatile int DNotify::queue_tail = 0; // Only modified by signal handler -+DNotify::EventHandler DNotify::ehandler; -+ -+DNotify::DirWatch *DNotify::dir_hash[DIR_HASHSIZE]; -+DNotify::FileWatch *DNotify::file_hash[FILE_HASHSIZE]; -+ -+struct DNotify::FileWatch -+{ -+ DirWatch *dir_watch; -+ dev_t file_dev; -+ ino_t file_ino; -+ FileWatch *next; // The DirWatch.watches list -+ FileWatch *hash_link; -+}; -+ -+struct DNotify::DirWatch -+{ -+ int fd; -+ dev_t dir_dev; -+ ino_t dir_ino; -+ -+ DirWatch *hash_link; -+ FileWatch *watches; -+}; -+ -+struct DNotify::ChangeEventData -+{ -+ dev_t file_dev; -+ ino_t file_ino; -+}; -+ -+DNotify::DNotify(EventHandler h) -+{ -+ assert(ehandler == NULL); -+ ehandler = h; -+} -+ -+DNotify::~DNotify() -+{ -+ if (pipe_read_fd >= 0) -+ { -+ // Tell the scheduler. -+ -+ (void) Scheduler::remove_read_handler(pipe_read_fd); -+ -+ // Close the pipe. -+ -+ if (close(pipe_read_fd) < 0) -+ Log::perror("can't pipe read end"); -+ else -+ Log::debug("closed pipe read end"); -+ -+ if (close(pipe_write_fd) < 0) -+ Log::perror("can't pipe write end"); -+ else -+ Log::debug("closed pipe write end"); -+ pipe_read_fd = -1; -+ } -+ ehandler = NULL; -+} -+ -+void -+DNotify::overflow_signal_handler(int sig, siginfo_t *si, void *data) -+{ -+ char c = 'x'; -+ -+ { -+ char *str = "*************** overflow sigqueue ***********************\n"; -+ write (STDERR_FILENO, str, strlen(str)); -+ } -+ -+ if (!queue_overflowed) -+ { -+ queue_overflowed = 1; -+ // Trigger the read handler -+ write(pipe_write_fd, &c, 1); -+ } -+} -+ -+void -+DNotify::signal_handler(int sig, siginfo_t *si, void *data) -+{ -+ int left; -+ char c = 'x'; -+ -+ if (queue_head <= queue_tail) -+ left = (QUEUESIZE + queue_head) - queue_tail; -+ else -+ left = queue_head - queue_tail; -+ -+ // Must leave at least one item unused to see difference -+ // Betweeen empty and full -+ if (left <= 1) -+ { -+ queue_overflowed = 1; -+ { -+ char *str = "*************** overflow famqueue ****************\n"; -+ write (STDERR_FILENO, str, strlen(str)); -+ } -+ } -+ else -+ { -+ change_queue[queue_tail] = si->si_fd; -+ queue_tail = (queue_tail + 1) % QUEUESIZE; -+ } -+ -+ if (!queue_changed) -+ { -+ queue_changed = 1; -+ // Trigger the read handler -+ write(pipe_write_fd, &c, 1); -+ } -+} -+ -+bool -+DNotify::is_active() -+{ -+ if (pipe_read_fd == -2) -+ { -+ int filedes[2]; -+ int res; -+ -+ res = pipe (filedes); -+ if (res >= 0) -+ { Log::debug("opened pipe"); -+ pipe_read_fd = filedes[0]; -+ pipe_write_fd = filedes[1]; -+ -+ // Setup signal handler: -+ struct sigaction act; -+ -+ act.sa_sigaction = signal_handler; -+ sigemptyset(&act.sa_mask); -+ act.sa_flags = SA_SIGINFO; -+ sigaction(SIGRTMIN, &act, NULL); -+ -+ // When the RT queue overflows we get a SIGIO -+ act.sa_sigaction = overflow_signal_handler; -+ sigemptyset(&act.sa_mask); -+ sigaction(SIGIO, &act, NULL); -+ -+ (void) Scheduler::install_read_handler(pipe_read_fd, read_handler, NULL); -+ } -+ } -+ return pipe_read_fd >= 0; -+} -+ -+DNotify::DirWatch * -+DNotify::lookup_dirwatch (int fd) -+{ -+ DirWatch **p; -+ DirWatch *w; -+ -+ p = dir_hashchain (fd); -+ -+ while (*p) -+ { -+ w = *p; -+ -+ if (w->fd == fd) -+ return w; -+ -+ p = &w->hash_link; -+ } -+ -+ return *p; -+} -+ -+// This colud be made faster by using another hash table. -+// But it's not that bad, since it is only used by express/revoke -+DNotify::DirWatch * -+DNotify::lookup_dirwatch (dev_t dir_dev, ino_t dir_ino) -+{ -+ DirWatch *p; -+ int i; -+ -+ for (i=0;i<DIR_HASHSIZE;i++) -+ { -+ p = dir_hash[i]; -+ -+ while (p) -+ { -+ if (p->dir_dev == dir_dev && p->dir_ino == dir_ino) -+ return p; -+ -+ p = p->hash_link; -+ } -+ } -+ -+ return NULL; -+} -+ -+DNotify::FileWatch * -+DNotify::lookup_filewatch (dev_t dev, ino_t ino) -+{ -+ FileWatch **p; -+ FileWatch *w; -+ -+ p = file_hashchain (dev, ino); -+ -+ while (*p) -+ { -+ w = *p; -+ -+ if (w->file_dev == dev && w->file_ino == ino) -+ return w; -+ -+ p = &w->hash_link; -+ } -+ -+ return *p; -+} -+ -+// Make sure w is not already in the hash table before calling -+// this function. -+void -+DNotify::hash_dirwatch(DirWatch *w) -+{ -+ DirWatch **p; -+ p = dir_hashchain (w->fd); -+ w->hash_link = *p; -+ *p = w; -+} -+ -+// Make sure w is not already in the hash table before calling -+// this function. -+void -+DNotify::hash_filewatch(FileWatch *w) -+{ -+ FileWatch **p; -+ p = file_hashchain (w->file_dev, w->file_ino); -+ w->hash_link = *p; -+ *p = w; -+} -+ -+void -+DNotify::unhash_dirwatch(DirWatch *w) -+{ -+ DirWatch **p; -+ -+ p = dir_hashchain (w->fd); -+ -+ while (*p) -+ { -+ if (*p == w) -+ { -+ *p = w->hash_link; -+ break; -+ } -+ p = &(*p)->hash_link; -+ } -+ w->hash_link = NULL; -+} -+ -+void -+DNotify::unhash_filewatch(FileWatch *w) -+{ -+ FileWatch **p; -+ -+ p = file_hashchain (w->file_dev, w->file_ino); -+ -+ while (*p) -+ { -+ if (*p == w) -+ { -+ *p = w->hash_link; -+ break; -+ } -+ p = &(*p)->hash_link; -+ } -+ w->hash_link = NULL; -+} -+ -+DNotify::Status -+DNotify::watch_dir(const char *notify_dir, dev_t file_dev, ino_t file_ino) -+{ -+ struct stat stat; -+ dev_t dir_dev; -+ ino_t dir_ino; -+ DirWatch *dwatch; -+ FileWatch *fw; -+ -+ if (lstat (notify_dir, &stat) == -1) -+ return BAD; -+ -+ dwatch = lookup_dirwatch(stat.st_dev, stat.st_ino); -+ if (!dwatch) -+ { -+ Log::debug ("New DirWatch for %s (%x %x)\n", -+ notify_dir, (int)stat.st_dev, (int)stat.st_ino); -+ dwatch = new DirWatch; -+ dwatch->watches = NULL; -+ dwatch->hash_link = NULL; -+ dwatch->dir_dev = stat.st_dev; -+ dwatch->dir_ino = stat.st_ino; -+ -+ dwatch->fd = open(notify_dir, O_RDONLY); -+ fcntl (dwatch->fd, F_SETSIG, SIGRTMIN); -+ if (fcntl (dwatch->fd, F_NOTIFY, -+ (DN_MODIFY|DN_CREATE|DN_DELETE|DN_RENAME|DN_ATTRIB) -+ | DN_MULTISHOT) == -1) { -+ return BAD; -+ } -+ hash_dirwatch (dwatch); -+ } -+ -+ fw = lookup_filewatch (file_dev, file_ino); -+ if (fw && fw->dir_watch == dwatch) -+ return OK; -+ -+ // No old FileWatch, need to add one: -+ Log::debug("New FileWatch for %x %x\n", (int)file_dev, (int)file_ino); -+ fw = new FileWatch; -+ fw->next = dwatch->watches; -+ dwatch->watches = fw; -+ fw->file_dev = file_dev; -+ fw->file_ino = file_ino; -+ fw->dir_watch = dwatch; -+ hash_filewatch(fw); -+ return OK; -+} -+ -+char * -+dirname_dup (const char *name) -+{ -+ char *copy = strdup(name); -+ char *res = dirname(copy); -+ res = strdup(res); -+ free (copy); -+ return res; -+} -+ -+DNotify::Status -+DNotify::express(const char *name, struct stat *status) -+{ -+ struct stat stat; -+ char *notify_dir; -+ int res; -+ Status s; -+ dev_t dev; -+ ino_t ino; -+ -+ Log::debug("express() name: %s\n", name); -+ -+ if (!is_active()) -+ return BAD; -+ -+ if (::lstat (name, &stat) == -1) -+ return BAD; -+ -+ dev = stat.st_dev; -+ ino = stat.st_ino; -+ -+ if ((stat.st_mode & S_IFMT) != S_IFDIR) -+ notify_dir = dirname_dup (name); -+ else -+ notify_dir = (char *)name; -+ -+ s = watch_dir (notify_dir, dev, ino); -+ if (notify_dir != name) -+ free (notify_dir); -+ if (s) -+ return s; -+ -+ // Check for a race condition; if someone removed or changed the -+ // file at the same time that we are expressing interest in it, -+ // revoke the interest so we don't get notifications about changes -+ // to a recycled inode that we don't otherwise care about. -+ // -+ struct stat st; -+ if (status == NULL) { -+ status = &st; -+ } -+ if (::lstat(name, status) == -1) { -+ Log::perror("stat on \"%s\" failed", name); -+ revoke(name, stat.st_dev, stat.st_ino); -+ return BAD; -+ } -+ if (status->st_dev != stat.st_dev -+ || status->st_ino != stat.st_ino) { -+ Log::error("File \"%s\" changed between express and stat", -+ name); -+ revoke(name, stat.st_dev, stat.st_ino); -+ return BAD; -+ } -+ -+ Log::debug("told dnotify to monitor \"%s\" = dev %d/%d, ino %d", name, -+ major(status->st_dev), minor(status->st_dev), -+ status->st_ino); -+ return OK; -+} -+ -+DNotify::Status -+DNotify::revoke(const char *name, dev_t dev, ino_t ino) -+{ -+ FileWatch *fwatch; -+ DirWatch *dwatch; -+ -+ Log::debug("revoke() name: %s, dev: %x, ino: %x\n", name, dev, ino); -+ -+ if (!is_active()) -+ return BAD; -+ -+ // Lookup FileWatch by dev:ino, and its DirWatch. -+ fwatch = lookup_filewatch (dev, ino); -+ if (fwatch == NULL) -+ return BAD; -+ -+ dwatch = fwatch->dir_watch; -+ -+ // delete FileWatch, if last FileWatch: close fd, delete DirWatch -+ Log::debug ("Destroying FileWatch for (%x %x)\n", -+ (int)fwatch->file_dev, (int)fwatch->file_ino); -+ FileWatch **p; -+ for (p=&dwatch->watches; *p; p=&(*p)->next) -+ { -+ if (*p == fwatch) -+ { -+ *p = (*p)->next; -+ break; -+ } -+ } -+ unhash_filewatch(fwatch); -+ delete fwatch; -+ if (dwatch->watches == NULL) -+ { -+ Log::debug ("Destroying DirWatch for (%x %x)\n", -+ (int)dwatch->dir_dev, (int)dwatch->dir_ino); -+ close(dwatch->fd); -+ unhash_dirwatch(dwatch); -+ delete dwatch; -+ } -+ -+ return OK; -+} -+ -+ -+void -+DNotify::all_watches_changed(void) -+{ -+ int i; -+ FileWatch *fw; -+ -+ for (i=0; i<FILE_HASHSIZE; i++) -+ { -+ fw = file_hash[i]; -+ while (fw) -+ { -+ (*ehandler)(fw->file_dev, fw->file_ino, CHANGE); -+ -+ fw = fw->hash_link; -+ } -+ } -+} -+ -+ -+void -+DNotify::read_handler(int fd, void *) -+{ -+ static char readbuf[5000]; -+ DirWatch *dw; -+ FileWatch *fw; -+ int snap_queue_tail; -+ int last_fd; -+ -+ int rc = read(fd, readbuf, sizeof readbuf); -+ queue_changed = 0; -+ if (rc < 0) -+ Log::perror("pipe read"); -+ else if (queue_overflowed) -+ { -+ // There is a *slight* race condition here. Between reading -+ // the queue_overflow flag and resetting it. But it doesn't -+ // matter, since I'm gonna handle the overflow after reseting -+ // anyway. -+ queue_overflowed = false; -+ -+ // We're soon gonna check all watches anyway, so -+ // get rid of the current queue -+ queue_head = queue_tail; -+ -+ all_watches_changed (); -+ } -+ else -+ { -+ // Don't read events that happen later than -+ // the initial read. (Otherwise skipping fd's -+ // might miss some changes). -+ snap_queue_tail = queue_tail; -+ last_fd = -1; -+ while (queue_head != snap_queue_tail) -+ { -+ fd = change_queue[queue_head]; -+ queue_head = (queue_head + 1) % QUEUESIZE; -+ -+ // Skip multiple changes to the same fd -+ if (fd != last_fd) -+ { -+ dw = lookup_dirwatch (fd); -+ if (dw) -+ { -+ int n_watches, i; -+ ChangeEventData *data; -+ -+ Log::debug("dnotify said dev %d/%d, ino %ld changed", -+ major(dw->dir_dev), minor(dw->dir_dev), dw->dir_ino); -+ -+ n_watches = 0; -+ for (fw=dw->watches; fw; fw=fw->next) -+ n_watches++; -+ -+ data = new ChangeEventData[n_watches]; -+ -+ i = 0; -+ for (fw=dw->watches; fw; fw=fw->next) -+ { -+ data[i].file_dev = fw->file_dev; -+ data[i].file_ino = fw->file_ino; -+ i++; -+ } -+ -+ for (i = 0; i < n_watches; i++) -+ { -+ (*ehandler)(data[i].file_dev, data[i].file_ino, CHANGE); -+ } -+ -+ delete[] data; -+ } -+ } -+ last_fd = fd; -+ } -+ } -+} -+ ---- fam-2.7.0/src/DNotify.h 2004-01-30 00:00:00.000000000 +0100 -+++ fam-2.7.0.dnotify/src/DNotify.h 2004-01-30 00:00:00.000000000 +0100 -@@ -0,0 +1,98 @@ -+// Copyright (C) 2001 Red Hat, Inc. All Rights Reserved. -+// Copyright (C) 1999 Silicon Graphics, Inc. All Rights Reserved. -+// -+// This program is free software; you can redistribute it and/or modify it -+// under the terms of version 2 of the GNU General Public License as -+// published by the Free Software Foundation. -+// -+// This program is distributed in the hope that it would be useful, but -+// WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Further, any -+// license provided herein, whether implied or otherwise, is limited to -+// this program in accordance with the express provisions of the GNU -+// General Public License. Patent licenses, if any, provided herein do not -+// apply to combinations of this program with other product or programs, or -+// any other product whatsoever. This program is distributed without any -+// warranty that the program is delivered free of the rightful claim of any -+// third person by way of infringement or the like. See the GNU General -+// Public License for more details. -+// -+// You should have received a copy of the GNU General Public License along -+// with this program; if not, write the Free Software Foundation, Inc., 59 -+// Temple Place - Suite 330, Boston MA 02111-1307, USA. -+ -+#ifndef DNotify_included -+#define DNotify_included -+ -+#include "config.h" -+#include "Monitor.h" -+#include <signal.h> -+ -+// DNotify is an object encapsulating the dnotify linux fcntl. -+// It "emulates" the IMon interface. -+// There can only be one instantiation of the DNotify object. -+// -+// The user of this object uses express() and revoke() to -+// express/revoke interest in a file. There is also -+// a callback, the EventHandler. When an dnotify event comes in, -+// the EventHandler is called. -+// -+// The user of the DNotify object is the Interest class. -+ -+class DNotify : public Monitor { -+public: -+ DNotify(EventHandler h); -+ ~DNotify(); -+ -+ static bool is_active(); -+ -+ virtual Status express(const char *name, struct stat *stat_return); -+ virtual Status revoke(const char *name, dev_t dev, ino_t ino); -+ -+private: -+ struct FileWatch; -+ struct DirWatch; -+ struct ChangeEventData; -+ -+ // Class Variables -+ enum { QUEUESIZE = 1024 }; -+ static int pipe_write_fd; -+ static int pipe_read_fd; -+ static int change_queue[QUEUESIZE]; -+ static volatile sig_atomic_t DNotify::queue_overflowed; -+ static volatile sig_atomic_t DNotify::queue_changed; -+ static volatile int queue_head; // Only modified by read handler -+ static volatile int queue_tail; // Only modified by signal handler -+ static EventHandler ehandler; -+ static void overflow_signal_handler(int sig, siginfo_t *si, void *data); -+ static void signal_handler(int sig, siginfo_t *si, void *data); -+ static void read_handler(int fd, void *closure); -+ -+ enum { DIR_HASHSIZE = 367 }; -+ static DirWatch *dir_hash[DIR_HASHSIZE]; -+ enum { FILE_HASHSIZE = 823 }; -+ static FileWatch *file_hash[FILE_HASHSIZE]; -+ -+ static DirWatch **dir_hashchain(int fd) -+ { return &dir_hash[(unsigned) (fd) % DIR_HASHSIZE]; } -+ static FileWatch **file_hashchain(dev_t d, ino_t i) -+ { return &file_hash[(unsigned) (d+i) % FILE_HASHSIZE]; } -+ -+ static DirWatch *lookup_dirwatch (int fd); -+ static DirWatch *lookup_dirwatch (dev_t dir_dev, ino_t dir_ino); -+ static FileWatch *lookup_filewatch (dev_t file_dev, ino_t file_ino); -+ static void hash_dirwatch(DirWatch *w); -+ static void hash_filewatch(FileWatch *w); -+ static void unhash_dirwatch(DirWatch *w); -+ static void unhash_filewatch(FileWatch *w); -+ static Status watch_dir(const char *notify_dir, dev_t file_dev, ino_t file_ino); -+ -+ static void all_watches_changed(void); -+ -+ DNotify(const DNotify&); // Do not copy -+ DNotify & operator = (const DNotify&); // or assign. -+}; -+ -+#endif /* !IMon_included */ -+ -+ ---- fam-2.7.0/src/Interest.c++ 2004-01-30 00:00:00.000000000 +0100 -+++ fam-2.7.0.dnotify/src/Interest.c++ 2004-01-30 00:00:00.000000000 +0100 -@@ -42,12 +42,21 @@ - #include "Event.h" - #include "FileSystem.h" - #include "IMon.h" -+#include "DNotify.h" - #include "Log.h" - #include "Pollster.h" - #include "timeval.h" - - Interest *Interest::hashtable[]; --IMon Interest::imon(imon_handler); -+ -+#ifdef USE_DNOTIFY -+static DNotify dnotify(Interest::monitor_handler); -+Monitor * Interest::monitor = &dnotify; -+#else -+static IMon imon(Interest::monitor_handler); -+Monitor * Interest::monitor = &imon; -+#endif -+ - bool Interest::xtab_verification = true; - - Interest::Interest(const char *name, FileSystem *fs, in_addr host, ExportVerification ev) -@@ -60,10 +69,10 @@ - mypath_exported_to_host(ev == NO_VERIFY_EXPORTED) - { - memset(&old_stat, 0, sizeof(old_stat)); -- IMon::Status s = IMon::BAD; - -- s = imon.express(name, &old_stat); -- if (s != IMon::OK) -+ Monitor::Status s = Monitor::BAD; -+ s = monitor->express(name, &old_stat); -+ if (s != Monitor::OK) - { int rc = lstat(name, &old_stat); - if (rc < 0) - { Log::info("can't lstat %s", name); -@@ -100,7 +109,7 @@ - } - #endif - -- if (exported_to_host()) fs->ll_monitor(this, s == IMon::OK); -+ if (exported_to_host()) fs->ll_monitor(this, s == Monitor::OK); - } - - Interest::~Interest() -@@ -128,7 +137,7 @@ - pp = &p->hashlink; // move to next element - } - if (!found_same) -- (void) imon.revoke(name(), dev, ino); -+ (void) monitor->revoke(name(), dev, ino); - } - } - -@@ -147,7 +156,7 @@ - - // Express interest. - IMon::Status s = IMon::BAD; -- s = imon.express(name(), NULL); -+ s = monitor->express(name(), NULL); - if (s != IMon::OK) { - return true; - } -@@ -248,23 +257,23 @@ - } - - void --Interest::imon_handler(dev_t device, ino_t inumber, int event) -+Interest::monitor_handler(dev_t device, ino_t inumber, int event) - { - assert(device || inumber); - - for (Interest *p = *hashchain(device, inumber), *next = p; p; p = next) - { next = p->hashlink; - if (p->ino == inumber && p->dev == device) -- { if (event == IMon::EXEC) -+ { if (event == Monitor::EXEC) - { p->cur_exec_state = EXECUTING; - (void) p->report_exec_state(); - } -- else if (event == IMon::EXIT) -+ else if (event == Monitor::EXIT) - { p->cur_exec_state = NOT_EXECUTING; - (void) p->report_exec_state(); - } - else -- { assert(event == IMon::CHANGE); -+ { assert(event == Monitor::CHANGE); - p->scan(); - } - } ---- fam-2.7.0/config.h.in 2003-01-20 01:40:15.000000000 +0100 -+++ fam-2.7.0.dnotify/config.h.in 2004-01-30 13:50:33.000000000 +0100 -@@ -180,3 +180,6 @@ - - /* Define to `int' if <sys/types.h> doesn't define. */ - #undef uid_t -+ -+/* Define to 1 if you have F_NOTIFY fcntl */ -+#undef USE_DNOTIFY ---- fam-2.7.0/configure.ac 2003-11-26 20:47:59.000000000 +0100 -+++ fam-2.7.0.dnotify/configure.ac 2004-01-30 13:50:33.000000000 +0100 -@@ -34,7 +34,26 @@ - AC_HEADER_DIRENT - 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]) - --if test "$have_sys_imon_h"; then -+# Test for the linux dnotify fcntl -+AC_MSG_CHECKING([for dnotify fcntl support]) -+AC_TRY_COMPILE([ -+#define _GNU_SOURCE -+#include <fcntl.h> -+#include <unistd.h> -+], -+[ int fd = 1; -+ fcntl (fd, F_NOTIFY, (DN_MODIFY|DN_CREATE|DN_DELETE|DN_RENAME|DN_ATTRIB) -+ |DN_MULTISHOT); -+], have_dnotify=yes, have_dnotify=no) -+ -+use_dnotify=false -+AC_MSG_RESULT($have_dnotify) -+ -+if test "$have_dnotify"; then -+ MONITOR_FUNCS=IMonNone -+ AC_DEFINE([USE_DNOTIFY], [], [Use dnotify]) -+ use_dnotify=true -+elif test "$have_sys_imon_h"; then - MONITOR_FUNCS=IMonIRIX - elif test "$have_linux_imon_h"; then - MONITOR_FUNCS=IMonLinux -@@ -42,6 +62,7 @@ - MONITOR_FUNCS=IMonNone - fi - AC_SUBST(MONITOR_FUNCS) -+AM_CONDITIONAL(USE_DNOTIFY, $use_dnotify) - - # Checks for typedefs, structures, and compiler characteristics. - AC_HEADER_STDBOOL ---- fam-2.7.0/src/IMon.h 2004-01-30 00:00:00.000000000 +0200 -+++ fam-2.7.0.dnotify/src/IMon.h 2004-01-30 00:00:00.000000000 +0200 -@@ -24,10 +24,7 @@ - #define IMon_included - - #include "config.h" --#include <sys/stat.h> --#include <sys/types.h> -- --#include "Boolean.h" -+#include "Monitor.h" - - struct stat; - -@@ -41,25 +38,18 @@ - // - // The user of the IMon object is the Interest class. - --class IMon { -+class IMon : public Monitor { - - public: -- -- enum Status { OK = 0, BAD = -1 }; -- enum Event { EXEC, EXIT, CHANGE }; -- -- typedef void (*EventHandler)(dev_t, ino_t, int event); -- - IMon(EventHandler h); - ~IMon(); - - static bool is_active(); - -- Status express(const char *name, struct stat *stat_return); -- Status revoke(const char *name, dev_t dev, ino_t ino); -+ virtual Status express(const char *name, struct stat *stat_return); -+ virtual Status revoke(const char *name, dev_t dev, ino_t ino); - - private: -- - // Class Variables - - static int imonfd; ---- fam-2.7.0/src/Interest.h 2004-01-30 00:00:00.000000000 +0200 -+++ fam-2.7.0.dnotify/src/Interest.h 2004-01-30 00:00:00.000000000 +0200 -@@ -32,7 +32,7 @@ - - class Event; - class FileSystem; --class IMon; -+class Monitor; - struct stat; - - // Interest -- abstract base class for filesystem entities of interest. -@@ -74,7 +74,7 @@ - - // Public Class Method - -- static void imon_handler(dev_t, ino_t, int event); -+ static void monitor_handler(dev_t, ino_t, int event); - - static void enable_xtab_verification(bool enable); - -@@ -121,7 +121,7 @@ - - // Class Variables - -- static IMon imon; -+ static Monitor *monitor; - static Interest *hashtable[HASHSIZE]; - static bool xtab_verification; - ---- fam-2.7.0/src/Makefile.am 2003-01-19 13:00:17.000000000 +0100 -+++ fam-2.7.0.dnotify/src/Makefile.am 2004-01-30 13:50:38.000000000 +0100 -@@ -71,7 +71,11 @@ - main.c++ \ - timeval.c++ \ - timeval.h \ -- @MONITOR_FUNCS@.c++ -+ Monitor.h \ -+ DNotify.h \ -+ DNotify.c++ \ -+ @MONITOR_FUNCS@.c++ - --EXTRA_famd_SOURCES = IMonIrix.c++ IMonLinux.c++ IMonNone.c++ -+EXTRA_famd_SOURCES = IMonIrix.c++ IMonLinux.c++ IMonNone.c++ DNotify.c++ \ -+ DNotify.h Monitor.h - ---- fam-2.7.0/src/Monitor.h 2004-01-30 00:00:00.000000000 +0200 -+++ fam-2.7.0.dnotify/src/Monitor.h 2004-01-30 00:00:00.000000000 +0200 -@@ -0,0 +1,57 @@ -+// Copyright (C) 2001 Red Hat, Inc. All Rights Reserved. -+// Copyright (C) 1999 Silicon Graphics, Inc. All Rights Reserved. -+// -+// This program is free software; you can redistribute it and/or modify it -+// under the terms of version 2 of the GNU General Public License as -+// published by the Free Software Foundation. -+// -+// This program is distributed in the hope that it would be useful, but -+// WITHOUT ANY WARRANTY; without even the implied warranty of -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Further, any -+// license provided herein, whether implied or otherwise, is limited to -+// this program in accordance with the express provisions of the GNU -+// General Public License. Patent licenses, if any, provided herein do not -+// apply to combinations of this program with other product or programs, or -+// any other product whatsoever. This program is distributed without any -+// warranty that the program is delivered free of the rightful claim of any -+// third person by way of infringement or the like. See the GNU General -+// Public License for more details. -+// -+// You should have received a copy of the GNU General Public License along -+// with this program; if not, write the Free Software Foundation, Inc., 59 -+// Temple Place - Suite 330, Boston MA 02111-1307, USA. -+ -+#ifndef Monitor_included -+#define Monitor_included -+ -+#include "config.h" -+#include <sys/stat.h> -+#include <sys/types.h> -+ -+struct stat; -+ -+// Monitor is an abstract baseclass for differend file monitoring -+// systems. The original system used was IMon, and the Montor API -+// is heavily influenced by that. -+// There can only be one instantiation of the Monitor object. -+// -+// The user of this object uses express() and revoke() to -+// express/revoke interest in a file to imon. There is also -+// a callback, the EventHandler. When an event comes in, -+// the EventHandler is called. -+// -+// The main implementers of the Monitor class is IMon and DNotify -+ -+class Monitor { -+public: -+ -+ enum Status { OK = 0, BAD = -1 }; -+ enum Event { EXEC, EXIT, CHANGE }; -+ -+ typedef void (*EventHandler)(dev_t, ino_t, int event); -+ -+ virtual Status express(const char *name, struct stat *stat_return) = 0; -+ virtual Status revoke(const char *name, dev_t dev, ino_t ino) = 0; -+}; -+ -+#endif /* !Monitor_included */ |