Commit e4a26187 authored by Pavel Emelyanov's avatar Pavel Emelyanov

pb: Number PB_ constants

For easier logs-to-constant eyes mapping.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ba58e470
......@@ -6,7 +6,7 @@
enum {
/* PB_AUTOGEN_START */
PB_INVENTORY,
PB_INVENTORY, /* 0 */
PB_STATS,
PB_FDINFO,
PB_CORE,
......@@ -16,7 +16,7 @@ enum {
PB_POSIX_TIMER,
PB_CREDS,
PB_FS,
PB_UTSNS,
PB_UTSNS, /* 10 */
PB_IPC_VAR,
PB_IPC_SHM,
PB_IPC_SEM,
......@@ -26,7 +26,7 @@ enum {
PB_TCP_STREAM,
PB_REG_FILE,
PB_EXT_FILE,
PB_NS_FILE,
PB_NS_FILE, /* 20 */
PB_INET_SK,
PB_UNIX_SK,
PB_PACKET_SOCK,
......@@ -36,7 +36,7 @@ enum {
PB_PIPE_DATA,
PB_EVENTFD_FILE,
PB_EVENTPOLL_FILE,
PB_EVENTPOLL_TFD,
PB_EVENTPOLL_TFD, /* 30 */
PB_SIGNALFD,
PB_INOTIFY_FILE,
PB_INOTIFY_WD,
......@@ -46,7 +46,7 @@ enum {
PB_TTY_INFO,
PB_FILE_LOCK,
PB_RLIMIT,
PB_PAGEMAP,
PB_PAGEMAP, /* 40 */
PB_SIGINFO,
PB_TUNFILE,
PB_IRMAP_CACHE,
......@@ -59,7 +59,7 @@ enum {
PB_NETDEV,
PB_REMAP_FPATH,
PB_SK_QUEUES,
PB_IPCNS_MSG,
PB_IPCNS_MSG, /* 50 */
PB_IPCNS_MSG_ENT,
PB_MAX,
......
for x in $(cat include/protobuf-desc.h | \
sed -n '/PB_AUTOGEN_START/,/PB_AUTOGEN_STOP/p' | \
fgrep -v 'PB_AUTOGEN_S' | sed -e 's/,//' -e 's/PB_//'); do
fgrep -v 'PB_AUTOGEN_S' | sed -e 's/,.*$//' -e 's/PB_//'); do
x_la=$(echo $x | tr 'A-Z' 'a-z')
x_uf=$(echo $x_la | sed -e 's/^./\u&/' -e 's/_./\U&/g' -e 's/_//g')
echo "CR_PB_DESC($x, $x_uf, $x_la);"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment