aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2011-05-17 14:47:55 +0200
committerMichael Albinus2011-05-17 14:47:55 +0200
commit7c1d9aa0bd508b0b3e0506bca7384dc41cfe7484 (patch)
treeb5d3707868b391d2f2e2c9c67f801fa00ebdddfd
parent7edd2093898ad14d78da23a3ea690df7de5616c4 (diff)
downloademacs-7c1d9aa0bd508b0b3e0506bca7384dc41cfe7484.tar.gz
emacs-7c1d9aa0bd508b0b3e0506bca7384dc41cfe7484.zip
* net/tramp.el (tramp-handle-insert-file-contents): Use "dd"
instead of "head" and "tail". There were problems with SunOS 5.9, and it performs better.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/net/tramp.el12
2 files changed, 12 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 844fcaad833..79427663988 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12011-05-17 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/tramp.el (tramp-handle-insert-file-contents): Use "dd"
4 instead of "head" and "tail". There were problems with SunOS 5.9,
5 and it performs better.
6
12011-05-17 Glenn Morris <rgm@gnu.org> 72011-05-17 Glenn Morris <rgm@gnu.org>
2 8
3 * mail/mail-utils.el (mail-dont-reply-to): Silence compiler. 9 * mail/mail-utils.el (mail-dont-reply-to): Silence compiler.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 693e082ecc8..bc831c3b596 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2838,16 +2838,16 @@ User is always nil."
2838 v 2838 v
2839 (cond 2839 (cond
2840 ((and beg end) 2840 ((and beg end)
2841 (format "tail -c +%d %s | head -c +%d >%s" 2841 (format "dd bs=1 skip=%d if=%s count=%d of=%s"
2842 (1+ beg) (tramp-shell-quote-argument localname) 2842 beg (tramp-shell-quote-argument localname)
2843 (- end beg) remote-copy)) 2843 (- end beg) remote-copy))
2844 (beg 2844 (beg
2845 (format "tail -c +%d %s >%s" 2845 (format "dd bs=1 skip=%d if=%s of=%s"
2846 (1+ beg) (tramp-shell-quote-argument localname) 2846 beg (tramp-shell-quote-argument localname)
2847 remote-copy)) 2847 remote-copy))
2848 (end 2848 (end
2849 (format "head -c +%d %s >%s" 2849 (format "dd bs=1 count=%d if=%s of=%s"
2850 (1+ end) (tramp-shell-quote-argument localname) 2850 end (tramp-shell-quote-argument localname)
2851 remote-copy))))) 2851 remote-copy)))))
2852 2852
2853 ;; `insert-file-contents-literally' takes care to avoid 2853 ;; `insert-file-contents-literally' takes care to avoid