summaryrefslogtreecommitdiffstats
path: root/include/common.h
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-05-27 22:49:00 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2019-05-28 10:28:15 +0200
commitddf4cca3397910ed8a342c1f6443637f20bae718 (patch)
tree036da05982e99d869ced7faa2396e08f21505abd /include/common.h
parentfaf2ad1dc5a1a3fb131559c26675cecdd20b74a8 (diff)
downloadbarebox-ddf4cca3397910ed8a342c1f6443637f20bae718.tar.gz
barebox-ddf4cca3397910ed8a342c1f6443637f20bae718.tar.xz
commands: Introduce memcpy_parse_options()
Both memcpy and memcmp have identical options, so in order to share code between them, introduce memcpy_parse_options() and change both tools to use it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index 723b9c706c..b1294978d7 100644
--- a/include/common.h
+++ b/include/common.h
@@ -116,6 +116,8 @@ void shutdown_barebox(void);
int mem_parse_options(int argc, char *argv[], char *optstr, int *mode,
char **sourcefile, char **destfile, int *swab);
+int memcpy_parse_options(int argc, char *argv[], int *sourcefd,
+ int *destfd, loff_t *count);
#define RW_BUF_SIZE (unsigned)4096
extern const char version_string[];