@@ -177,7 +177,7 @@ scan_directory(char *basedir, char *subdir)
177
177
segmentno = atoi (segmentpath );
178
178
if (segmentno == 0 )
179
179
{
180
- fprintf (stderr , _ ("%s: invalid segment number %d in filename \"%s\"\n" ),
180
+ fprintf (stderr , _ ("%s: invalid segment number %d in file name \"%s\"\n" ),
181
181
progname , segmentno , fn );
182
182
exit (1 );
183
183
}
@@ -247,7 +247,7 @@ main(int argc, char *argv[])
247
247
case 'r' :
248
248
if (atoi (optarg ) <= 0 )
249
249
{
250
- fprintf (stderr , _ ("%s: invalid relfilenode: %s\n" ), progname , optarg );
250
+ fprintf (stderr , _ ("%s: invalid relfilenode specification, must be numeric : %s\n" ), progname , optarg );
251
251
exit (1 );
252
252
}
253
253
only_relfilenode = pstrdup (optarg );
@@ -288,20 +288,20 @@ main(int argc, char *argv[])
288
288
ControlFile = get_controlfile (DataDir , progname , & crc_ok );
289
289
if (!crc_ok )
290
290
{
291
- fprintf (stderr , _ ("%s: pg_control CRC value is incorrect. \n" ), progname );
291
+ fprintf (stderr , _ ("%s: pg_control CRC value is incorrect\n" ), progname );
292
292
exit (1 );
293
293
}
294
294
295
295
if (ControlFile -> state != DB_SHUTDOWNED &&
296
296
ControlFile -> state != DB_SHUTDOWNED_IN_RECOVERY )
297
297
{
298
- fprintf (stderr , _ ("%s: cluster must be shut down to verify checksums. \n" ), progname );
298
+ fprintf (stderr , _ ("%s: cluster must be shut down to verify checksums\n" ), progname );
299
299
exit (1 );
300
300
}
301
301
302
302
if (ControlFile -> data_checksum_version == 0 )
303
303
{
304
- fprintf (stderr , _ ("%s: data checksums are not enabled in cluster. \n" ), progname );
304
+ fprintf (stderr , _ ("%s: data checksums are not enabled in cluster\n" ), progname );
305
305
exit (1 );
306
306
}
307
307
@@ -312,9 +312,9 @@ main(int argc, char *argv[])
312
312
313
313
printf (_ ("Checksum scan completed\n" ));
314
314
printf (_ ("Data checksum version: %d\n" ), ControlFile -> data_checksum_version );
315
- printf (_ ("Files scanned: %" INT64_MODIFIER "d \n" ), files );
316
- printf (_ ("Blocks scanned: %" INT64_MODIFIER "d \n" ), blocks );
317
- printf (_ ("Bad checksums: %" INT64_MODIFIER "d \n" ), badblocks );
315
+ printf (_ ("Files scanned: %s \n" ), psprintf ( INT64_FORMAT , files ) );
316
+ printf (_ ("Blocks scanned: %s \n" ), psprintf ( INT64_FORMAT , blocks ) );
317
+ printf (_ ("Bad checksums: %s \n" ), psprintf ( INT64_FORMAT , badblocks ) );
318
318
319
319
if (badblocks > 0 )
320
320
return 1 ;
0 commit comments