mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 19:23:03 +01:00
posix_fadvise() does not return error code in errno
This commit is contained in:
parent
0d619be734
commit
af23324f8c
@ -373,10 +373,12 @@ void NBackup::open_database_scan()
|
|||||||
if (dbase < 0)
|
if (dbase < 0)
|
||||||
b_error::raise(uSvc, "Error (%d) opening database file: %s", errno, dbname.c_str());
|
b_error::raise(uSvc, "Error (%d) opening database file: %s", errno, dbname.c_str());
|
||||||
#ifdef HAVE_POSIX_FADVISE
|
#ifdef HAVE_POSIX_FADVISE
|
||||||
if (posix_fadvise(dbase, 0, 0, POSIX_FADV_SEQUENTIAL) < 0)
|
int rc = posix_fadvise(dbase, 0, 0, POSIX_FADV_SEQUENTIAL);
|
||||||
b_error::raise(uSvc, "Error (%d) in posix_fadvise(SEQUENTIAL) for %s", errno, dbname.c_str());
|
if (rc)
|
||||||
if (posix_fadvise(dbase, 0, 0, POSIX_FADV_NOREUSE) < 0)
|
b_error::raise(uSvc, "Error (%d) in posix_fadvise(SEQUENTIAL) for %s", rc, dbname.c_str());
|
||||||
b_error::raise(uSvc, "Error (%d) in posix_fadvise(NOREUSE) for %s", errno, dbname.c_str());
|
rc = posix_fadvise(dbase, 0, 0, POSIX_FADV_NOREUSE);
|
||||||
|
if (rc)
|
||||||
|
b_error::raise(uSvc, "Error (%d) in posix_fadvise(NOREUSE) for %s", rc, dbname.c_str());
|
||||||
#endif // HAVE_POSIX_FADVISE
|
#endif // HAVE_POSIX_FADVISE
|
||||||
#endif // WIN_NT
|
#endif // WIN_NT
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user