daily pastebin goal
61%
SHARE
TWEET

Untitled

a guest Oct 11th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. From 456cf216232cc3e7515dc836d78f9a33038d8d82 Mon Sep 17 00:00:00 2001
  2. From: John Peterson <john.peterson3@hotmail.com>
  3. Date: Mon, 21 May 2012 22:55:39 -0700
  4. Subject: [PATCH] Changed nfsd-rename return value when destination directory exist from nfserr-io to nfserr-notempty.
  5.  
  6. The client commands 'mv' and 'mv -f' should return notempty when the destination directory exist.
  7. ---
  8.  nfs.cl |    6 +++++-
  9.  1 files changed, 5 insertions(+), 1 deletions(-)
  10.  
  11. diff --git a/nfs.cl b/nfs.cl
  12. index 6e167c1..b018d4a 100644
  13. --- a/nfs.cl
  14. +++ b/nfs.cl
  15. @@ -1347,11 +1347,15 @@ struct entry {
  16.          (tofh (lookup-fh-in-dir todirfh tofilename))
  17.          ;; Use name provided by client (in case of hard link)
  18.          (to (add-filename-to-dirname (fh-pathname todirfh)
  19. -                         tofilename)))
  20. +                         tofilename))
  21. +        ;; See if the destination is a directory.
  22. +        (tofa (GetFileAttributes to)))
  23.         (if* (or
  24.           (eq (close-open-file fromfh :check-refcount t) :still-open)
  25.           (eq (close-open-file tofh :check-refcount t) :still-open))
  26.            then (xdr-int *nfsdxdr* #.*nfserr-perm*)
  27. +          elseif (and tofh (not (zerop (logand tofa FILE_ATTRIBUTE_DIRECTORY))))
  28. +          then (xdr-int *nfsdxdr* #.*nfserr-notempty*)
  29.            else #+ignore
  30.             (format t "~%rename ~a~%" fromfh)
  31.             ;; This will auto-delete any existing destination
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top