mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
dasdview/libdasd/zipl: Use util_sys_get_dev_addr() instead of u2s_getbusid()
Use the newer and more robust libutil provided function util_sys_get_dev_addr() to identify a device address for any former user of u2s_getbusid(). Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#include "lib/util_base.h"
|
||||
#include "lib/util_opt.h"
|
||||
#include "lib/util_prg.h"
|
||||
#include "lib/util_sys.h"
|
||||
#include "lib/vtoc.h"
|
||||
#include "lib/zt_common.h"
|
||||
|
||||
@@ -183,7 +184,7 @@ dasdview_get_info(dasdview_info_t *info)
|
||||
else
|
||||
info->hw_cylinders = characteristics->no_cyl;
|
||||
|
||||
if (u2s_getbusid(info->device, info->busid) == -1)
|
||||
if (util_sys_get_dev_addr(info->device, info->busid) != 0)
|
||||
info->busid_valid = 0;
|
||||
else
|
||||
info->busid_valid = 1;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "lib/dasd_base.h"
|
||||
#include "lib/dasd_sys.h"
|
||||
#include "lib/util_path.h"
|
||||
#include "lib/util_sys.h"
|
||||
|
||||
/**
|
||||
* Get raw-track access mode status
|
||||
@@ -38,7 +39,7 @@ int dasd_sys_raw_track_access(char *devnode)
|
||||
FILE *fp;
|
||||
int rc;
|
||||
|
||||
if (u2s_getbusid(devnode, busid))
|
||||
if (util_sys_get_dev_addr(devnode, busid) != 0)
|
||||
return 0;
|
||||
|
||||
path = util_path_sysfs("bus/ccw/devices/%s/raw_track_access", busid);
|
||||
@@ -115,7 +116,7 @@ int dasd_reset_chpid(char *devnode, char *chpid_char)
|
||||
char *path;
|
||||
FILE *fp;
|
||||
|
||||
if (u2s_getbusid(devnode, busid))
|
||||
if (util_sys_get_dev_addr(devnode, busid) != 0)
|
||||
return ENODEV;
|
||||
|
||||
if (!chpid_char) {
|
||||
|
||||
@@ -7,8 +7,7 @@ ALL_CPPFLAGS += -I../include -I../boot \
|
||||
-D_FILE_OFFSET_BITS=64 $(NO_PIE_CFLAGS)
|
||||
ALL_LDFLAGS += -Wl,-z,noexecstack $(NO_PIE_LDFLAGS)
|
||||
|
||||
libs = $(rootdir)/libu2s/libu2s.a \
|
||||
$(rootdir)/libutil/libutil.a
|
||||
libs = $(rootdir)/libutil/libutil.a
|
||||
|
||||
objects = misc.o error.o scan.o job.o boot.o bootmap.o disk.o \
|
||||
install.o zipl.o $(rootdir)/zipl/boot/data.o
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <syslog.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "lib/u2s.h"
|
||||
#include "lib/util_sys.h"
|
||||
|
||||
#include "boot.h"
|
||||
#include "bootmap.h"
|
||||
@@ -1132,7 +1132,7 @@ install_mvdump(char* const device[], struct job_target_data* target, int count,
|
||||
parm.param[i].num_heads = info[i]->geo.heads;
|
||||
parm.param[i].blocksize = info[i]->phy_block_size >> 8;
|
||||
parm.param[i].devno = info[i]->devno;
|
||||
if (u2s_getbusid(device[i], busid)) {
|
||||
if (util_sys_get_dev_addr(device[i], busid) != 0) {
|
||||
error_text("Could not find bus-ID for '%s'", device[i]);
|
||||
rc = -1;
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user