vol: fix nextVnodeUnique roll over
[openafs.git] / src / vol / daemon_com_inline.h
1 /*
2  * Copyright 2010, Sine Nomine Associates.
3  * All Rights Reserved.
4  *
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 #ifndef AFS_VOL_DAEMON_COM_INLINE_H
11 #define AFS_VOL_DAEMON_COM_INLINE_H
12
13 #include "daemon_com.h"
14
15 #define SYNC_ENUMCASE(en) \
16     case en: return #en
17
18 static_inline char *
19 SYNC_res2string(afs_int32 response)
20 {
21     switch (response) {
22         SYNC_ENUMCASE(SYNC_OK);
23         SYNC_ENUMCASE(SYNC_DENIED);
24         SYNC_ENUMCASE(SYNC_COM_ERROR);
25         SYNC_ENUMCASE(SYNC_BAD_COMMAND);
26         SYNC_ENUMCASE(SYNC_FAILED);
27     default:
28         return "**UNKNOWN**";
29     }
30 }
31
32 #undef SYNC_ENUMCASE
33
34 #endif /* AFS_VOL_DAEMON_COM_INLINE_H */