mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
libutil: Introduce util_sys and util_sys_get_dev_addr()
Many tools need to identify the device address of a given device. So far, either the tool had its own implementation, or u2s_getbusid() was used. Though, u2s_getbusid() was mainly designed for and used by the DASD tools. Introduce util_sys with a first function util_sys_get_dev_addr() which provides a more universal way to identify the device address which is not limited to one particular device type. The device address represents either a busid (e.g. DASD), slot address (NVMe), H:C:T:L tuple (SCSI), or other id types associated with a device. Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
17
include/lib/util_sys.h
Normal file
17
include/lib/util_sys.h
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* @defgroup util_sys_h util_sys: SysFS interface
|
||||
* @{
|
||||
* @brief Work with SysFS
|
||||
*
|
||||
* Copyright IBM Corp. 2019
|
||||
*
|
||||
* s390-tools is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the MIT license. See LICENSE for details.
|
||||
*/
|
||||
|
||||
#ifndef LIB_UTIL_SYS_H
|
||||
#define LIB_UTIL_SYS_H
|
||||
|
||||
int util_sys_get_dev_addr(const char *dev, char *addr);
|
||||
|
||||
#endif /** LIB_UTIL_SYS_H @} */
|
||||
Reference in New Issue
Block a user