mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-21 11:16:16 +02:00
tail: with -f, use polling when a file is on an FS of unknown type
Before, we would use inotify in that case, which would work as long as updates were taking place locally, but not at all when remote. Move hard-coded list of known remote FS types into a more maintainable table in stat.c, alongside the list of FS names and magic numbers. Generate a new is_local_fs_type function. * src/Makefile.am (fs-is-local.h): New rule, generated file. * src/extract-magic: Revamp to parse local/remote keyword after each magic number in src/stat.c's case statements. Accept new --local option. * src/.gitignore: Ignore the generated fs-is-local.h. * src/tail.c [HAVE_INOTIFY]: Include fs-is-local.h. (fremote) [HAVE_INOTIFY]: Use the new function in place of the switch stmt with hard-coded list of FS types. Emit a warning when processing a file on a file system of unknown type. * NEWS (Changes in behavior): Mention it. Suggested by Sven Breuner.
This commit is contained in:
7
NEWS
7
NEWS
@@ -32,6 +32,13 @@ GNU coreutils NEWS -*- outline -*-
|
||||
[you might say this was introduced in coreutils-7.5, along with inotify
|
||||
support, but the new magic numbers weren't in the usual places then.]
|
||||
|
||||
** Changes in behavior
|
||||
|
||||
tail -f now uses polling (not inotify) when any of its file arguments
|
||||
resides on a file system of unknown type. In addition, for each such
|
||||
argument, tail -f prints a warning with the FS type magic number and a
|
||||
request to report it to the bug-reporting address.
|
||||
|
||||
|
||||
* Noteworthy changes in release 8.14 (2011-10-12) [stable]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user