Skip to content

Commit 62c900f

Browse files
committed
Print a function name in error messages in cases when a file descriptor is invalid (like it's done in PIO_header) for better diagnostics
1 parent 2d62c92 commit 62c900f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/jrd/os/posix/unix.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ ULONG PIO_get_number_of_pages(const jrd_file* file, const USHORT pagesize)
480480
**************************************/
481481

482482
if (file->fil_desc == -1)
483-
unix_error("fstat", file, isc_io_access_err);
483+
unix_error("PIO_get_number_of_pages", file, isc_io_access_err);
484484

485485
struct STAT statistics;
486486
if (os_utils::fstat(file->fil_desc, &statistics))
@@ -752,7 +752,7 @@ bool PIO_read(thread_db* tdbb, jrd_file* file, BufferDesc* bdb, Ods::pag* page,
752752
FB_UINT64 offset;
753753

754754
if (file->fil_desc == -1)
755-
return unix_error("read", file, isc_io_read_err, status_vector);
755+
return unix_error("PIO_read", file, isc_io_read_err, status_vector);
756756

757757
Database* const dbb = tdbb->getDatabase();
758758

@@ -804,7 +804,7 @@ bool PIO_write(thread_db* tdbb, jrd_file* file, BufferDesc* bdb, Ods::pag* page,
804804
FB_UINT64 offset;
805805

806806
if (file->fil_desc == -1)
807-
return unix_error("write", file, isc_io_write_err, status_vector);
807+
return unix_error("PIO_write", file, isc_io_write_err, status_vector);
808808

809809
Database* const dbb = tdbb->getDatabase();
810810

@@ -860,7 +860,7 @@ static jrd_file* seek_file(jrd_file* file, BufferDesc* bdb, FB_UINT64* offset,
860860

861861
if (file->fil_desc == -1)
862862
{
863-
unix_error("lseek", file, isc_io_access_err, status_vector);
863+
unix_error("seek_file", file, isc_io_access_err, status_vector);
864864
return 0;
865865
}
866866

0 commit comments

Comments
 (0)