The following commit has been merged in the master branch: commit 76c8c559df929567c2ff9352617e4f116b761629 Author: Guillem Jover <guil...@debian.org> Date: Thu Feb 25 18:50:23 2010 +0100
libdpkg: Rename database lock functions to use modstatdb_ prefix Remove now redudant database suffix from the function names. diff --git a/lib/dpkg/dbmodify.c b/lib/dpkg/dbmodify.c index beffdac..b416877 100644 --- a/lib/dpkg/dbmodify.c +++ b/lib/dpkg/dbmodify.c @@ -140,7 +140,7 @@ static const struct fni { }; void -lockdatabase(const char *admindir) +modstatdb_lock(const char *admindir) { static int dblockfd = -1; int n; @@ -168,7 +168,7 @@ lockdatabase(const char *admindir) } void -unlockdatabase(void) +modstatdb_unlock(void) { unlock_file(); } @@ -201,7 +201,7 @@ enum modstatdb_rw modstatdb_init(const char *adir, enum modstatdb_rw readwritere ohshit(_("operation requires read/write access to dpkg status area")); cstatus= msdbrw_readonly; } else { - lockdatabase(adir); + modstatdb_lock(adir); cstatus= (readwritereq == msdbrw_needsuperuserlockonly ? msdbrw_needsuperuserlockonly : msdbrw_write); @@ -264,7 +264,7 @@ void modstatdb_shutdown(void) { varbuf_destroy(&uvb); /* fall through */ case msdbrw_needsuperuserlockonly: - unlockdatabase(); + modstatdb_unlock(); default: break; } diff --git a/lib/dpkg/dpkg-db.h b/lib/dpkg/dpkg-db.h index 4591186..75a59a1 100644 --- a/lib/dpkg/dpkg-db.h +++ b/lib/dpkg/dpkg-db.h @@ -187,11 +187,6 @@ struct pkginfo { /* pig */ struct trigpend *trigpend_head; }; -/*** from lock.c ***/ - -void lockdatabase(const char *admindir); -void unlockdatabase(void); - /*** from dbmodify.c ***/ enum modstatdb_rw { @@ -205,6 +200,8 @@ enum modstatdb_rw { msdbrw_noavail= 0100, }; +void modstatdb_lock(const char *admindir); +void modstatdb_unlock(void); enum modstatdb_rw modstatdb_init(const char *admindir, enum modstatdb_rw reqrwflags); void modstatdb_note(struct pkginfo *pkg); void modstatdb_note_ifwrite(struct pkginfo *pkg); diff --git a/src/update.c b/src/update.c index 0e630f9..246a489 100644 --- a/src/update.c +++ b/src/update.c @@ -58,7 +58,7 @@ void updateavailable(const char *const *argv) { else ohshit(_("bulk available update requires write access to dpkg status area")); } - lockdatabase(admindir); + modstatdb_lock(admindir); } switch (cipaction->arg) { @@ -88,7 +88,7 @@ void updateavailable(const char *const *argv) { if (!f_noact) { writedb(vb.buf,1,0); - unlockdatabase(); + modstatdb_unlock(); } if (cipaction->arg != act_avclear) -- dpkg's main repository -- To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org