Skip to content
Browse files

findmnt: fallback to mountinfo for polling

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...
1 parent beda9dd commit b8a670aecf21645869f2d9c72469607462829fc8 @falconindy falconindy committed with
Showing with 1 addition and 2 deletions.
  1. +1 −2 misc-utils/findmnt.c
View
3 misc-utils/findmnt.c
@@ -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 */

0 comments on commit b8a670a

Please sign in to comment.
Something went wrong with that request. Please try again.