mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
fix: make udev_get_library_context available also for non-udev compilations
If compiling without udev_sync support, udev_get_library_context simply returns NULL so we don't need to remember putting ifdef UDEV_SYNC_SUPPORT in the code all the time we just need to check whether there's any udev context initialized or not.
This commit is contained in:
parent
15d1824fac
commit
9f28eb4c20
@ -66,7 +66,7 @@ bad:
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct udev* udev_get_library_context(void)
|
||||
void *udev_get_library_context(void)
|
||||
{
|
||||
return _udev;
|
||||
}
|
||||
@ -78,6 +78,11 @@ int udev_init_library_context(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
void *udev_get_library_context(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void udev_fin_library_context(void)
|
||||
{
|
||||
}
|
||||
|
@ -16,12 +16,8 @@
|
||||
#ifndef _LVM_WRAPPERS_H
|
||||
#define _LVM_WRAPPERS_H
|
||||
|
||||
#ifdef UDEV_SYNC_SUPPORT
|
||||
struct udev;
|
||||
struct udev *udev_get_library_context(void);
|
||||
#endif
|
||||
|
||||
int udev_init_library_context(void);
|
||||
void *udev_get_library_context(void);
|
||||
void udev_fin_library_context(void);
|
||||
int udev_is_running(void);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user