summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-11-19 10:23:50 -0500
committerTom Rini <trini@konsulko.com>2020-11-19 10:23:50 -0500
commitb80680633dc954d32f81f3afacd3d1f2f3d290b0 (patch)
treec551b408e9b714348c1f4f34b14a23d4641021b8 /tools
parente800d715e01daffa9a5078c974f4568d6ef9e7c3 (diff)
parentdd4866b43754b18f0c06672e341d93e16b8bf674 (diff)
Merge branch '2020-11-18-assorted-fixes'
- Assorted SquashFS fixes and cleanups - Fixes for various Coverity issues - Various fixups to other platforms / code
Diffstat (limited to 'tools')
-rw-r--r--tools/image-host.c6
-rw-r--r--tools/imagetool.h6
2 files changed, 6 insertions, 6 deletions
diff --git a/tools/image-host.c b/tools/image-host.c
index 7cef78eab8..e32cc64257 100644
--- a/tools/image-host.c
+++ b/tools/image-host.c
@@ -335,14 +335,14 @@ static int get_random_data(void *data, int size)
ret = clock_gettime(CLOCK_MONOTONIC, &date);
if (ret < 0) {
printf("%s: clock_gettime has failed (err=%d, str=%s)\n",
- __func__, ret, strerror(ret));
+ __func__, ret, strerror(errno));
goto out;
}
- srand(date.tv_nsec);
+ srandom(date.tv_nsec);
for (i = 0; i < size; i++) {
- *tmp = rand() & 0xff;
+ *tmp = random() & 0xff;
tmp++;
}
diff --git a/tools/imagetool.h b/tools/imagetool.h
index acbc48e9be..8726792c8c 100644
--- a/tools/imagetool.h
+++ b/tools/imagetool.h
@@ -126,9 +126,9 @@ struct image_type_params {
struct image_tool_params *);
/*
* This function is used by the command to retrieve a component
- * (sub-image) from the image (i.e. dumpimage -i <image> -p <position>
- * <sub-image-name>).
- * Thus the code to extract a file from an image must be put here.
+ * (sub-image) from the image (i.e. dumpimage -p <position>
+ * -o <component-outfile> <image>). Thus the code to extract a file
+ * from an image must be put here.
*
* Returns 0 if the file was successfully retrieved from the image,
* or a negative value on error.