mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
diff: consider two files with same inodes as identical
Obtained from: OpenBSD MFC after: 1 week
This commit is contained in:
parent
67bceb38f4
commit
824bbb9a40
1 changed files with 4 additions and 0 deletions
|
|
@ -440,6 +440,10 @@ files_differ(FILE *f1, FILE *f2, int flags)
|
|||
if ((flags & (D_EMPTY1|D_EMPTY2)) || stb1.st_size != stb2.st_size ||
|
||||
(stb1.st_mode & S_IFMT) != (stb2.st_mode & S_IFMT))
|
||||
return (1);
|
||||
|
||||
if (stb1.st_dev == stb2.st_dev && stb1.st_ino == stb2.st_ino)
|
||||
return (0);
|
||||
|
||||
for (;;) {
|
||||
i = fread(buf1, 1, sizeof(buf1), f1);
|
||||
j = fread(buf2, 1, sizeof(buf2), f2);
|
||||
|
|
|
|||
Loading…
Reference in a new issue