diff: Fix device case.
We already fell back to Stone for FIFOs, but we actually need to fall back to Stone for everything except regular files, because libdiff's atomizer needs to know the size of its input in advance, and neither FIFOs nor devices can be trusted to report their size. MFC after: 1 week Reported by: mav Reviewed by: mav, allanjude Differential Revision: https://reviews.freebsd.org/D48181
This commit is contained in:
@@ -314,8 +314,8 @@ openfile(const char *path, char **p, struct stat *st)
|
||||
bool
|
||||
can_libdiff(int flags)
|
||||
{
|
||||
/* We can't use fifos with libdiff yet */
|
||||
if (S_ISFIFO(stb1.st_mode) || S_ISFIFO(stb2.st_mode))
|
||||
/* libdiff's atomizer can only deal with files */
|
||||
if (!S_ISREG(stb1.st_mode) || !S_ISREG(stb2.st_mode))
|
||||
return false;
|
||||
|
||||
/* Is this one of the supported input/output modes for diffreg_new? */
|
||||
|
||||
Reference in New Issue
Block a user