zipl: fix some warnings in zipl_helper

Fix some warnings found by sparse.
Declare one function static and change static variables to defines.

Signed-off-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Stefan Haberland
2018-02-21 13:15:12 +01:00
committed by Jan Höppner
parent c3d583fe9c
commit 08bc0a947a

View File

@@ -108,11 +108,11 @@ struct device_characteristics {
#define BDEVNAME_SIZE 32
/* Constants */
const unsigned int SECTOR_SIZE = 512;
const unsigned int DASD_PARTN_MASK = 0x03;
const unsigned int SCSI_PARTN_MASK = 0x0f;
#define SECTOR_SIZE 512
#define DASD_PARTN_MASK 0x03
#define SCSI_PARTN_MASK 0x0f
const char CHREIPL_HELPER[] = "chreipl_helper.device-mapper";
#define CHREIPL_HELPER "chreipl_helper.device-mapper"
/* Internal constants */
enum dev_type {
@@ -951,7 +951,7 @@ static bool toolname_is_chreipl_helper(const char *toolname)
return strcmp(toolname + tlen - clen, CHREIPL_HELPER) == 0;
}
void print_usage(const char *toolname)
static void print_usage(const char *toolname)
{
fprintf(stderr, "%s <major:minor of target device>", toolname);
if (!toolname_is_chreipl_helper(toolname))