exit(ret);
}
do {
ret = file.write(buf, bufsize); if( ret < 0 ) {
cerr << endl << "Error writing bytes to " << FILENAME << ". written=" << file.gbytesWritten() << "GBytes";
cerr << ", errno=" << errno << " " << strerror(errno) << endl;
}else { cout << ".";
}while( ret > 0 ); if( ret >= 0 )
cout << endl << "Wrote " << file.gbytesWritten() << "GBytes" << endl;
free(buf); return ret;