From 5daeb588b63b82e555348cb96c31ef16b9d0620d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 20 Mar 2008 05:17:01 +0200 Subject: [PATCH] Rename checkpoint function to modstatdb_checkpoint and make it global --- ChangeLog | 6 ++++++ lib/dbmodify.c | 6 +++--- lib/dpkg-db.h | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6e42dbcd..b9776792 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-03-20 Ian Jackson + + * lib/dpkg-db.h (modstatdb_checkpoint): New prototype. + * lib/dbmodify.c (checkpoint): Remove static keyword. Rename to ... + (modstatdb_checkpoint): ... this. Fix all callers. + 2008-03-20 Ian Jackson * lib/tarfn.c (TarExtractor): Initialize h.LinkName and h.Name to diff --git a/lib/dbmodify.c b/lib/dbmodify.c index d13cc10f..cfc95cab 100644 --- a/lib/dbmodify.c +++ b/lib/dbmodify.c @@ -195,7 +195,7 @@ enum modstatdb_rw modstatdb_init(const char *adir, enum modstatdb_rw readwritere return cstatus; } -static void checkpoint(void) { +void modstatdb_checkpoint(void) { int i; assert(cstatus >= msdbrw_write); @@ -214,7 +214,7 @@ void modstatdb_shutdown(void) { const struct fni *fnip; switch (cstatus) { case msdbrw_write: - checkpoint(); + modstatdb_checkpoint(); writedb(availablefile,1,0); /* tidy up a bit, but don't worry too much about failure */ fclose(importanttmp); @@ -279,7 +279,7 @@ void modstatdb_note(struct pkginfo *pkg) { nextupdate++; if (nextupdate > MAXUPDATES) { - checkpoint(); + modstatdb_checkpoint(); nextupdate= 0; } diff --git a/lib/dpkg-db.h b/lib/dpkg-db.h index af7ed0b8..9f8de44e 100644 --- a/lib/dpkg-db.h +++ b/lib/dpkg-db.h @@ -170,6 +170,7 @@ extern struct pipef *status_pipes; enum modstatdb_rw modstatdb_init(const char *admindir, enum modstatdb_rw reqrwflags); void modstatdb_note(struct pkginfo *pkg); +void modstatdb_checkpoint(void); void modstatdb_shutdown(void); extern char *statusfile, *availablefile; /* initialised by modstatdb_init */ -- 2.39.5