Save client version

This allows to use old daemons with new versions of the driver
which do not support newer features yet

Signed-off-by: Christian Gabriel <ch_gabriel@web.de>
pull/22/head
Christian Gabriel 2024-03-09 11:30:00 +01:00 committed by Kyle Schwarz
parent b69aaf12ab
commit c888a206d9
1 changed files with 3 additions and 1 deletions

View File

@ -118,6 +118,7 @@ struct intrepid_netdevice {
static int is_open;
static int major_number;
static int client_version;
static unsigned char *shared_mem;
static struct class *intrepid_dev_class;
static struct device *intrepid_dev;
@ -977,7 +978,8 @@ static long intrepid_dev_ioctl(struct file *fp, unsigned int cmd, unsigned long
ret = KO_VERSION_INT;
break;
case SIOCGCLIENTVEROK:
if (VER_MAJ_FROM_INT(arg) == 3 && VER_MIN_FROM_INT(arg) == 1 && VER_PATCH_FROM_INT(arg) >= 0)
client_version = arg;
if (VER_MAJ_FROM_INT(arg) == 3 && VER_MIN_FROM_INT(arg) >= 1 && VER_PATCH_FROM_INT(arg) >= 0)
ret = 0; /* ok to start */
else
ret = 1;