OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.6 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../util-linux/nice-mount-paths.patch.disabled
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. # Copyright (C) 1998 - 2003 Clifford Wolf
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This patch file is dual-licensed. It is available under the license the
  11. # patched project is licensed under, as long as it is an OpenSource license
  12. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  13. # of the GNU General Public License as published by the Free Software
  14. # Foundation; either version 2 of the License, or (at your option) any later
  15. # version.
  16. # --- SDE-COPYRIGHT-NOTE-END ---
  17. --- ./mount/mount.c.orig Wed Mar 21 10:07:59 2001
  18. +++ ./mount/mount.c Wed Mar 21 10:12:15 2001
  19. @@ -1061,6 +1061,23 @@
  20. /* Substitute values in opts, if required */
  21. opts = usersubst(opts);
  22. + /* make the node a nice absolute path name */
  23. + if (node[0] && node[0]!='/') {
  24. + char *thisdir=get_current_dir_name();
  25. + char *oldnode=node;
  26. + if (chdir(node) == 0) {
  27. + /* we will never free this variable ... */
  28. + node=get_current_dir_name();
  29. + chdir(thisdir);
  30. + if (verbose) printf("mount: change '%s' to '%s'\n",oldnode,node);
  31. + }
  32. + free(thisdir);
  33. + }
  34. + if (strlen(node)>=3 && node[strlen(node)-1]=='/') {
  35. + if (verbose) printf("mount: remove the leading '/' in '%s'\n",node);
  36. + node[strlen(node)-1]=0;
  37. + }
  38. +
  39. /* Merge the fstab and command line options. */
  40. if (opts == NULL)
  41. opts = cmdlineopts;