From: Dave Reisner <dreisner@archlinux.org>
To: util-linux@vger.kernel.org
Cc: Dave Reisner <dreisner@archlinux.org>
Subject: [PATCH] mountpoint: drop S_ISDIR check
Date: Thu, 21 Aug 2014 08:48:12 -0400 [thread overview]
Message-ID: <1408625292-2445-1-git-send-email-dreisner@archlinux.org> (raw)
Files can be mountpoints, too.
---
I can't find any reason for this check -- it seems to have existed since
mountpoint was added to the util-linux tree.
sys-utils/mountpoint.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/sys-utils/mountpoint.c b/sys-utils/mountpoint.c
index cba5f01..3919ab7 100644
--- a/sys-utils/mountpoint.c
+++ b/sys-utils/mountpoint.c
@@ -192,12 +192,6 @@ int main(int argc, char **argv)
else {
dev_t src;
- if (!S_ISDIR(st.st_mode)) {
- if (!quiet)
- errx(EXIT_FAILURE, _("%s: not a directory"), spec);
- return EXIT_FAILURE;
- }
-
if ( dir_to_device(spec, &src)) {
if (!quiet)
printf(_("%s is not a mountpoint\n"), spec);
--
2.1.0
next reply other threads:[~2014-08-21 12:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-21 12:48 Dave Reisner [this message]
2014-08-21 13:10 ` [PATCH] mountpoint: drop S_ISDIR check Karel Zak
2014-08-21 14:56 ` Bernhard Voelker
2014-08-21 15:30 ` Adam Sampson
2014-08-21 16:16 ` [PATCH] mountpoint.1: clarify that it works on files Dave Reisner
2014-08-22 6:35 ` Karel Zak
2014-08-21 15:38 ` [PATCH] mountpoint: drop S_ISDIR check Dave Reisner
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=1408625292-2445-1-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).