From 6e16566ffb18c0ca9997260417fdf8a2511a0298 Mon Sep 17 00:00:00 2001 From: Paul Park Date: Fri, 26 May 1995 22:45:36 +0000 Subject: [PATCH] Change to new Berkeley Database naming convention git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5900 dc483132-0cff-0310-8789-dd5450dbe970 --- src/admin/destroy/ChangeLog | 7 +++++++ src/admin/destroy/Makefile.in | 2 +- src/admin/destroy/kdb5_destroy.c | 12 ++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/admin/destroy/ChangeLog b/src/admin/destroy/ChangeLog index 56a7b2053..4338bf6af 100644 --- a/src/admin/destroy/ChangeLog +++ b/src/admin/destroy/ChangeLog @@ -1,3 +1,10 @@ + +Fri May 26 17:48:41 EDT 1995 Paul Park (pjpark@mit.edu) + * kdb5_destroy.c - Conditionalize implicit knowledge of filename + suffix under BERK_DB_DBM. If this is set, then use ".db" + otherwise, use ".dir" and ".pag". + * Makefile.in - Set BERK_DB_DBM when compiling. + Thu Mar 2 12:18:36 1995 Theodore Y. Ts'o * Makefile.in (ISODELIB): Remove reference to $(ISODELIB). diff --git a/src/admin/destroy/Makefile.in b/src/admin/destroy/Makefile.in index 01303acab..4beae3d32 100644 --- a/src/admin/destroy/Makefile.in +++ b/src/admin/destroy/Makefile.in @@ -1,4 +1,4 @@ -CFLAGS = $(CCOPTS) $(DEFS) $(LOCALINCLUDE) +CFLAGS = $(CCOPTS) $(DEFS) $(LOCALINCLUDE) -DBERK_DB_DBM LDFLAGS = -g COMERRLIB=$(BUILDTOP)/util/et/libcom_err.a diff --git a/src/admin/destroy/kdb5_destroy.c b/src/admin/destroy/kdb5_destroy.c index 7eeb04c72..964aa4d4a 100644 --- a/src/admin/destroy/kdb5_destroy.c +++ b/src/admin/destroy/kdb5_destroy.c @@ -87,6 +87,7 @@ main(argc, argv) exit(1); printf("OK, deleting database '%s'...\n", dbname); } +#ifndef BERK_DB_DBM (void) strcpy(dbfilename, dbname); (void) strcat(dbfilename, ".dir"); if (unlink(dbfilename) == -1) { @@ -109,6 +110,17 @@ main(argc, argv) "Database may be partially deleted--inspect files manually!\n"); exit(1); } +#else /* BERK_DB_DBM */ + (void) strcpy(dbfilename, dbname); + (void) strcat(dbfilename, ".db"); + if (unlink(dbfilename) == -1) { + retval = errno; + com_err(argv[0], retval, "deleting database file '%s'",dbfilename); + fprintf(stderr, + "Database may be partially deleted--inspect files manually!\n"); + exit(1); + } +#endif /* BERK_DB_DBM */ (void) strcpy(dbfilename, dbname); (void) strcat(dbfilename, ".ok"); if (unlink(dbfilename) == -1) { -- 2.26.2