]> git.michaelhowe.org Git - packages/o/openafs.git/commit
rxgen: add *TranslateOpcode functions to XDR code
authorFelix Frank <Felix.Frank@Alumni.TU-Berlin.de>
Fri, 12 Nov 2010 23:10:31 +0000 (00:10 +0100)
committerDerrick Brashear <shadow@dementix.org>
Thu, 15 Dec 2011 04:17:59 +0000 (20:17 -0800)
commit303b6fd682abaa0affd15a4ddd7d5b6b11f620bc
tree4f4febb039809ef6679eb92298afae252cf3f89f
parent6d23bbae9df78ecd98d0af2580cefe8c5bdd12c4
rxgen: add *TranslateOpcode functions to XDR code

Administrative commands and server binaries can benefit from the
ability to translate RPC OpCode numbers to proper function names.

For this purpose, rxgen now emits the function

char *PKGTranslateOpCode(int)

where PKG is replaced by the respective package prefix.

The function is generated in the exact same way that ExecuteRequest is.
This way, the right optimization (array storage vs. generated case
statement) according to the respective sparseness of OpCodes in the
different RX packages is maintained.

Reviewed-on: http://gerrit.openafs.org/3305
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 5c77a6ca2460c3e79125a614037824db35480905)

Change-Id: I23d7af2dd07e02255783de0523fce58dbe46d31e
Reviewed-on: http://gerrit.openafs.org/6267
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/rxgen/rpc_main.c
src/rxgen/rpc_parse.c