mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 19:52:44 +00:00
Make passing unknown fstypes to -fstype result in a warning instead of
an error. As it was, which find command lines that would work (be accepted at all) was dependent on the presently running kernel, making script writing and porting hard.
This commit is contained in:
parent
fc3345a4a7
commit
1e2f8412e0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=63969
@ -564,6 +564,14 @@ f_fstype(plan, entry)
|
||||
}
|
||||
|
||||
#if !defined(__NetBSD__)
|
||||
int
|
||||
f_always_false(plan, entry)
|
||||
PLAN *plan;
|
||||
FTSENT *entry;
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
PLAN *
|
||||
c_fstype(arg)
|
||||
char *arg;
|
||||
@ -600,8 +608,14 @@ c_fstype(arg)
|
||||
}
|
||||
break;
|
||||
}
|
||||
errx(1, "%s: unknown file type", arg);
|
||||
/* NOTREACHED */
|
||||
/*
|
||||
* We need to make filesystem checks for filesystems
|
||||
* that exists but aren't in the kernel work.
|
||||
*/
|
||||
fprintf(stderr, "Warning: Unknown filesystem type %s\n", arg);
|
||||
free(new);
|
||||
|
||||
return (palloc(N_FSTYPE, f_always_false));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user