diff options
| author | cgd <cgd@NetBSD.org> | 1993-03-24 22:54:22 +0000 |
|---|---|---|
| committer | cgd <cgd@NetBSD.org> | 1993-03-24 22:54:22 +0000 |
| commit | 609f072018b4fef9a7322e559c4eaf6d4ccc19f7 (patch) | |
| tree | 68fbf57cad7bf7f68e42513092e67f062a1b1e18 /usr.bin/find/function.c | |
| parent | 0be333bc99cdeeafdd77fdfcd4d2be2d598612b1 (diff) | |
fixed fact that "rdonly" wasn't supported by -fstype, but the man
page said it was. also fixed multiple fstype checks on the same
partition
Diffstat (limited to 'usr.bin/find/function.c')
| -rw-r--r-- | usr.bin/find/function.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/usr.bin/find/function.c b/usr.bin/find/function.c index 510a0d1145b..08cd151424b 100644 --- a/usr.bin/find/function.c +++ b/usr.bin/find/function.c @@ -320,8 +320,7 @@ f_fstype(plan, entry) { static dev_t curdev; /* need a guaranteed illegal dev value */ static int first = 1; - struct statfs sb; - static short val; + static struct statfs sb; char *p, save[2]; /* only check when we cross mount point */ @@ -355,10 +354,9 @@ f_fstype(plan, entry) } first = 0; - val = plan->flags == MOUNT_NONE ? sb.f_flags : sb.f_type; } return(plan->flags == MOUNT_NONE ? - val & MNT_LOCAL : val == plan->flags); + sb.f_flags & plan->m_flags : sb.f_type == plan->flags); } PLAN * @@ -380,6 +378,7 @@ c_fstype(arg) case 'l': if (!strcmp(arg, "local")) { new->flags = MOUNT_NONE; + new->m_flags = MNT_LOCAL; return(new); } break; @@ -399,6 +398,13 @@ c_fstype(arg) return(new); } break; + case 'r': + if (!strcmp(arg, "rdonly")) { + new->flags = MOUNT_NONE; + new->m_flags = MNT_RDONLY; + return(new); + } + break; case 'u': if (!strcmp(arg, "ufs")) { new->flags = MOUNT_UFS; |
