diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2007-07-16 16:48:14 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2007-07-16 16:48:14 +0300 |
commit | 2cfd3012bfcb5c5c61bbaf662ef084e0ab789d79 (patch) | |
tree | e12ee52087506ac8c7a5eee83b17497d98df2d40 /db/db_archive | |
parent | b754fe19fd387ca5fe8e7c00ddaa25c898fa192f (diff) | |
download | librpm-tizen-2cfd3012bfcb5c5c61bbaf662ef084e0ab789d79.tar.gz librpm-tizen-2cfd3012bfcb5c5c61bbaf662ef084e0ab789d79.tar.bz2 librpm-tizen-2cfd3012bfcb5c5c61bbaf662ef084e0ab789d79.zip |
Update internal BDB to version 4.5.20
Diffstat (limited to 'db/db_archive')
-rw-r--r-- | db/db_archive/db_archive.c | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/db/db_archive/db_archive.c b/db/db_archive/db_archive.c index d5db42dee..48094e20f 100644 --- a/db/db_archive/db_archive.c +++ b/db/db_archive/db_archive.c @@ -1,33 +1,26 @@ /*- * See the file LICENSE for redistribution information. * - * Copyright (c) 1996-2004 - * Sleepycat Software. All rights reserved. + * Copyright (c) 1996-2006 + * Oracle Corporation. All rights reserved. * - * $Id: db_archive.c,v 11.46 2004/06/10 01:00:08 bostic Exp $ + * $Id: db_archive.c,v 12.9 2006/08/26 09:23:00 bostic Exp $ */ #include "db_config.h" +#include "db_int.h" + #ifndef lint static const char copyright[] = - "Copyright (c) 1996-2004\nSleepycat Software Inc. All rights reserved.\n"; -#endif - -#ifndef NO_SYSTEM_INCLUDES -#include <sys/types.h> - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> + "Copyright (c) 1996-2006\nOracle Corporation. All rights reserved.\n"; #endif -#include "db_int.h" - int main __P((int, char *[])); int usage __P((void)); -int version_check __P((const char *)); +int version_check __P((void)); + +const char *progname; int main(argc, argv) @@ -36,13 +29,17 @@ main(argc, argv) { extern char *optarg; extern int optind; - const char *progname = "db_archive"; DB_ENV *dbenv; u_int32_t flags; int ch, exitval, ret, verbose; char **file, *home, **list, *passwd; - if ((ret = version_check(progname)) != 0) + if ((progname = strrchr(argv[0], '/')) == NULL) + progname = argv[0]; + else + ++progname; + + if ((ret = version_check()) != 0) return (ret); dbenv = NULL; @@ -80,6 +77,12 @@ main(argc, argv) printf("%s\n", db_version(NULL, NULL, NULL)); return (EXIT_SUCCESS); case 'v': + /* + * !!! + * The verbose flag no longer actually does anything, + * but it's left rather than adding it back at some + * future date. + */ verbose = 1; break; case '?': @@ -117,8 +120,7 @@ main(argc, argv) * If attaching to a pre-existing environment fails, create a * private one and try again. */ - if ((ret = dbenv->open(dbenv, - home, DB_JOINENV | DB_USE_ENVIRON, 0)) != 0 && + if ((ret = dbenv->open(dbenv, home, DB_USE_ENVIRON, 0)) != 0 && (ret == DB_VERSION_MISMATCH || (ret = dbenv->open(dbenv, home, DB_CREATE | DB_INIT_LOG | DB_PRIVATE | DB_USE_ENVIRON, 0)) != 0)) { @@ -161,13 +163,12 @@ int usage() { (void)fprintf(stderr, - "usage: db_archive [-adlsVv] [-h home] [-P password]\n"); + "usage: %s [-adlsVv] [-h home] [-P password]\n", progname); return (EXIT_FAILURE); } int -version_check(progname) - const char *progname; +version_check() { int v_major, v_minor, v_patch; |