Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
ccan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mirror
ccan
Commits
b2555a86
Commit
b2555a86
authored
Aug 31, 2011
by
Rusty Russell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tdb2: unify tdb1_wipe into tdb_wipe.
Switch on the TDB_VERSION1 flag.
parent
57359c26
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
ccan/tdb2/private.h
ccan/tdb2/private.h
+1
-0
ccan/tdb2/tdb1.h
ccan/tdb2/tdb1.h
+0
-2
ccan/tdb2/traverse.c
ccan/tdb2/traverse.c
+6
-0
No files found.
ccan/tdb2/private.h
View file @
b2555a86
...
...
@@ -681,6 +681,7 @@ enum TDB_ERROR tdb1_parse_record(struct tdb_context *tdb, TDB_DATA key,
void
*
private_data
);
void
tdb1_increment_seqnum_nonblock
(
struct
tdb_context
*
tdb
);
int
tdb1_get_seqnum
(
struct
tdb_context
*
tdb
);
int
tdb1_wipe_all
(
struct
tdb_context
*
tdb
);
/* tdb1_transaction.c: */
int
tdb1_transaction_start
(
struct
tdb_context
*
tdb
);
...
...
ccan/tdb2/tdb1.h
View file @
b2555a86
...
...
@@ -42,8 +42,6 @@ uint64_t tdb1_incompatible_hash(const void *key, size_t len, uint64_t seed, void
/* @} ******************************************************************/
/* wipe and repack */
int
tdb1_wipe_all
(
struct
tdb_context
*
tdb
);
int
tdb1_repack
(
struct
tdb_context
*
tdb
);
extern
TDB_DATA
tdb1_null
;
...
...
ccan/tdb2/traverse.c
View file @
b2555a86
...
...
@@ -115,6 +115,12 @@ enum TDB_ERROR tdb_wipe_all(struct tdb_context *tdb)
enum
TDB_ERROR
ecode
;
int64_t
count
;
if
(
tdb
->
flags
&
TDB_VERSION1
)
{
if
(
tdb1_wipe_all
(
tdb
)
==
-
1
)
return
tdb
->
last_error
;
return
TDB_SUCCESS
;
}
ecode
=
tdb_allrecord_lock
(
tdb
,
F_WRLCK
,
TDB_LOCK_WAIT
,
false
);
if
(
ecode
!=
TDB_SUCCESS
)
return
tdb
->
last_error
=
ecode
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment