]> rtime.felk.cvut.cz Git - jailhouse.git/commit
tools: Remove dependency of jailhouse tool on cell-config.h
authorJan Kiszka <jan.kiszka@siemens.com>
Thu, 28 Aug 2014 11:36:18 +0000 (13:36 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Thu, 28 Aug 2014 18:08:56 +0000 (20:08 +0200)
commit1fad37949d9352fc0e04033f729d645734136f86
tree87b51b8a2376525f319388e305acff1e74788cf0
parentd4512aa0c7fe28ff129302242ff514c51a8fcad0
tools: Remove dependency of jailhouse tool on cell-config.h

Two things caused jailhouse.h and, thus, tools/jailhouse.c to depend on
the cell configuration header: the definition of the JAILHOUSE_ENABLE
IOCTL and the maximum cell name length in config files.

The first dependency is not only unneeded (the command line tool passed
the an uninterpreted blob via JAILHOUSE_ENABLE), it also made the driver
ABI change each time we updated the config format. So replace the
reference to struct jailhouse_system in JAILHOUSE_ENABLE with a symbolic
"void *".

The second dependency is also unneeded: While the name length used in
configs and, thus, also inside the driver to reference cells should be
identical to the lengths we use in struct jailhouse_cell_id, there is no
hard dependency. In the worst case (different lengths), we would fail to
address cells by name. However, these lengths are unlikely to change. So
simply define our own name length for that struct and test for
deviations during the driver build.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
driver.c
jailhouse.h
tools/Makefile