1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

libdm: versionion symbol for enhanced dm_task_run

When new app links with current dm_task_run() that propagates ioctl()
errno - ensure it will not be usable with older version without this
supported feature.
This commit is contained in:
Zdenek Kabelac 2023-10-14 01:02:09 +02:00
parent b162475391
commit 85c7629345
2 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1 @@
dm_task_run

View File

@ -2055,7 +2055,21 @@ int dm_task_get_errno(struct dm_task *dmt)
return dmt->ioctl_errno;
}
int dm_task_run(struct dm_task *dmt)
#if defined(GNU_SYMVER)
/*
* Enforce new version 1_02_197 of dm_task_run() that propagates
* ioctl() errno is being linked to app.
*/
DM_EXPORT_SYMBOL_BASE(dm_task_run)
int dm_task_run_base(struct dm_task *dmt);
int dm_task_run_base(struct dm_task *dmt)
{
return dm_task_run(dmt);
}
#endif
DM_EXPORT_NEW_SYMBOL(int, dm_task_run, 1_02_197)
(struct dm_task *dmt)
{
struct dm_ioctl *dmi;
unsigned command;