From: Dave Reisner <dreisner@archlinux.org>
To: util-linux@vger.kernel.org
Cc: Dave Reisner <dreisner@archlinux.org>
Subject: [PATCH 2/3] findmnt: fallback to mountinfo for polling
Date: Sat, 19 May 2012 20:39:20 -0400 [thread overview]
Message-ID: <1337474361-22429-2-git-send-email-dreisner@archlinux.org> (raw)
In-Reply-To: <1337474361-22429-1-git-send-email-dreisner@archlinux.org>
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>
---
misc-utils/findmnt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/misc-utils/findmnt.c b/misc-utils/findmnt.c
index 9005483..eab224a 100644
--- a/misc-utils/findmnt.c
+++ b/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 */
--
1.7.10.2
next prev parent reply other threads:[~2012-05-20 0:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-20 0:39 [PATCH 1/3] findmnt: reference correct manual section Dave Reisner
2012-05-20 0:39 ` Dave Reisner [this message]
2012-05-23 8:25 ` [PATCH 2/3] findmnt: fallback to mountinfo for polling Karel Zak
2012-05-20 0:39 ` [PATCH 3/3] libmount/utils: Use binary search to compare pseudofs Dave Reisner
2012-05-20 14:06 ` Davidlohr Bueso
2012-05-20 14:51 ` Dave Reisner
2012-05-20 16:05 ` Davidlohr Bueso
2012-05-20 16:38 ` Dave Reisner
2012-05-20 16:47 ` Davidlohr Bueso
2012-05-20 16:57 ` [PATCH] " Dave Reisner
2012-05-23 8:26 ` Karel Zak
2012-05-23 8:25 ` [PATCH 1/3] findmnt: reference correct manual section Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337474361-22429-2-git-send-email-dreisner@archlinux.org \
--to=dreisner@archlinux.org \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).