The truncate and getlength commands passed a negative error number to strerror.
They also happen to be the two functions that are lacking a newline at the end
of their error message.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ret = bdrv_truncate(bs, offset);
if (ret < 0) {
- printf("truncate: %s", strerror(ret));
+ printf("truncate: %s\n", strerror(-ret));
return 0;
}
size = bdrv_getlength(bs);
if (size < 0) {
- printf("getlength: %s", strerror(size));
+ printf("getlength: %s\n", strerror(-size));
return 0;
}