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.

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