report error detail on SRM download failure

While SrmDevice is catching errors returned by srmpc_get_data, it doesn't
decode + report what kind of error (errno).

Adjusted message to include the returned error.
This commit is contained in:
Rainer Clasen
2010-01-14 19:29:17 +01:00
committed by Robert Carlsen
parent a22fa874a9
commit bc61223729

View File

@@ -109,7 +109,8 @@ SrmDevice::download(CommPortPtr dev, const QDir &tmpdir,
int opt_fixup = 1; // fix bad data like srmwin.exe does
SrmioData srmdata(srmpc_get_data(srm.d, opt_all, opt_fixup));
if (!srmdata.d) {
err = "srmpc_get_data failed";
err = "srmpc_get_data failed: ";
err += strerror(errno);
return false;
}
if (srm_data_write_srm7(srmdata.d, tmpname.toAscii().constData()) < 0) {