Skip to content

Commit

Permalink
findmnt: fallback to mountinfo for polling
Browse files Browse the repository at this point in the history
If no tabfiles are specified, default to watching /proc/self/mountinfo
rather than exiting silently with EXIT_FAILURE.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
  • Loading branch information
falconindy authored and karelzak committed May 23, 2012
1 parent beda9dd commit b8a670a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions misc-utils/findmnt.c
Expand Up @@ -1320,8 +1320,7 @@ int main(int argc, char *argv[])
*/
if (flags & FL_POLL) {
/* poll mode (accept the first tabfile only) */
if (tabfiles && ntabfiles > 0)
rc = poll_table(tb, *tabfiles, timeout, tt, direction);
rc = poll_table(tb, tabfiles ? *tabfiles : _PATH_PROC_MOUNTINFO, timeout, tt, direction);

} else if ((tt_flags & TT_FL_TREE) && is_listall_mode())
/* whole tree */
Expand Down

0 comments on commit b8a670a

Please sign in to comment.