nwztools/scsitools: simplify code and enable O2

Change-Id: Ic14bc5ff643c9cf4c6380b4c34999d704c65e460
This commit is contained in:
Amaury Pouly 2020-01-12 21:42:23 +01:00
parent d6c9303c75
commit fbad457339
2 changed files with 3 additions and 4 deletions

View file

@ -6,7 +6,7 @@ CC=$(PREFIX)gcc
LD=$(PREFIX)gcc LD=$(PREFIX)gcc
NWZ_DB_DIR=../../../firmware/target/hosted/sonynwz NWZ_DB_DIR=../../../firmware/target/hosted/sonynwz
INCLUDES=-I$(NWZ_DB_DIR) -I$(SCSI_DIR) INCLUDES=-I$(NWZ_DB_DIR) -I$(SCSI_DIR)
CFLAGS=-std=c99 -Wall $(DEFINES) $(INCLUDES) CFLAGS=-std=c99 -Wall -O2 $(DEFINES) $(INCLUDES)
LDFLAGS=-L$(SCSI_DIR) -lrbscsi LDFLAGS=-L$(SCSI_DIR) -lrbscsi
BINS=scsitool$(EXE_EXT) BINS=scsitool$(EXE_EXT)

View file

@ -710,8 +710,7 @@ int get_dev_info(int argc, char **argv)
(void) argc; (void) argc;
(void )argv; (void )argv;
uint8_t cdb[12] = {0xfc, 0, 0x20, 'd', 'b', 'm', 'n', 0, 0x80, 0, 0, 0}; uint8_t cdb[12] = {0xfc, 0, 0x20, 'd', 'b', 'm', 'n', 0, 0x80, 0, 0, 0};
char buffer[80];
char *buffer = malloc(0x80);
int buffer_size = 0x80; int buffer_size = 0x80;
uint8_t sense[32]; uint8_t sense[32];
int sense_size = 32; int sense_size = 32;
@ -736,7 +735,7 @@ int get_dev_info(int argc, char **argv)
int get_dhp(int argc, char **argv) int get_dhp(int argc, char **argv)
{ {
(void) argc; (void) argc;
(void )argv; (void) argv;
uint8_t cdb[12] = {0xfc, 0, 'D', 'd', 'h', 'p', 0, 0, 0, 0, 0, 0}; uint8_t cdb[12] = {0xfc, 0, 'D', 'd', 'h', 'p', 0, 0, 0, 0, 0, 0};
char *buffer = malloc(0x80); char *buffer = malloc(0x80);