From a062596819369ff85cae4c3852ee8a37a8de8236 Mon Sep 17 00:00:00 2001
From: Dominic Spill <dominicgs@gmail.com>
Date: Wed, 9 Sep 2015 12:08:28 +0100
Subject: [PATCH 60/68] Default SPI flash read length to size of SPI flash
 Fixes #214

---
 host/hackrf-tools/src/hackrf_spiflash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/host/hackrf-tools/src/hackrf_spiflash.c b/host/hackrf-tools/src/hackrf_spiflash.c
index 098d2ad..20a50d3 100644
--- a/host/hackrf-tools/src/hackrf_spiflash.c
+++ b/host/hackrf-tools/src/hackrf_spiflash.c
@@ -87,7 +87,7 @@ static void usage()
 {
 	printf("Usage:\n");
 	printf("\t-a, --address <n>: starting address (default: 0)\n");
-	printf("\t-l, --length <n>: number of bytes to read (default: 0)\n");
+	printf("\t-l, --length <n>: number of bytes to read (default: %d)\n", MAX_LENGTH);
 	printf("\t-r <filename>: Read data into file.\n");
 	printf("\t-w <filename>: Write data from file.\n");
 	printf("\t-d <serialnumber>: Serial number of device, if multiple devices\n");
@@ -98,7 +98,7 @@ int main(int argc, char** argv)
 {
 	int opt;
 	uint32_t address = 0;
-	uint32_t length = 0;
+	uint32_t length = MAX_LENGTH;
 	uint32_t tmp_length;
 	uint16_t xfer_len = 0;
 	const char* path = NULL;
-- 
2.1.4

