This source file includes following definitions.
- bus_error_mapping_hash
- bus_error_mapping_lookup
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
&& (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
&& ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
&& ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
&& ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
&& ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
&& ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
&& ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
&& ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
&& ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
&& ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
&& ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
&& ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
&& ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
&& ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
&& ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
&& ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
&& ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
&& ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
&& ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
&& ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
#endif
#include <errno.h>
#include "bus-error.h"
#include <string.h>
#define TOTAL_KEYWORDS 34
#define MIN_WORD_LENGTH 33
#define MAX_WORD_LENGTH 66
#define MIN_HASH_VALUE 33
#define MAX_HASH_VALUE 76
#ifdef __GNUC__
__inline
#else
#ifdef __cplusplus
inline
#endif
#endif
static unsigned int
bus_error_mapping_hash (register const char *str, register unsigned int len)
{
static const unsigned char asso_values[] =
{
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 0, 77, 77, 77, 10,
0, 77, 0, 20, 77, 77, 77, 15, 35, 10,
0, 77, 77, 0, 77, 5, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 10, 77, 5,
5, 0, 77, 77, 5, 0, 77, 77, 0, 5,
0, 5, 35, 77, 0, 15, 0, 20, 77, 77,
0, 10, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
77, 77, 77, 77, 77, 77
};
register int hval = len;
switch (hval)
{
default:
hval += asso_values[(unsigned char)str[34]];
case 34:
case 33:
case 32:
hval += asso_values[(unsigned char)str[31]];
break;
}
return hval;
}
#ifdef __GNUC__
__inline
#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
__attribute__ ((__gnu_inline__))
#endif
#endif
const name_error_mapping *
bus_error_mapping_lookup (register const char *str, register unsigned int len)
{
static const name_error_mapping wordlist[] =
{
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"org.freedesktop.DBus.Error.Failed", EACCES},
{"org.freedesktop.DBus.Error.IOError", EIO},
{"org.freedesktop.DBus.Error.NoServer", EHOSTDOWN},
{"org.freedesktop.DBus.Error.NoNetwork", ENONET},
{"org.freedesktop.DBus.Error.AuthFailed", EACCES},
{"org.freedesktop.DBus.Error.InvalidArgs", EINVAL},
{"org.freedesktop.DBus.Error.Timeout", ETIMEDOUT},
{"org.freedesktop.DBus.Error.TimedOut", ETIMEDOUT},
{"org.freedesktop.DBus.Error.LimitsExceeded", ENOBUFS},
{"org.freedesktop.DBus.Error.BadAddress", EADDRNOTAVAIL},
{"org.freedesktop.DBus.Error.InvalidSignature", EINVAL},
{"org.freedesktop.DBus.Error.Disconnected", ECONNRESET},
{"org.freedesktop.DBus.Error.InvalidFileContent", EINVAL},
{"org.freedesktop.DBus.Error.ServiceUnknown", EHOSTUNREACH},
{"org.freedesktop.DBus.Error.UnknownProperty", EBADR},
{"org.freedesktop.DBus.Error.MatchRuleInvalid", EINVAL},
{"org.freedesktop.DBus.Error.MatchRuleNotFound", ENOENT},
{"org.freedesktop.DBus.Error.NoMemory", ENOMEM},
{(char*)0},
{"org.freedesktop.DBus.Error.UnixProcessIdUnknown", ESRCH},
{"org.freedesktop.DBus.Error.PropertyReadOnly", EROFS},
{"org.freedesktop.DBus.Error.AccessDenied", EACCES},
{"org.freedesktop.DBus.Error.UnknownObject", EBADR},
{"org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown", ESRCH},
{"org.freedesktop.DBus.Error.ObjectPathInUse", EBUSY},
{(char*)0},
{"org.freedesktop.DBus.Error.AddressInUse", EADDRINUSE},
{"org.freedesktop.DBus.Error.UnknownMethod", EBADR},
{"org.freedesktop.DBus.Error.InconsistentMessage", EBADMSG},
{"org.freedesktop.DBus.Error.FileExists", EEXIST},
{(char*)0},
{"org.freedesktop.DBus.Error.NotSupported", ENOTSUP},
{(char*)0},
{"org.freedesktop.DBus.Error.InteractiveAuthorizationRequired EACCES"},
{(char*)0},
{"org.freedesktop.DBus.Error.UnknownInterface", EBADR},
{"org.freedesktop.DBus.Error.NoReply", ETIMEDOUT},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"org.freedesktop.DBus.Error.FileNotFound", ENOENT},
{(char*)0},
{"org.freedesktop.DBus.Error.NameHasNoOwner", ENXIO}
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
register int key = bus_error_mapping_hash (str, len);
if (key <= MAX_HASH_VALUE && key >= 0)
{
register const char *s = wordlist[key].name;
if (s && *str == *s && !strcmp (str + 1, s + 1))
return &wordlist[key];
}
}
return 0;
}