Apply clang-format code style to all source files
This commit is contained in:
+17
-15
@@ -3,8 +3,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "ezusb/util.h"
|
||||
#include "ezusb/ezusb.h"
|
||||
#include "ezusb/util.h"
|
||||
|
||||
#include "util/log.h"
|
||||
|
||||
@@ -35,10 +35,10 @@ static int info()
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int flash(const char* fw_path)
|
||||
static int flash(const char *fw_path)
|
||||
{
|
||||
HANDLE handle;
|
||||
struct ezusb_firmware* fw;
|
||||
struct ezusb_firmware *fw;
|
||||
|
||||
fw = ezusb_firmware_load(fw_path);
|
||||
|
||||
@@ -47,8 +47,8 @@ static int flash(const char* fw_path)
|
||||
return -5;
|
||||
}
|
||||
|
||||
log_misc("Loaded firmware, crc 0x%X, segments %d", fw->crc,
|
||||
fw->segment_count);
|
||||
log_misc(
|
||||
"Loaded firmware, crc 0x%X, segments %d", fw->crc, fw->segment_count);
|
||||
|
||||
if (ezusb_firmware_crc(fw) != fw->crc) {
|
||||
log_fatal("Firmware CRC check failed");
|
||||
@@ -80,18 +80,19 @@ static int flash(const char* fw_path)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void usage(const char* argv0)
|
||||
static void usage(const char *argv0)
|
||||
{
|
||||
printf("ezusb-tool for EZUSB hardware, e.g. IIDX C02 IO, build "
|
||||
__DATE__ " " __TIME__ ", gitrev " STRINGIFY(GITREV) "\n"
|
||||
"Usage: %s [cmd] ...\n"
|
||||
"Available commands:\n"
|
||||
" info: Get basic information (vid, pid, name) of a connected "
|
||||
"device\n"
|
||||
" flash: Flash a firmware binary\n", argv0);
|
||||
printf("ezusb-tool for EZUSB hardware, e.g. IIDX C02 IO, build " __DATE__ " " __TIME__
|
||||
", gitrev " STRINGIFY(GITREV) "\n"
|
||||
"Usage: %s [cmd] ...\n"
|
||||
"Available commands:\n"
|
||||
" info: Get basic information (vid, pid, name) of a connected "
|
||||
"device\n"
|
||||
" flash: Flash a firmware binary\n",
|
||||
argv0);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int arg_pos;
|
||||
|
||||
@@ -110,7 +111,8 @@ int main(int argc, char** argv)
|
||||
arg_pos++;
|
||||
|
||||
if (arg_pos >= argc) {
|
||||
printf("Usage: flash [fw_path]\n"
|
||||
printf(
|
||||
"Usage: flash [fw_path]\n"
|
||||
" fw_path: Path to firmware binary file to flash\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user