diff options
| author | Volker Lendecke <vl@samba.org> | 2013-02-21 16:34:32 +0100 |
|---|---|---|
| committer | Jeremy Allison <jra@samba.org> | 2014-05-22 21:05:15 +0200 |
| commit | cbd73ba1635c061fa71ff0476cbce087b389d1ad (patch) | |
| tree | 16e67ca6bad58a5c3ba4c58ad77c3683fa74eb4b /lib/tdb/test | |
| parent | c29e64d97ee18e9d7946151052d1757084f861c6 (diff) | |
| download | samba-cbd73ba1635c061fa71ff0476cbce087b389d1ad.tar.gz samba-cbd73ba1635c061fa71ff0476cbce087b389d1ad.tar.xz samba-cbd73ba1635c061fa71ff0476cbce087b389d1ad.zip | |
tdb: introduce tdb->hdr_ofs
This makes it possible to have some extra headers before
the real tdb content starts in the file.
This will be used used e.g. to implement locking based on robust mutexes.
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/tdb/test')
| -rw-r--r-- | lib/tdb/test/run-3G-file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tdb/test/run-3G-file.c b/lib/tdb/test/run-3G-file.c index 67fd54f54f..900b1a667a 100644 --- a/lib/tdb/test/run-3G-file.c +++ b/lib/tdb/test/run-3G-file.c @@ -22,12 +22,12 @@ static int tdb_expand_file_sparse(struct tdb_context *tdb, return -1; } - if (ftruncate(tdb->fd, size+addition) == -1) { + if (tdb_ftruncate(tdb, size+addition) == -1) { char b = 0; - ssize_t written = pwrite(tdb->fd, &b, 1, (size+addition) - 1); + ssize_t written = tdb_pwrite(tdb, &b, 1, (size+addition) - 1); if (written == 0) { /* try once more, potentially revealing errno */ - written = pwrite(tdb->fd, &b, 1, (size+addition) - 1); + written = tdb_pwrite(tdb, &b, 1, (size+addition) - 1); } if (written == 0) { /* again - give up, guessing errno */ |
