| 438 | } |
| 439 | |
| 440 | void NBackup::write_file(FILE_HANDLE &file, void *buffer, FB_SIZE_T bufsize) |
| 441 | { |
| 442 | #ifdef WIN_NT |
| 443 | DWORD bytesDone; |
| 444 | if (WriteFile(file, buffer, bufsize, &bytesDone, NULL) && bytesDone == bufsize) |
| 445 | return; |
| 446 | #else |
| 447 | if (write(file, buffer, bufsize) == (ssize_t) bufsize) |
| 448 | return; |
| 449 | #endif |
| 450 | |
| 451 | status_exception::raise(Arg::Gds(isc_nbackup_err_write) << |
| 452 | (&file == &dbase ? dbname.c_str() : |
| 453 | &file == &backup ? bakname.c_str() : "unknown") << |
| 454 | Arg::OsError()); |
| 455 | } |
| 456 | |
| 457 | void NBackup::seek_file(FILE_HANDLE &file, SINT64 pos) |
| 458 | { |