]> code.delx.au - gnu-emacs/commitdiff
* net/tramp-smb.el (tramp-smb-errors): Use `regexp-opt'. Add
authorMichael Albinus <michael.albinus@gmx.de>
Sat, 5 Feb 2011 10:03:29 +0000 (11:03 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Sat, 5 Feb 2011 10:03:29 +0000 (11:03 +0100)
"NT_STATUS_IO_TIMEOUT" and "NT_STATUS_NO_SUCH_USER".

lisp/ChangeLog
lisp/net/tramp-smb.el

index 8af836b8164bfcb07fa9c3c753ee5fc4550430fd..cdf994dc4ff1fa994d0c9f5f62ebde7969bf27de 100644 (file)
@@ -1,3 +1,8 @@
+2011-02-05  Michael Albinus  <michael.albinus@gmx.de>
+
+       * net/tramp-smb.el (tramp-smb-errors): Use `regexp-opt'.  Add
+       "NT_STATUS_IO_TIMEOUT" and "NT_STATUS_NO_SUCH_USER".
+
 2011-02-05  Era Eriksson  <era+tramp@iki.fi>  (tiny change)
 
        * net/tramp.el (tramp-postfix-method-format)
index 052ef68170dbce27e26b4f77e85727baefcb3a3d..7e1b0f5b8e9824c1a9b96c61facc03fa5e68e557 100644 (file)
@@ -76,46 +76,48 @@ call, letting the SMB client use the default one."
   "Regexp used as prompt in smbclient.")
 
 (defconst tramp-smb-errors
-  ;; `regexp-opt' not possible because of first string.
   (mapconcat
    'identity
-   '(;; Connection error / timeout / unknown command.
-     "Connection to \\S-+ failed"
+   `(;; Connection error / timeout / unknown command.
+     "Connection\\( to \\S-+\\)? failed"
      "Read from server failed, maybe it closed the connection"
      "Call timed out: server did not respond"
      "\\S-+: command not found"
      "Server doesn't support UNIX CIFS calls"
-     ;; Samba.
-     "ERRDOS"
-     "ERRHRD"
-     "ERRSRV"
-     "ERRbadfile"
-     "ERRbadpw"
-     "ERRfilexists"
-     "ERRnoaccess"
-     "ERRnomem"
-     "ERRnosuchshare"
-     ;; Windows 4.0 (Windows NT), Windows 5.0 (Windows 2000),
-     ;; Windows 5.1 (Windows XP), Windows 5.2 (Windows Server 2003).
-     "NT_STATUS_ACCESS_DENIED"
-     "NT_STATUS_ACCOUNT_LOCKED_OUT"
-     "NT_STATUS_BAD_NETWORK_NAME"
-     "NT_STATUS_CANNOT_DELETE"
-     "NT_STATUS_CONNECTION_REFUSED"
-     "NT_STATUS_DIRECTORY_NOT_EMPTY"
-     "NT_STATUS_DUPLICATE_NAME"
-     "NT_STATUS_FILE_IS_A_DIRECTORY"
-     "NT_STATUS_LOGON_FAILURE"
-     "NT_STATUS_NETWORK_ACCESS_DENIED"
-     "NT_STATUS_NOT_IMPLEMENTED"
-     "NT_STATUS_NO_SUCH_FILE"
-     "NT_STATUS_OBJECT_NAME_COLLISION"
-     "NT_STATUS_OBJECT_NAME_INVALID"
-     "NT_STATUS_OBJECT_NAME_NOT_FOUND"
-     "NT_STATUS_SHARING_VIOLATION"
-     "NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE"
-     "NT_STATUS_UNSUCCESSFUL"
-     "NT_STATUS_WRONG_PASSWORD")
+     ,(regexp-opt
+       '(;; Samba.
+        "ERRDOS"
+        "ERRHRD"
+        "ERRSRV"
+        "ERRbadfile"
+        "ERRbadpw"
+        "ERRfilexists"
+        "ERRnoaccess"
+        "ERRnomem"
+        "ERRnosuchshare"
+        ;; Windows 4.0 (Windows NT), Windows 5.0 (Windows 2000),
+        ;; Windows 5.1 (Windows XP), Windows 5.2 (Windows Server 2003).
+        "NT_STATUS_ACCESS_DENIED"
+        "NT_STATUS_ACCOUNT_LOCKED_OUT"
+        "NT_STATUS_BAD_NETWORK_NAME"
+        "NT_STATUS_CANNOT_DELETE"
+        "NT_STATUS_CONNECTION_REFUSED"
+        "NT_STATUS_DIRECTORY_NOT_EMPTY"
+        "NT_STATUS_DUPLICATE_NAME"
+        "NT_STATUS_FILE_IS_A_DIRECTORY"
+        "NT_STATUS_IO_TIMEOUT"
+        "NT_STATUS_LOGON_FAILURE"
+        "NT_STATUS_NETWORK_ACCESS_DENIED"
+        "NT_STATUS_NOT_IMPLEMENTED"
+        "NT_STATUS_NO_SUCH_FILE"
+        "NT_STATUS_NO_SUCH_USER"
+        "NT_STATUS_OBJECT_NAME_COLLISION"
+        "NT_STATUS_OBJECT_NAME_INVALID"
+        "NT_STATUS_OBJECT_NAME_NOT_FOUND"
+        "NT_STATUS_SHARING_VIOLATION"
+        "NT_STATUS_TRUSTED_RELATIONSHIP_FAILURE"
+        "NT_STATUS_UNSUCCESSFUL"
+        "NT_STATUS_WRONG_PASSWORD")))
    "\\|")
   "Regexp for possible error strings of SMB servers.
 Used instead of analyzing error codes of commands.")
@@ -1037,17 +1039,17 @@ Result is a list of (LOCALNAME MODE SIZE MONTH DAY TIME YEAR)."
 ;; \s-\{2,2}                              - leading spaces
 ;; \S-\(.*\S-\)\s-*                       - file name, 30 chars, left bound
 ;; \s-+[ADHRSV]*                          - permissions, 7 chars, right bound
-;; \s-                                    - space delimeter
+;; \s-                                    - space delimiter
 ;; \s-+[0-9]+                             - size, 8 chars, right bound
-;; \s-\{2,2\}                             - space delimeter
+;; \s-\{2,2\}                             - space delimiter
 ;; \w\{3,3\}                              - weekday
-;; \s-                                    - space delimeter
+;; \s-                                    - space delimiter
 ;; \w\{3,3\}                              - month
-;; \s-                                    - space delimeter
+;; \s-                                    - space delimiter
 ;; [ 12][0-9]                             - day
-;; \s-                                    - space delimeter
+;; \s-                                    - space delimiter
 ;; [0-9]\{2,2\}:[0-9]\{2,2\}:[0-9]\{2,2\} - time
-;; \s-                                    - space delimeter
+;; \s-                                    - space delimiter
 ;; [0-9]\{4,4\}                           - year
 ;;
 ;; samba/src/client.c (http://samba.org/doxygen/samba/client_8c-source.html)