diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-04-26 14:03:39 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-04-26 14:03:39 +0000 |
commit | 9d4f43ae500a3a3ecc6058f87647322793b4c7c8 (patch) | |
tree | b404486217dc05d00b741c14fdd3792472b736da /nis/nss-nisplus.h | |
parent | Update. (diff) | |
download | glibc-9d4f43ae500a3a3ecc6058f87647322793b4c7c8.tar.gz glibc-9d4f43ae500a3a3ecc6058f87647322793b4c7c8.tar.bz2 glibc-9d4f43ae500a3a3ecc6058f87647322793b4c7c8.zip |
Update.
* nis/nss-nisplus.h: Move niserr2nss_tab definition into separate file
and rename to __niserr2nss_tab. Change NISERR_COUNT into variable
__niserr2nss_count.
* nis/nss-nisplus.c: New file.
(libnss_nisplus-routines): Add nss-nisplus.
* nss_nisplus/nisplus-alias.c: Remove unnecessary initializations.
* nss_nisplus/nisplus-ethers.c: Likewise.
* nss_nisplus/nisplus-grp.c: Likewise.
* nss_nisplus/nisplus-hosts.c: Likewise.
* nss_nisplus/nisplus-network.c: Likewise.
* nss_nisplus/nisplus-proto.c: Likewise.
* nss_nisplus/nisplus-pwd.c: Likewise.
* nss_nisplus/nisplus-rpc.c: Likewise.
* nss_nisplus/nisplus-service.c: Likewise.
* nss_nisplus/nisplus-spwd.c: Likewise.
Diffstat (limited to 'nis/nss-nisplus.h')
-rw-r--r-- | nis/nss-nisplus.h | 58 |
1 files changed, 4 insertions, 54 deletions
diff --git a/nis/nss-nisplus.h b/nis/nss-nisplus.h index f2247c7eb4..436a2e6e20 100644 --- a/nis/nss-nisplus.h +++ b/nis/nss-nisplus.h @@ -26,65 +26,15 @@ /* Convert NIS+ error number to NSS error number. */ -static enum nss_status niserr2nss_tab[] = -{ - [NIS_SUCCESS] = NSS_STATUS_SUCCESS, - [NIS_S_SUCCESS] = NSS_STATUS_SUCCESS, - [NIS_NOTFOUND] = NSS_STATUS_NOTFOUND, - [NIS_S_NOTFOUND] = NSS_STATUS_NOTFOUND, - [NIS_CACHEEXPIRED] = NSS_STATUS_UNAVAIL, - [NIS_NAMEUNREACHABLE] = NSS_STATUS_UNAVAIL, - [NIS_UNKNOWNOBJ] = NSS_STATUS_NOTFOUND, - [NIS_TRYAGAIN] = NSS_STATUS_TRYAGAIN, - [NIS_SYSTEMERROR] = NSS_STATUS_UNAVAIL, - [NIS_CHAINBROKEN] = NSS_STATUS_UNAVAIL, - [NIS_PERMISSION] = NSS_STATUS_UNAVAIL, - [NIS_NOTOWNER] = NSS_STATUS_UNAVAIL, - [NIS_NOT_ME] = NSS_STATUS_UNAVAIL, - [NIS_NOMEMORY] = NSS_STATUS_TRYAGAIN, - [NIS_NAMEEXISTS] = NSS_STATUS_UNAVAIL, - [NIS_NOTMASTER] = NSS_STATUS_UNAVAIL, - [NIS_INVALIDOBJ] = NSS_STATUS_UNAVAIL, - [NIS_BADNAME] = NSS_STATUS_UNAVAIL, - [NIS_NOCALLBACK] = NSS_STATUS_UNAVAIL, - [NIS_CBRESULTS] = NSS_STATUS_UNAVAIL, - [NIS_NOSUCHNAME] = NSS_STATUS_NOTFOUND, - [NIS_NOTUNIQUE] = NSS_STATUS_UNAVAIL, - [NIS_IBMODERROR] = NSS_STATUS_UNAVAIL, - [NIS_NOSUCHTABLE] = NSS_STATUS_UNAVAIL, - [NIS_TYPEMISMATCH] = NSS_STATUS_UNAVAIL, - [NIS_LINKNAMEERROR] = NSS_STATUS_UNAVAIL, - [NIS_PARTIAL] = NSS_STATUS_NOTFOUND, - [NIS_TOOMANYATTRS] = NSS_STATUS_UNAVAIL, - [NIS_RPCERROR] = NSS_STATUS_UNAVAIL, - [NIS_BADATTRIBUTE] = NSS_STATUS_UNAVAIL, - [NIS_NOTSEARCHABLE] = NSS_STATUS_UNAVAIL, - [NIS_CBERROR] = NSS_STATUS_UNAVAIL, - [NIS_FOREIGNNS] = NSS_STATUS_UNAVAIL, - [NIS_BADOBJECT] = NSS_STATUS_UNAVAIL, - [NIS_NOTSAMEOBJ] = NSS_STATUS_UNAVAIL, - [NIS_MODFAIL] = NSS_STATUS_UNAVAIL, - [NIS_BADREQUEST] = NSS_STATUS_UNAVAIL, - [NIS_NOTEMPTY] = NSS_STATUS_UNAVAIL, - [NIS_COLDSTART_ERR] = NSS_STATUS_UNAVAIL, - [NIS_RESYNC] = NSS_STATUS_UNAVAIL, - [NIS_FAIL] = NSS_STATUS_UNAVAIL, - [NIS_UNAVAIL] = NSS_STATUS_UNAVAIL, - [NIS_RES2BIG] = NSS_STATUS_UNAVAIL, - [NIS_SRVAUTH] = NSS_STATUS_UNAVAIL, - [NIS_CLNTAUTH] = NSS_STATUS_UNAVAIL, - [NIS_NOFILESPACE] = NSS_STATUS_UNAVAIL, - [NIS_NOPROC] = NSS_STATUS_UNAVAIL, - [NIS_DUMPLATER] = NSS_STATUS_UNAVAIL -}; -#define NISERR_COUNT (sizeof (niserr2nss_tab) / sizeof (niserr2nss_tab[0])) +extern const enum nss_status __niserr2nss_tab[]; +extern const unsigned int __niserr2nss_count; static inline enum nss_status niserr2nss (int errval) { - if ((unsigned int) errval > NISERR_COUNT) + if ((unsigned int) errval > __niserr2nss_count) return NSS_STATUS_UNAVAIL; - return niserr2nss_tab[errval]; + return __niserr2nss_tab[errval]; } #endif /* nis/nss-nisplus.h */ |