From dc865f101aa7f9c40d27725ee5a1de1f667b5926 Mon Sep 17 00:00:00 2001 From: Antti Kantee Date: Fri, 6 Sep 2013 12:49:25 +0300 Subject: [PATCH] verify that we support the hypercall versions --- rumphyper_base.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rumphyper_base.c b/rumphyper_base.c index 3ce209d..c1034f2 100644 --- a/rumphyper_base.c +++ b/rumphyper_base.c @@ -43,10 +43,18 @@ static struct rumpuser_mtx *bio_mtx; static struct rumpuser_cv *bio_cv; static int bio_outstanding_total; +#define RUMPHYPER_MYVERSION 17 + int -rumpuser_init(int ver, const struct rumpuser_hyperup *hyp) +rumpuser_init(int version, const struct rumpuser_hyperup *hyp) { + if (version != RUMPHYPER_MYVERSION) { + printk("Unsupported hypercall versions requested, %d vs %d\n", + version, RUMPHYPER_MYVERSION); + return 1; + } + rumpuser__hyp = *hyp; rumpuser_mutex_init(&bio_mtx, RUMPUSER_MTX_SPIN); -- 2.39.5