diff options
| author | David Greenman <dg@FreeBSD.org> | 1995-02-15 14:45:08 +0000 |
|---|---|---|
| committer | David Greenman <dg@FreeBSD.org> | 1995-02-15 14:45:08 +0000 |
| commit | 792016e7a480172a9607151db8e40ee5a43550b4 (patch) | |
| tree | 4b168441b0ea59e08c2f399dba489bb4c17cd2d4 | |
| parent | 32e68582d1014346eab8e73e676c25d3d886af5c (diff) | |
Notes
| -rw-r--r-- | sbin/mount/mount.c | 2 | ||||
| -rw-r--r-- | sbin/mount_ifs/mount.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index 691c07a473db..a33a44ad5b31 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -262,7 +262,7 @@ mountfs(vfstype, spec, name, flags, options, mntopts) char *optbuf, execname[MAXPATHLEN + 1], mntpath[MAXPATHLEN]; if ((realpath(name, mntpath) != NULL) && (stat(mntpath, &sb) == NULL)) { - if ((sb.st_mode & S_IFDIR) == 0) { + if (!S_ISDIR(sb.st_mode)) { warnx("%s: Not a directory", mntpath); return (1); } diff --git a/sbin/mount_ifs/mount.c b/sbin/mount_ifs/mount.c index 691c07a473db..a33a44ad5b31 100644 --- a/sbin/mount_ifs/mount.c +++ b/sbin/mount_ifs/mount.c @@ -262,7 +262,7 @@ mountfs(vfstype, spec, name, flags, options, mntopts) char *optbuf, execname[MAXPATHLEN + 1], mntpath[MAXPATHLEN]; if ((realpath(name, mntpath) != NULL) && (stat(mntpath, &sb) == NULL)) { - if ((sb.st_mode & S_IFDIR) == 0) { + if (!S_ISDIR(sb.st_mode)) { warnx("%s: Not a directory", mntpath); return (1); } |
