mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
lib/tdb2: fix error string formatting.
This caused a crash on PPC64 when we failed the mmap (found by failtest, reported by Amitay) Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
ee0d1daa27
commit
5ba2e4fc39
@ -134,8 +134,8 @@ static enum TDB_ERROR tdb_oob(struct tdb_context *tdb,
|
||||
return TDB_SUCCESS;
|
||||
|
||||
tdb_logerr(tdb, TDB_ERR_IO, TDB_LOG_ERROR,
|
||||
"tdb_oob len %llu beyond eof at %zu",
|
||||
(long long)(off + len), st.st_size);
|
||||
"tdb_oob len %llu beyond eof at %llu",
|
||||
(long long)(off + len), (long long)st.st_size);
|
||||
return TDB_ERR_IO;
|
||||
}
|
||||
|
||||
|
@ -420,7 +420,8 @@ int tdb1_check(struct tdb_context *tdb,
|
||||
|
||||
tdb_logerr(tdb, TDB_SUCCESS, TDB_LOG_WARNING,
|
||||
"Dead space at %d-%d (of %u)\n",
|
||||
off, off + dead, tdb->file->map_size);
|
||||
off, off + dead,
|
||||
(unsigned)tdb->file->map_size);
|
||||
rec.rec_len = dead - sizeof(rec);
|
||||
break;
|
||||
case TDB1_RECOVERY_MAGIC:
|
||||
|
@ -230,8 +230,9 @@ void tdb1_mmap(struct tdb_context *tdb)
|
||||
if (tdb->file->map_ptr == MAP_FAILED) {
|
||||
tdb->file->map_ptr = NULL;
|
||||
tdb_logerr(tdb, TDB_ERR_IO, TDB_LOG_WARNING,
|
||||
"tdb1_mmap failed for size %d (%s)",
|
||||
tdb->file->map_size, strerror(errno));
|
||||
"tdb1_mmap failed for size %llu (%s)",
|
||||
(long long)tdb->file->map_size,
|
||||
strerror(errno));
|
||||
}
|
||||
} else {
|
||||
tdb->file->map_ptr = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user