diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-04-04 21:59:29 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-04-04 21:59:29 +0000 |
commit | 3661f3624acc46590d5504fda4f8714255fb2c8e (patch) | |
tree | e2cd17e19718d3f46944979a23e4c93dcf92584b /lib/common/EventWatchFilesystemObject.cpp | |
parent | 2f8d0c29536cdb306b525b78638727da4ead0022 (diff) |
Tailorization
Import of the upstream sources from
Repository: http://localhost:8000/
Kind: hg
Revision: 7807b7768163f1c2537756abe5416063989cebb1
Original author: tailor@rocio.int.aidworld.org
Date: 2008-03-16 19:44:36+00:00
Diffstat (limited to 'lib/common/EventWatchFilesystemObject.cpp')
-rw-r--r-- | lib/common/EventWatchFilesystemObject.cpp | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/lib/common/EventWatchFilesystemObject.cpp b/lib/common/EventWatchFilesystemObject.cpp index 43533fc8..84781113 100644 --- a/lib/common/EventWatchFilesystemObject.cpp +++ b/lib/common/EventWatchFilesystemObject.cpp @@ -26,10 +26,9 @@ // -------------------------------------------------------------------------- // // Function -// Name: EventWatchFilesystemObject::EventWatchFilesystemObject -// (const char *) -// Purpose: Constructor -- opens the file object -// Created: 12/3/04 +// Name: EventWatchFilesystemObject::EventWatchFilesystemObject(const char *) +// Purpose: Constructor -- opens the file object +// Created: 12/3/04 // // -------------------------------------------------------------------------- EventWatchFilesystemObject::EventWatchFilesystemObject(const char *Filename) @@ -40,8 +39,9 @@ EventWatchFilesystemObject::EventWatchFilesystemObject(const char *Filename) #ifdef HAVE_KQUEUE if(mDescriptor == -1) { - BOX_LOG_SYS_ERROR("EventWatchFilesystemObject: " - "Failed to open file '" << Filename << "'"); + BOX_ERROR("EventWatchFilesystemObject: " + "Failed to open file '" << Filename << "': " << + strerror(errno)); THROW_EXCEPTION(CommonException, OSFileOpenError) } #else @@ -53,9 +53,9 @@ EventWatchFilesystemObject::EventWatchFilesystemObject(const char *Filename) // -------------------------------------------------------------------------- // // Function -// Name: EventWatchFilesystemObject::~EventWatchFilesystemObject() -// Purpose: Destructor -// Created: 12/3/04 +// Name: EventWatchFilesystemObject::~EventWatchFilesystemObject() +// Purpose: Destructor +// Created: 12/3/04 // // -------------------------------------------------------------------------- EventWatchFilesystemObject::~EventWatchFilesystemObject() @@ -70,14 +70,12 @@ EventWatchFilesystemObject::~EventWatchFilesystemObject() // -------------------------------------------------------------------------- // // Function -// Name: EventWatchFilesystemObject::EventWatchFilesystemObject -// (const EventWatchFilesystemObject &) -// Purpose: Copy constructor -// Created: 12/3/04 +// Name: EventWatchFilesystemObject::EventWatchFilesystemObject(const EventWatchFilesystemObject &) +// Purpose: Copy constructor +// Created: 12/3/04 // // -------------------------------------------------------------------------- -EventWatchFilesystemObject::EventWatchFilesystemObject( - const EventWatchFilesystemObject &rToCopy) +EventWatchFilesystemObject::EventWatchFilesystemObject(const EventWatchFilesystemObject &rToCopy) : mDescriptor(::dup(rToCopy.mDescriptor)) { if(mDescriptor == -1) @@ -91,20 +89,17 @@ EventWatchFilesystemObject::EventWatchFilesystemObject( // -------------------------------------------------------------------------- // // Function -// Name: EventWatchFilesystemObject::FillInKEvent(struct kevent &, int) -// Purpose: For WaitForEvent -// Created: 12/3/04 +// Name: EventWatchFilesystemObject::FillInKEvent(struct kevent &, int) +// Purpose: For WaitForEvent +// Created: 12/3/04 // // -------------------------------------------------------------------------- -void EventWatchFilesystemObject::FillInKEvent(struct kevent &rEvent, - int Flags) const +void EventWatchFilesystemObject::FillInKEvent(struct kevent &rEvent, int Flags) const { - EV_SET(&rEvent, mDescriptor, EVFILT_VNODE, EV_CLEAR, - NOTE_DELETE | NOTE_WRITE, 0, (void*)this); + EV_SET(&rEvent, mDescriptor, EVFILT_VNODE, EV_CLEAR, NOTE_DELETE | NOTE_WRITE, 0, (void*)this); } #else -void EventWatchFilesystemObject::FillInPoll(int &fd, short &events, - int Flags) const +void EventWatchFilesystemObject::FillInPoll(int &fd, short &events, int Flags) const { THROW_EXCEPTION(CommonException, KQueueNotSupportedOnThisPlatform) } |