1
0
multipath-tools/libmpathpersist-example-old.c
Martin Wilck a8a3fc0b93 Accepting request 894131 from home:mwilck:branches:Base:System
- Update to version 0.8.6+10+suse.47711374:
  * Github workflows: add CI for SUSE-specific branches

- Disabled LTO for multipath-tools
  * The test for is_valid_path fails if LTO is enabled, just
    disabling it for %check is insufficient.

- Update to version 0.8.6+9+suse.6c05a61:
  Update to upstream 0.8.6.
  * add eh_deadline option to avoid endless SCSI error handling
  * add wwid_recheck option to detect storage configuration changes
  * add library versioning for libmultipath, libmpathpersist etc. and
    to libmultipath plugins
  * move some global symbols to libmultipath (udev, logsink, etc)
    and provide default implementations for get_multipath_config() etc.
    This allows simplifiying libmpathpersist_example.c drastically.
  * fixes for shutdown issues and various race conditions on exit
  * improve cleanup on exit, fix memory leaks
  * add libmpathvalid library
  * fixes for SAS expanders (bsc#1178377, bsc#1178379, bsc#1177081)
  * Avoid access to root FS while queueing IO (bsc#1178049,
    bsc#1181234)
  * lots of bug fixes, additions to built-in hardware table, and
    CI improvements (bsc#1186212)
  * kpartx: free loop device after listing partitions (boo#1107187)
  Bug fixes on top of 0.8.5 mentioned below are also included in
  this upstream version.

  (bsc#1182072, bsc#1177371)
   (bsc#1181435, bsc#1183666)

OBS-URL: https://build.opensuse.org/request/show/894131
OBS-URL: https://build.opensuse.org/package/show/Base:System/multipath-tools?expand=0&rev=253
2021-05-18 19:47:44 +00:00

42 lines
834 B
C

/*
* This is a minimal skeleton for code using libmpathpersist.
* Compile with "-lmpathpersist -lmultipath -ludev".
*
* Header files for libmultipath are intentionally not included
* in the multipath-tools-devel package, because libmultipath has
* no well defined API for external programs at this time.
*/
#include <mpath_persist.h>
#include <libudev.h>
struct udev *udev;
/*
* logsink determines where libmultipath log messages go
* 1 - log to syslog only
* -1 - log to syslog and stderr
* 0 - log to syslog and stderr, with timestamps
*/
int logsink;
static struct config *conf;
struct config *get_multipath_config(void) {
return conf;
}
void put_multipath_config(struct config* c)
{
}
int main(void)
{
udev = udev_new();
conf = mpath_lib_init();
if(!conf) {
udev_unref(udev);
return 1;
}
return 0;
}