mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
libdasd: Provide definition for bus id size
dasdview and libdasd deal with DASD bus ids and should use a definition
for the size. libu2s already provides a definition, which is used by
dasdview. However, the size of 32 is a bit much and the definition
should be part of libdasd.
Including the terminating null byte ('\0') and considering a DASD bus id
length of 8 characters (e.g. 0.0.4711), this leads to a size of 9.
Provide such a definition via libdasd and update any user.
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
+3
-2
@@ -12,6 +12,7 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "lib/dasd_base.h"
|
||||
#include "lib/dasd_sys.h"
|
||||
#include "lib/util_path.h"
|
||||
|
||||
@@ -32,7 +33,7 @@
|
||||
*/
|
||||
int dasd_sys_raw_track_access(char *devnode)
|
||||
{
|
||||
char busid[9];
|
||||
char busid[DASD_BUS_ID_SIZE];
|
||||
char *path;
|
||||
FILE *fp;
|
||||
int rc;
|
||||
@@ -108,7 +109,7 @@ int dasd_get_pm_from_chpid(char *busid, unsigned int chpid, int *mask)
|
||||
int dasd_reset_chpid(char *devnode, char *chpid_char)
|
||||
{
|
||||
unsigned int chpid;
|
||||
char busid[9];
|
||||
char busid[DASD_BUS_ID_SIZE];
|
||||
int mask, rc;
|
||||
char *endptr;
|
||||
char *path;
|
||||
|
||||
Reference in New Issue
Block a user