All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mountpoint: drop S_ISDIR check
@ 2014-08-21 12:48 Dave Reisner
  2014-08-21 13:10 ` Karel Zak
  2014-08-21 14:56 ` Bernhard Voelker
  0 siblings, 2 replies; 7+ messages in thread
From: Dave Reisner @ 2014-08-21 12:48 UTC (permalink / raw)
  To: util-linux; +Cc: Dave Reisner

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-08-22  6:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-21 12:48 [PATCH] mountpoint: drop S_ISDIR check Dave Reisner
2014-08-21 13:10 ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.