FreeBSD Bugzilla – Attachment 221499 Details for
Bug 252614
/usr/bin/diff : BUG: Incorrectly displaying files as duplicates (includes fix)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to fix diff bug
patch-diff.patch (text/plain), 1.52 KB, created by
Jamie Landeg-Jones
on 2021-01-12 16:53:19 UTC
(
hide
)
Description:
patch to fix diff bug
Filename:
MIME Type:
Creator:
Jamie Landeg-Jones
Created:
2021-01-12 16:53:19 UTC
Size:
1.52 KB
patch
obsolete
>--- usr.bin/diff/diff.h.orig 2021-01-06 05:22:41.672124000 +0000 >+++ usr.bin/diff/diff.h 2021-01-06 05:34:02.134227000 +0000 >@@ -83,6 +83,7 @@ > #define D_MISMATCH2 4 /* path1 was a file, path2 a dir */ > #define D_SKIPPED1 5 /* path1 was a special file */ > #define D_SKIPPED2 6 /* path2 was a special file */ >+#define D_ERROR 7 /* A file access error occurred */ > > struct excludes { > char *pattern; >--- usr.bin/diff/diff.c.orig 2021-01-06 05:22:41.672067000 +0000 >+++ usr.bin/diff/diff.c 2021-01-06 05:35:11.308546000 +0000 >@@ -511,6 +511,8 @@ > printf("File %s%s is not a regular file or directory and was skipped\n", > path2, entry); > break; >+ case D_ERROR: >+ break; > } > } > >--- usr.bin/diff/diffreg.c.orig 2021-01-06 05:22:41.672285000 +0000 >+++ usr.bin/diff/diffreg.c 2021-01-06 05:38:33.991406000 +0000 >@@ -299,6 +299,7 @@ > if ((f1 = opentemp(file1)) == NULL || > fstat(fileno(f1), &stb1) == -1) { > warn("%s", file1); >+ rval = D_ERROR; > status |= 2; > goto closem; > } >@@ -309,6 +310,7 @@ > } > if (f1 == NULL) { > warn("%s", file1); >+ rval = D_ERROR; > status |= 2; > goto closem; > } >@@ -320,6 +322,7 @@ > if ((f2 = opentemp(file2)) == NULL || > fstat(fileno(f2), &stb2) == -1) { > warn("%s", file2); >+ rval = D_ERROR; > status |= 2; > goto closem; > } >@@ -330,6 +333,7 @@ > } > if (f2 == NULL) { > warn("%s", file2); >+ rval = D_ERROR; > status |= 2; > goto closem; > } >@@ -365,6 +369,7 @@ > break; > default: > /* error */ >+ rval = D_ERROR; > status |= 2; > goto closem; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 252614
: 221499