Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd43709b

Browse files
committed
Fix fseek() result check
1 parent72c5d0d commitd43709b

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

‎data.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,9 @@ backup_data_page(pgFile *file, XLogRecPtr prev_backup_start_lsn,
7373

7474
while(try_checksum--)
7575
{
76-
if (fseek(in,offset,SEEK_SET)!=offset)
77-
{
78-
/* TODO Should we check specific error code here? */
79-
if (verbose)
80-
elog(WARNING,"File: %s, could not seek to block %u. "
81-
"Probably the file was truncated after backup start.",
82-
file->path,blknum);
83-
return;
84-
}
76+
if (fseek(in,offset,SEEK_SET)!=0)
77+
elog(ERROR,"File: %s, could not seek to block %u: %s",
78+
file->path,blknum,strerror(errno));
8579

8680
read_len=fread(&page,1,BLCKSZ,in);
8781

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp