@@ -97,7 +97,7 @@ backup_data_file(const char *from_root, const char *to_root,
97
97
return false;
98
98
99
99
elog (ERROR_SYSTEM ,"cannot open backup mode file \"%s\": %s" ,
100
- file -> path ,strerror (errno ));
100
+ file -> path ,strerror (errno ));
101
101
}
102
102
103
103
/* open backup file for write */
@@ -111,7 +111,7 @@ backup_data_file(const char *from_root, const char *to_root,
111
111
int errno_tmp = errno ;
112
112
fclose (in );
113
113
elog (ERROR_SYSTEM ,"cannot open backup file \"%s\": %s" ,
114
- to_path ,strerror (errno_tmp ));
114
+ to_path ,strerror (errno_tmp ));
115
115
}
116
116
117
117
/* confirm server version */
@@ -161,7 +161,7 @@ backup_data_file(const char *from_root, const char *to_root,
161
161
fclose (in );
162
162
fclose (out );
163
163
elog (ERROR_SYSTEM ,"cannot write at block %u of \"%s\": %s" ,
164
- blknum ,to_path ,strerror (errno_tmp ));
164
+ blknum ,to_path ,strerror (errno_tmp ));
165
165
}
166
166
167
167
/* update CRC */
@@ -177,7 +177,7 @@ backup_data_file(const char *from_root, const char *to_root,
177
177
fclose (in );
178
178
fclose (out );
179
179
elog (ERROR_SYSTEM ,"cannot read backup mode file \"%s\": %s" ,
180
- file -> path ,strerror (errno_tmp ));
180
+ file -> path ,strerror (errno_tmp ));
181
181
}
182
182
183
183
/*
@@ -221,7 +221,7 @@ backup_data_file(const char *from_root, const char *to_root,
221
221
fclose (in );
222
222
fclose (out );
223
223
elog (ERROR_SYSTEM ,"cannot write at block %u of \"%s\": %s" ,
224
- blknum ,to_path ,strerror (errno_tmp ));
224
+ blknum ,to_path ,strerror (errno_tmp ));
225
225
}
226
226
227
227
COMP_CRC32C (crc ,page .data ,read_len );
@@ -240,7 +240,7 @@ backup_data_file(const char *from_root, const char *to_root,
240
240
fclose (in );
241
241
fclose (out );
242
242
elog (ERROR_SYSTEM ,"cannot change mode of \"%s\": %s" ,file -> path ,
243
- strerror (errno_tmp ));
243
+ strerror (errno_tmp ));
244
244
}
245
245
246
246
fclose (in );
@@ -259,7 +259,7 @@ backup_data_file(const char *from_root, const char *to_root,
259
259
{
260
260
if (remove (to_path )== -1 )
261
261
elog (ERROR_SYSTEM ,"cannot remove file \"%s\": %s" ,to_path ,
262
- strerror (errno ));
262
+ strerror (errno ));
263
263
return false;
264
264
}
265
265
@@ -297,7 +297,7 @@ restore_data_file(const char *from_root,
297
297
if (in == NULL )
298
298
{
299
299
elog (ERROR_SYSTEM ,"cannot open backup file \"%s\": %s" ,file -> path ,
300
- strerror (errno ));
300
+ strerror (errno ));
301
301
}
302
302
303
303
/*
@@ -314,7 +314,7 @@ restore_data_file(const char *from_root,
314
314
int errno_tmp = errno ;
315
315
fclose (in );
316
316
elog (ERROR_SYSTEM ,"cannot open restore target file \"%s\": %s" ,
317
- to_path ,strerror (errno_tmp ));
317
+ to_path ,strerror (errno_tmp ));
318
318
}
319
319
320
320
for (blknum = 0 ; ;blknum ++ )
@@ -334,21 +334,21 @@ restore_data_file(const char *from_root,
334
334
else if (read_len != 0 && feof (in ))
335
335
{
336
336
elog (ERROR_CORRUPTED ,
337
- "odd size page found at block %u of \"%s\"" ,
338
- blknum ,file -> path );
337
+ "odd size page found at block %u of \"%s\"" ,
338
+ blknum ,file -> path );
339
339
}
340
340
else
341
341
{
342
342
elog (ERROR_SYSTEM ,"cannot read block %u of \"%s\": %s" ,
343
- blknum ,file -> path ,strerror (errno_tmp ));
343
+ blknum ,file -> path ,strerror (errno_tmp ));
344
344
}
345
345
}
346
346
347
347
if (header .block < blknum || header .hole_offset > BLCKSZ ||
348
348
(int )header .hole_offset + (int )header .hole_length > BLCKSZ )
349
349
{
350
350
elog (ERROR_CORRUPTED ,"backup is broken at block %u" ,
351
- blknum );
351
+ blknum );
352
352
}
353
353
354
354
upper_offset = header .hole_offset + header .hole_length ;
@@ -361,7 +361,7 @@ restore_data_file(const char *from_root,
361
361
fread (page .data + upper_offset ,1 ,upper_length ,in )!= upper_length )
362
362
{
363
363
elog (ERROR_SYSTEM ,"cannot read block %u of \"%s\": %s" ,
364
- blknum ,file -> path ,strerror (errno ));
364
+ blknum ,file -> path ,strerror (errno ));
365
365
}
366
366
367
367
/*
@@ -371,10 +371,10 @@ restore_data_file(const char *from_root,
371
371
blknum = header .block ;
372
372
if (fseek (out ,blknum * BLCKSZ ,SEEK_SET )< 0 )
373
373
elog (ERROR_SYSTEM ,"cannot seek block %u of \"%s\": %s" ,
374
- blknum ,to_path ,strerror (errno ));
374
+ blknum ,to_path ,strerror (errno ));
375
375
if (fwrite (page .data ,1 ,sizeof (page ),out )!= sizeof (page ))
376
376
elog (ERROR_SYSTEM ,"cannot write block %u of \"%s\": %s" ,
377
- blknum ,file -> path ,strerror (errno ));
377
+ blknum ,file -> path ,strerror (errno ));
378
378
}
379
379
380
380
/* update file permission */
@@ -384,7 +384,7 @@ restore_data_file(const char *from_root,
384
384
fclose (in );
385
385
fclose (out );
386
386
elog (ERROR_SYSTEM ,"cannot change mode of \"%s\": %s" ,to_path ,
387
- strerror (errno_tmp ));
387
+ strerror (errno_tmp ));
388
388
}
389
389
390
390
fclose (in );
@@ -421,7 +421,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
421
421
return false;
422
422
423
423
elog (ERROR_SYSTEM ,"cannot open source file \"%s\": %s" ,file -> path ,
424
- strerror (errno ));
424
+ strerror (errno ));
425
425
}
426
426
427
427
/* open backup file for write */
@@ -435,7 +435,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
435
435
int errno_tmp = errno ;
436
436
fclose (in );
437
437
elog (ERROR_SYSTEM ,"cannot open destination file \"%s\": %s" ,
438
- to_path ,strerror (errno_tmp ));
438
+ to_path ,strerror (errno_tmp ));
439
439
}
440
440
441
441
/* stat source file to change mode of destination file */
@@ -444,7 +444,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
444
444
fclose (in );
445
445
fclose (out );
446
446
elog (ERROR_SYSTEM ,"cannot stat \"%s\": %s" ,file -> path ,
447
- strerror (errno ));
447
+ strerror (errno ));
448
448
}
449
449
450
450
/* copy content and calc CRC */
@@ -460,7 +460,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
460
460
fclose (in );
461
461
fclose (out );
462
462
elog (ERROR_SYSTEM ,"cannot write to \"%s\": %s" ,to_path ,
463
- strerror (errno_tmp ));
463
+ strerror (errno_tmp ));
464
464
}
465
465
/* update CRC */
466
466
COMP_CRC32C (crc ,buf ,read_len );
@@ -475,7 +475,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
475
475
fclose (in );
476
476
fclose (out );
477
477
elog (ERROR_SYSTEM ,"cannot read backup mode file \"%s\": %s" ,
478
- file -> path ,strerror (errno_tmp ));
478
+ file -> path ,strerror (errno_tmp ));
479
479
}
480
480
481
481
/* copy odd part. */
@@ -488,7 +488,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
488
488
fclose (in );
489
489
fclose (out );
490
490
elog (ERROR_SYSTEM ,"cannot write to \"%s\": %s" ,to_path ,
491
- strerror (errno_tmp ));
491
+ strerror (errno_tmp ));
492
492
}
493
493
/* update CRC */
494
494
COMP_CRC32C (crc ,buf ,read_len );
@@ -508,7 +508,7 @@ copy_file(const char *from_root, const char *to_root, pgFile *file)
508
508
fclose (in );
509
509
fclose (out );
510
510
elog (ERROR_SYSTEM ,"cannot change mode of \"%s\": %s" ,to_path ,
511
- strerror (errno_tmp ));
511
+ strerror (errno_tmp ));
512
512
}
513
513
514
514
fclose (in );