patch-hotplug-diskmount_c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. $OpenBSD: patch-hotplug-diskmount_c,v 1.3 2016/11/13 20:26:55 dcoppa Exp $
  2. --- hotplug-diskmount.c.orig Sun Nov 13 21:19:35 2016
  3. +++ hotplug-diskmount.c Sun Nov 13 21:21:29 2016
  4. @@ -406,13 +406,13 @@ check_ntfs3g(void)
  5. {
  6. struct stat sb;
  7. - return (stat("/usr/local/bin/ntfs-3g", &sb) == 0);
  8. + return (stat("${LOCALBASE}/bin/ntfs-3g", &sb) == 0);
  9. }
  10. /*
  11. * Return Values:
  12. * 0 - OK
  13. - * ECANCELED - /usr/local/bin/ntfs-3g exited with non-zero exit code
  14. + * ECANCELED - ${LOCALBASE}/bin/ntfs-3g exited with non-zero exit code
  15. * other values - fork() returned with error
  16. */
  17. int
  18. @@ -431,7 +431,7 @@ do_ntfs3g(int idx, const char *dev, const char *mp, in
  19. mounter_pid[idx] = fork();
  20. if (mounter_pid[idx] == 0) {
  21. setsid();
  22. - execv("/usr/local/bin/ntfs-3g", argv);
  23. + execv("${LOCALBASE}/bin/ntfs-3g", argv);
  24. exit(errno);
  25. }
  26. @@ -466,7 +466,7 @@ get_ntfs3g_label(const char *dev, char *diskname)
  27. pid = fork();
  28. if (pid == 0) {
  29. dup2(fds[1], 1);
  30. - execv("/usr/local/sbin/ntfslabel", argv);
  31. + execv("${LOCALBASE}/sbin/ntfslabel", argv);
  32. exit(errno);
  33. } else if (pid < 0) {
  34. close(fds[0]);