Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netsmb replace some magic error number with descriptive ...
details: https://anonhg.NetBSD.org/src/rev/453a4f142799
branches: trunk
changeset: 543146:453a4f142799
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Tue Feb 18 10:09:28 2003 +0000
description:
replace some magic error number with descriptive defines; meaning of the numbers
found in Samba/Linux smbfs
diffstat:
sys/netsmb/smb.h | 8 +++++++-
sys/netsmb/smb_subr.c | 14 +++++++-------
2 files changed, 14 insertions(+), 8 deletions(-)
diffs (73 lines):
diff -r 2960e7ff99b8 -r 453a4f142799 sys/netsmb/smb.h
--- a/sys/netsmb/smb.h Tue Feb 18 09:55:09 2003 +0000
+++ b/sys/netsmb/smb.h Tue Feb 18 10:09:28 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: smb.h,v 1.3 2002/01/04 02:39:38 deberg Exp $ */
+/* $NetBSD: smb.h,v 1.4 2003/02/18 10:09:29 jdolecek Exp $ */
/*
* Copyright (c) 2000-2001 Boris Popov
@@ -324,13 +324,19 @@
#define ERRnofiles 18 /* no more files found in file search */
#define ERRbadshare 32 /* Share mode can't be granted */
#define ERRlock 33 /* A lock request conflicts with existing lock */
+#define ERRbaddevice 66 /* Bad Device Type */
+#define ERRbadnetname 67 /* Bad Network Name */
#define ERRfilexists 80 /* The file named in the request already exists */
+#define ERRinvname 123 /* Invalid Name */
+#define ERRdirnempty 145 /* Directory Not Empty */
+#define ERReexists 183 /* Already Exists */
/*
* Error codes for the ERRSRV class
*/
#define ERRerror 1 /* Non-specific error code */
#define ERRbadpw 2 /* Bad password */
+#define ERRsrvbaddevice 3 /* Reserved - Bad Device Type */
#define ERRaccess 4 /* The client doesn't have enough access rights */
#define ERRinvnid 5 /* The Tid specified in a command is invalid */
#define ERRinvnetname 6 /* Invalid server name in the tree connect */
diff -r 2960e7ff99b8 -r 453a4f142799 sys/netsmb/smb_subr.c
--- a/sys/netsmb/smb_subr.c Tue Feb 18 09:55:09 2003 +0000
+++ b/sys/netsmb/smb_subr.c Tue Feb 18 10:09:28 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: smb_subr.c,v 1.5 2003/02/15 23:02:30 jdolecek Exp $ */
+/* $NetBSD: smb_subr.c,v 1.6 2003/02/18 10:09:28 jdolecek Exp $ */
/*
* Copyright (c) 2000-2001 Boris Popov
@@ -230,8 +230,8 @@
case ERRbadfile:
case ERRbadpath:
case ERRremcd:
- case 66: /* nt returns it when share not available */
- case 67: /* observed from nt4sp6 when sharename wrong */
+ case ERRbaddevice: /* nt returns it when share not available */
+ case ERRbadnetname: /* observed from nt4sp6 when sharename wrong */
return ENOENT;
case ERRnofids:
return EMFILE;
@@ -260,11 +260,11 @@
return EDEADLK;
case ERRfilexists:
return EEXIST;
- case 123: /* dunno what is it, but samba maps as noent */
+ case ERRinvname: /* dunno what is it, but samba maps as noent */
return ENOENT;
- case 145: /* samba */
+ case ERRdirnempty: /* samba */
return ENOTEMPTY;
- case 183:
+ case ERReexists:
return EEXIST;
}
break;
@@ -281,7 +281,7 @@
case ERRinvnetname:
SMBERROR("NetBIOS name is invalid\n");
return EAUTH;
- case 3: /* reserved and returned */
+ case ERRsrvbaddevice: /* reserved and returned */
return EIO;
case 2239: /* NT: account exists but disabled */
return EPERM;
Home |
Main Index |
Thread Index |
Old Index