]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mountpoint: drop S_ISDIR check
authorDave Reisner <dreisner@archlinux.org>
Thu, 21 Aug 2014 12:48:12 +0000 (08:48 -0400)
committerKarel Zak <kzak@redhat.com>
Thu, 21 Aug 2014 13:05:45 +0000 (15:05 +0200)
Files can be mountpoints, too.

sys-utils/mountpoint.c

index cba5f0125b5579313638331aa7ded30169080b8e..3919ab74818f93366977a347b92b32aa64b04298 100644 (file)
@@ -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);