summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2007-06-16Merge branch 'master' into buffersizeTobias Klauser2-19/+38
Conflicts: inotail.c
2007-06-15inotail.c: s/Inotify/inotify/Tobias Klauser1-2/+2
2007-06-15inotail.c: Simplify EINTR handling in watch_files()Tobias Klauser1-13/+8
We don't need another loop, just continue the surrounding while() on EINTR/EAGAIN
2007-06-12inotail.c: Also handle EAGAIN in watch_files()Tobias Klauser1-2/+2
2007-06-12inotail.c: CleanupTobias Klauser1-11/+7
Save us some lines
2007-06-11inotail.c/.h: Implement is_digit to save some bytes of ctype.h inclusionTobias Klauser2-2/+3
2007-06-08inotail.c: Rename alloc_buffer() to emalloc()Tobias Klauser1-18/+17
This better describes what the function really does. It will be used for the allocating of the line buffers in tail_pipe too.
2007-06-04inotail.c: Handle return value of lseekTobias Klauser1-5/+20
lseek() could fail so we better handle it. Based on a patch by Folkert van Heusden
2007-06-02inotail.c: Correct error condition in tail_pipe()Tobias Klauser1-1/+1
write() returns 0 on end of file
2007-05-29inotail.c: Fix handling of EINTR in watch_files()Tobias Klauser1-4/+15
If inotail gets an EINTR signal while reading inotify events, it breaks. However, a common thing to generate these events is hitting ^Z/fg The patch fixes this shortcoming and allows inotail to be interrupted by EINTR. Patch from Anthony Martinez
2007-05-23inotail.c: Coding style cleanupsTobias Klauser1-2/+3
2007-05-23Change alloc_buffer to take a size_t which is more logicalTobias Klauser1-22/+17
Some additional cleanups e.g. deletion of unecessary buffer_size variables
2007-05-21Merge commit 'HEAD'; branch 'master' into buffersizeTobias Klauser2-2/+2
2007-05-21Makefile: Reorder CFLAGSTobias Klauser1-1/+1
2007-05-21Some housekeeping after introduction of alloc_buffer()Tobias Klauser1-3/+2
2007-05-21Prevent from some possible memory leaksTobias Klauser1-5/+8
2007-05-21inotail.c: Improve error messageTobias Klauser1-1/+1
2007-05-21Get rid of one variableTobias Klauser1-3/+2
2007-05-21Use optimal buffer size depending on the filesystem containing the fileTobias Klauser2-19/+66
The st_blksize attribute of struct stat conatains the blocksize for filesystem I/O (see stat(2)) which is the optimal size for reading/writing chunks of data. Based on a patch by Folkert van Heusden
2007-05-20inotail.c: Proper check of return value for the previous fixTobias Klauser1-2/+2
2007-05-20inotail.c: Some more error checking in tail_pipe()Tobias Klauser1-2/+7
Taken from a patch by Folkert van Heusden
2007-05-18Makefile: Add uninstall target and compress manpageTobias Klauser1-0/+4
Thanks to Folkert van Heusden for the patch
2007-05-18inotail.c: read() call cleanupTobias Klauser1-6/+6
buf instead of &buf
2007-05-18inotail.c: Forward just one event, we might miss some events otherwiseTobias Klauser1-1/+2
INOTIFY_BUFLEN is defined as 4 times the size of an event, so we would skip some events. Though I've never seen a case where more than one event arrived at a time.
2007-04-17Release inotail 0.3v0.3Tobias Klauser2-2/+2
2007-04-16inotail.c: Really fix byte_to_offset() this timeTobias Klauser1-6/+12
Also make a bit more readable
2007-04-13inotail.c: Fix an integer underflow in bytes_to_offset()Tobias Klauser1-2/+3
This also caused the bug that nothing was printed when a number greater than the number of characters in the file was specifed with the -c parameter.
2007-04-06Makefile: s/DESTDIR/prefix/ which is more intuitiveTobias Klauser1-3/+3
2007-03-28Makefile: Remove LDFLAGSTobias Klauser1-2/+0
2007-03-28Makefile: Clean up some moreTobias Klauser1-2/+4
2007-03-28Makfile: Get rid of prefix var, it's not necessaryTobias Klauser1-4/+3
Additionally this leads to problems when building debian packages
2007-03-28chanlog: Updates for 0.3Tobias Klauser1-3/+2
2007-03-18inotail.c: Proper exit after printing of versionTobias Klauser1-1/+1
2007-03-04inotail.c: Fix bug in parsing of +<num> parametersTobias Klauser1-2/+3
2007-03-04inotail.c: Datatype cleanupTobias Klauser1-2/+2
2007-03-03inotail.c: Ignore file cleanupTobias Klauser1-26/+23
Get rid of some nasty code. Ok, it isn't much better now.
2007-03-03Remove stuff unneeded in releaseTobias Klauser1-2/+2
2007-03-03inotail.c: Cleanup before releaseTobias Klauser1-17/+9
2007-03-02Preparing inotail 0.3Tobias Klauser1-0/+10
2007-02-26inotify-syscalls.h: Add syscall numbers for m32r for those who careTobias Klauser1-12/+10
Also do some cleanup work.
2007-02-09Makefile: Add -W to CFLAGSTobias Klauser1-1/+1
According to TAOSA chapter 6 -Wall does not warn about some bug types.
2007-02-05inotail.c: Some more branch predictionTobias Klauser1-6/+6
2007-02-05inotail.c: Better checking of -n/-c argumentsTobias Klauser1-10/+12
Also change n_lines/n_bytes to an unsigned long Additionally remove some spurious memset()'s
2007-02-03inotail.c: Remember last printed headerTobias Klauser1-1/+5
Prevents inotail from printing the header with the name of the file everytime it changes.
2007-02-02README: Small fixupsTobias Klauser1-4/+4
2007-01-22inotail.c: Set new file size _after_ read/write in handle_inotify_event()Tobias Klauser1-13/+10
This works around the problem when receving multiple inotify events for _one_ write to the file. This was a problem in the bordercase where the string written to the file was larger than 4096 chars, the last sizeof(string) - 4096 chars were repeated. Still have to check why there are _two_ IN_MODIFY events for _one_ write. But at least it does not affect inotail anymore. Also fix a dumb thinko in watch_files(): Move the ev_idx only one event forward, not n_files * INOTIFY_BUFLEN.
2007-01-22inotail.c: Gaaah! buf is on the stack now.Tobias Klauser1-2/+1
2007-01-21inotail.c: Use strcmp rather than strncmpTobias Klauser1-2/+2
We're compare against a constant string
2007-01-21Makefile: Consolidate CFLAGSTobias Klauser1-5/+3
2007-01-21inotail.c: Inline some functions and initialize files pointer in mainTobias Klauser1-3/+3