summaryrefslogtreecommitdiff
path: root/src/utilities/util_upgrade.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utilities/util_upgrade.c')
-rw-r--r--src/utilities/util_upgrade.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/src/utilities/util_upgrade.c b/src/utilities/util_upgrade.c
index 63b23f28c16..f89bd46e133 100644
--- a/src/utilities/util_upgrade.c
+++ b/src/utilities/util_upgrade.c
@@ -15,9 +15,9 @@ util_upgrade(WT_SESSION *session, int argc, char *argv[])
{
WT_DECL_RET;
int ch;
- char *name;
+ char *uri;
- name = NULL;
+ uri = NULL;
while ((ch = __wt_getopt(progname, argc, argv, "")) != EOF)
switch (ch) {
case '?':
@@ -30,25 +30,21 @@ util_upgrade(WT_SESSION *session, int argc, char *argv[])
/* The remaining argument is the table name. */
if (argc != 1)
return (usage());
- if ((name = util_name(session, *argv, "table")) == NULL)
+ if ((uri = util_uri(session, *argv, "table")) == NULL)
return (1);
- if ((ret = session->upgrade(session, name, NULL)) != 0) {
- fprintf(stderr, "%s: upgrade(%s): %s\n",
- progname, name, session->strerror(session, ret));
- goto err;
+ if ((ret = session->upgrade(session, uri, NULL)) != 0)
+ (void)util_err(session, ret, "session.upgrade: %s", uri);
+ else {
+ /*
+ * Verbose configures a progress counter, move to the next
+ * line.
+ */
+ if (verbose)
+ printf("\n");
}
- /* Verbose configures a progress counter, move to the next line. */
- if (verbose)
- printf("\n");
-
- if (0) {
-err: ret = 1;
- }
-
- free(name);
-
+ free(uri);
return (ret);
}