[PATCH] mountpoint: drop S_ISDIR check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux