Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/src/cmd/aux/ncpfs/nwerrstr.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#include <u.h>
#include <libc.h>

static struct {
	uint err;
	char *msg;
} NWerrs[] ={
	{ 0,   "ok" },
	{ 1,   "insufficent disk space" },
	{ 0x21,	"unable to bind" },
	{ 0x73, "revoke handle rights not found" },
	{ 0x74, "remote not allowed" },
	{ 0x75, "unknwon success or failure" },
	{ 0x76, "buffer not long aligned" },
	{ 0x77, "buffer too small" },
	{ 0x78, "volume flag not set" },
	{ 0x79, "no items found" },
	{ 0x7a, "connection already temporary" },
	{ 0x7b, "connection already logged in" },
	{ 0x7c, "connection not authenticated" },
	{ 0x7d, "connection not logged in" },
	{ 0x7e, "ncp boundary check failed" },
	{ 0x7f, "lock waiting" },
	{ 0x80, "lock fail" },
	{ 0x81, "out of handles" },
	{ 0x82, "no open privilege" },
	{ 0x83, "hard io error" },
	{ 0x84, "no create privilege" },
	{ 0x85, "no create delete privilege" },
	{ 0x86, "r o create file" },
	{ 0x87, "create file invalid name" },
	{ 0x88, "invalid file handle" },
	{ 0x89, "no search privilege" },
	{ 0x8a, "no delete privilege" },
	{ 0x8b, "no rename privilege" },
	{ 0x8c, "no set privilege" },
	{ 0x8d, "some files in use" },
	{ 0x8e, "all files in use" },
	{ 0x8f, "some read only" },
	{ 0x90, "all read only" },
	{ 0x91, "some names exist" },
	{ 0x92, "all names exist" },
	{ 0x93, "no read privilege" },
	{ 0x94, "no write privilege" },
	{ 0x95, "file detached" },
	{ 0x96, "no alloc space" },
	{ 0x96, "target not a subdirectory" },
	{ 0x97, "no spool space" },
	{ 0x98, "invalid volume" },
	{ 0x99, "directory full" },
	{ 0x9a, "rename across volume" },
	{ 0x9b, "bad dir handle" },
	{ 0x9c, "invalid path" },
	{ 0x9c, "no such extension" },
	{ 0x9d, "no dir handles" },
	{ 0x9e, "bad file name" },
	{ 0x9f, "directory active" },
	{ 0xa0, "directory not empty" },
	{ 0xa1, "directory io error" },
	{ 0xa2, "io locked" },
	{ 0xa3, "transaction restarted" },
	{ 0xa4, "rename dir invalid" },
	{ 0xa5, "invalid opencreate mode" },
	{ 0xa6, "already in use" },
	{ 0xa7, "invalid resource tag" },
	{ 0xa8, "access denied" },
	{ 0xbe, "invalid data stream" },
	{ 0xbf, "invalid name space" },
	{ 0xc0, "no accounting privileges" },
	{ 0xc1, "no account balance" },
	{ 0xc2, "credit limit exceeded" },
	{ 0xc3, "too many holds" },
	{ 0xc4, "accounting disabled" },
	{ 0xc5, "login lockout" },
	{ 0xc6, "no console rights" },
	{ 0xd0, "q io failure" },
	{ 0xd1, "no queue" },
	{ 0xd2, "no q server" },
	{ 0xd3, "no q rights" },
	{ 0xd4, "q full" },
	{ 0xd5, "no q job" },
	{ 0xd6, "no q job rights" },
	{ 0xd6, "unencrypted not allowed" },
//	{ 0xd7, "q in service" },
	{ 0xd7, "duplicate password" },
//	{ 0xd8, "q not active" },
	{ 0xd8, "password too short" },
//	{ 0xd9, "q stn not server" },
	{ 0xd9, "maximum logins exceeded" },
//	{ 0xda, "q halted" },
	{ 0xda, "bad login time" },
//	{ 0xdb, "q max servers" },
	{ 0xdb, "node address violation" },
	{ 0xdc, "log account expired" },
	{ 0xde, "bad password" },
	{ 0xdf, "password expired" },
	{ 0xe0, "no login connections available" },
	{ 0xe8, "write to group property" },
	{ 0xe9, "member already exists" },
	{ 0xea, "no such member" },
	{ 0xeb, "property not group" },
	{ 0xec, "no such value set" },
	{ 0xed, "property already exists" },
	{ 0xee, "object already exists" },
	{ 0xef, "illegal name" },
	{ 0xf0, "illegal wildcard" },
	{ 0xf1, "bindery security" },
	{ 0xf2, "no object read rights" },
	{ 0xf3, "no object rename rights" },
	{ 0xf4, "no object delete rights" },
	{ 0xf5, "no object create rights" },
	{ 0xf6, "no property delete rights" },
	{ 0xf7, "no property create rights" },
	{ 0xf8, "no property write rights" },
	{ 0xf9, "no property read rights" },
	{ 0xfa, "temp remap" },
//	{ 0xfb, "unknown request" },
	{ 0xfb, "no such property" },
//	{ 0xfc, "message queue full" },
//	{ 0xfc, "target already has message" },
	{ 0xfc, "no such object" },
	{ 0xfd, "bad station number" },
//	{ 0xfe, "bindery locked" },
	{ 0xfe, "dir locked" },
//	{ 0xfe, "spool delete" },
//	{ 0xfe, "trustee not found" },
	{ 0xff, "failed" },
};

char *
nwerrstr(uint err)
{
	int i;
	static char buf[64];

	for (i = 0; i < nelem(NWerrs); i++)
		if (NWerrs[i].err == err)
			return(NWerrs[i].msg);

	snprint(buf, sizeof(buf), "%d/0x%ux - unknown NetWare error", err, err);
	return buf;
}


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.