905-file-printf.dpatch 664 B

123456789101112131415161718
  1. #!/bin/sh /usr/share/dpatch/dpatch-run
  2. ## 905-file-printf.dpatch by Martin Dorey <mdorey@bluearc.com>
  3. ##
  4. ## DP: Removing annoying warnings when files can't be opened (Closes: #481512).
  5. @DPATCH@
  6. diff -Naurp file-4.24.orig/src/magic.c file-4.24/src/magic.c
  7. --- file-4.24.orig/src/magic.c 2008-05-04 14:12:49.000000000 +0000
  8. +++ file-4.24/src/magic.c 2008-05-21 08:47:05.000000000 +0000
  9. @@ -302,7 +302,6 @@ file_or_fd(struct magic_set *ms, const c
  10. (void)strcat(strcpy(tmp, inname), ".exe");
  11. if ((fd = open(tmp, flags)) < 0) {
  12. #endif
  13. - fprintf(stderr, "couldn't open file\n");
  14. if (info_from_stat(ms, sb.st_mode) == -1)
  15. goto done;
  16. rv = 0;