diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/image-host.c | 6 | ||||
-rw-r--r-- | tools/imagetool.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tools/image-host.c b/tools/image-host.c index 7cef78eab8f..e32cc642579 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 acbc48e9be0..8726792c8c0 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. |