summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2012-11-20 20:42:17 +0100
committerPali Rohár <pali.rohar@gmail.com>2012-11-20 20:42:17 +0100
commit3f968514073a77e329ed18b35c02000e66bc34bc (patch)
treeb0e154f136acde145fa9562ebd78ff990bd2b7ab /src
parent10217cd3312fa310791b1e1c50890b72d7f3356c (diff)
download0xFFFF-3f968514073a77e329ed18b35c02000e66bc34bc.tar.bz2
Change dump_image API
Diffstat (limited to 'src')
-rw-r--r--src/local.c2
-rw-r--r--src/local.h2
-rw-r--r--src/operations.c8
-rw-r--r--src/operations.h2
4 files changed, 7 insertions, 7 deletions
diff --git a/src/local.c b/src/local.c
index d067bd1..8498eab 100644
--- a/src/local.c
+++ b/src/local.c
@@ -115,7 +115,7 @@ int local_flash_image(struct image * image) {
}
-struct image * local_dump_image(enum image_type image) {
+int local_dump_image(enum image_type image, const char * file) {
/* kernel on n900:
system("nanddump -s 0x000800 -f /var/tmp/zImage /dev/mtd3");
diff --git a/src/local.h b/src/local.h
index cf67359..6db8101 100644
--- a/src/local.h
+++ b/src/local.h
@@ -27,7 +27,7 @@ int local_init(void);
enum device local_get_device(void);
int local_flash_image(struct image * image);
-struct image * local_dump_image(enum image_type image);
+int local_dump_image(enum image_type image, const char * file);
int local_check_badblocks(const char * device);
int local_reboot_device(void);
diff --git a/src/operations.c b/src/operations.c
index 5692cac..02adaf4 100644
--- a/src/operations.c
+++ b/src/operations.c
@@ -188,17 +188,17 @@ int dev_flash_image(struct device_info * dev, struct image * image) {
}
-struct image * dev_dump_image(struct device_info * dev, enum image_type image) {
+int dev_dump_image(struct device_info * dev, enum image_type image, const char * file) {
if ( dev->method == METHOD_LOCAL )
- return local_dump_image(image);
+ return local_dump_image(image, file);
if ( dev->method == METHOD_USB ) {
ERROR("Dump image via USB is not supported");
- return NULL;
+ return -1;
}
- return NULL;
+ return -1;
}
diff --git a/src/operations.h b/src/operations.h
index 4f446d1..3f6c3bd 100644
--- a/src/operations.h
+++ b/src/operations.h
@@ -44,7 +44,7 @@ enum device dev_get_device(struct device_info * dev);
int dev_cold_flash_images(struct device_info * dev, struct image * x2nd, struct image * secondary);
int dev_load_image(struct device_info * dev, struct image * image);
int dev_flash_image(struct device_info * dev, struct image * image);
-struct image * dev_dump_image(struct device_info * dev, enum image_type image);
+int dev_dump_image(struct device_info * dev, enum image_type image, const char * file);
int dev_check_badblocks(struct device_info * dev, const char * device);
int dev_boot_device(struct device_info * dev, const char * cmdline);