From: Ian Jackson Date: Thu, 20 Mar 2008 03:17:01 +0000 (+0200) Subject: Rename checkpoint function to modstatdb_checkpoint and make it global X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5daeb588b63b82e555348cb96c31ef16b9d0620d;p=dpkg Rename checkpoint function to modstatdb_checkpoint and make it global --- 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 */