This repository has been archived by the owner on Mar 1, 2023. It is now read-only.
forked from open-iscsi/open-isns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
error.c
65 lines (61 loc) · 1.66 KB
/
error.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* iSNS error strings etc.
*
* Copyright (C) 2007 Olaf Kirch <[email protected]>
*/
#include <libisns/isns.h>
const char *
isns_strerror(enum isns_status status)
{
switch (status) {
case ISNS_SUCCESS:
return "Success";
case ISNS_UNKNOWN_ERROR:
return "Unknown error";
case ISNS_MESSAGE_FORMAT_ERROR:
return "Message format error";
case ISNS_INVALID_REGISTRATION:
return "Invalid registration";
case ISNS_INVALID_QUERY:
return "Invalid query";
case ISNS_SOURCE_UNKNOWN:
return "Source unknown";
case ISNS_SOURCE_ABSENT:
return "Source absent";
case ISNS_SOURCE_UNAUTHORIZED:
return "Source unauthorized";
case ISNS_NO_SUCH_ENTRY:
return "No such entry";
case ISNS_VERSION_NOT_SUPPORTED:
return "Version not supported";
case ISNS_INTERNAL_ERROR:
return "Internal error";
case ISNS_BUSY:
return "Busy";
case ISNS_OPTION_NOT_UNDERSTOOD:
return "Option not understood";
case ISNS_INVALID_UPDATE:
return "Invalid update";
case ISNS_MESSAGE_NOT_SUPPORTED:
return "Message not supported";
case ISNS_SCN_EVENT_REJECTED:
return "SCN event rejected";
case ISNS_SCN_REGISTRATION_REJECTED:
return "SCN registration rejected";
case ISNS_ATTRIBUTE_NOT_IMPLEMENTED:
return "Attribute not implemented";
case ISNS_FC_DOMAIN_ID_NOT_AVAILABLE:
return "FC domain id not available";
case ISNS_FC_DOMAIN_ID_NOT_ALLOCATED:
return "FC domain id not allocated";
case ISNS_ESI_NOT_AVAILABLE:
return "ESI not available";
case ISNS_INVALID_DEREGISTRATION:
return "Invalid deregistration";
case ISNS_REGISTRATION_FEATURE_NOT_SUPPORTED:
return "Registration feature not supported";
default:
break;
}
return "Unknown iSNS status code";
}