@@ -127,7 +127,7 @@ static jrd_file* seek_file(jrd_file*, BufferDesc*, FB_UINT64*, FbStatusVector*);
127
127
static jrd_file* setup_file (Database*, const PathName&, const int , const bool , const bool , const bool );
128
128
static void lockDatabaseFile (int & desc, const bool shareMode, const bool temporary,
129
129
const char * fileName, ISC_STATUS operation);
130
- static bool unix_error (const TEXT*, const jrd_file*, ISC_STATUS, FbStatusVector* = NULL );
130
+ static bool unix_error (const TEXT*, const jrd_file*, ISC_STATUS, FbStatusVector* = NULL , bool print_errno = true );
131
131
static bool block_size_error (const jrd_file*, off_t , FbStatusVector* = NULL );
132
132
#if !(defined HAVE_PREAD && defined HAVE_PWRITE)
133
133
static SLONG pread (int , SCHAR*, SLONG, SLONG);
@@ -480,7 +480,7 @@ ULONG PIO_get_number_of_pages(const jrd_file* file, const USHORT pagesize)
480
480
**************************************/
481
481
482
482
if (file->fil_desc == -1 )
483
- unix_error (" PIO_get_number_of_pages" , file, isc_io_access_err);
483
+ unix_error (" PIO_get_number_of_pages" , file, isc_io_access_err, NULL , false );
484
484
485
485
struct STAT statistics;
486
486
if (os_utils::fstat (file->fil_desc , &statistics))
@@ -546,7 +546,7 @@ void PIO_header(thread_db* tdbb, UCHAR* address, int length)
546
546
jrd_file* file = pageSpace->file ;
547
547
548
548
if (file->fil_desc == -1 )
549
- unix_error (" PIO_header" , file, isc_io_read_err);
549
+ unix_error (" PIO_header" , file, isc_io_read_err, NULL , false );
550
550
551
551
for (i = 0 ; i < IO_RETRY; i++)
552
552
{
@@ -752,7 +752,7 @@ bool PIO_read(thread_db* tdbb, jrd_file* file, BufferDesc* bdb, Ods::pag* page,
752
752
FB_UINT64 offset;
753
753
754
754
if (file->fil_desc == -1 )
755
- return unix_error (" PIO_read" , file, isc_io_read_err, status_vector);
755
+ return unix_error (" PIO_read" , file, isc_io_read_err, status_vector, false );
756
756
757
757
Database* const dbb = tdbb->getDatabase ();
758
758
@@ -804,7 +804,7 @@ bool PIO_write(thread_db* tdbb, jrd_file* file, BufferDesc* bdb, Ods::pag* page,
804
804
FB_UINT64 offset;
805
805
806
806
if (file->fil_desc == -1 )
807
- return unix_error (" PIO_write" , file, isc_io_write_err, status_vector);
807
+ return unix_error (" PIO_write" , file, isc_io_write_err, status_vector, false );
808
808
809
809
Database* const dbb = tdbb->getDatabase ();
810
810
@@ -860,7 +860,7 @@ static jrd_file* seek_file(jrd_file* file, BufferDesc* bdb, FB_UINT64* offset,
860
860
861
861
if (file->fil_desc == -1 )
862
862
{
863
- unix_error (" seek_file" , file, isc_io_access_err, status_vector);
863
+ unix_error (" seek_file" , file, isc_io_access_err, status_vector, false );
864
864
return 0 ;
865
865
}
866
866
@@ -1015,7 +1015,7 @@ static void lockDatabaseFile(int& desc, const bool share, const bool temporary,
1015
1015
1016
1016
static bool unix_error (const TEXT* string,
1017
1017
const jrd_file* file, ISC_STATUS operation,
1018
- FbStatusVector* status_vector)
1018
+ FbStatusVector* status_vector, bool print_errno )
1019
1019
{
1020
1020
/* *************************************
1021
1021
*
@@ -1030,7 +1030,10 @@ static bool unix_error(const TEXT* string,
1030
1030
**************************************/
1031
1031
Arg::Gds err (isc_io_error);
1032
1032
err << string << file->fil_string <<
1033
- Arg::Gds (operation) << Arg::Unix (errno);
1033
+ Arg::Gds (operation);
1034
+
1035
+ if (print_errno)
1036
+ err << Arg::Unix (errno);
1034
1037
1035
1038
if (!status_vector)
1036
1039
ERR_post (err);
0 commit comments