git.samba.org
/
sahlberg
/
ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7776217
)
store the database name, not the backup filename in the database header
author
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Wed, 13 Aug 2008 22:36:39 +0000
(08:36 +1000)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Wed, 13 Aug 2008 22:36:39 +0000
(08:36 +1000)
tools/ctdb.c
patch
|
blob
|
history
diff --git
a/tools/ctdb.c
b/tools/ctdb.c
index 7b912af9d66b17e0efc2a4948f25e950ad2a3d17..7d8cf846d08c153442cef294f5495497432d64ea 100644
(file)
--- a/
tools/ctdb.c
+++ b/
tools/ctdb.c
@@
-1887,12
+1887,12
@@
static int control_backupdb(struct ctdb_context *ctdb, int argc, const char **ar
dbhdr.timestamp = time(NULL);
dbhdr.persistent = dbmap->dbs[i].persistent;
dbhdr.size = outdata.dsize;
- if (strlen(argv[
1
]) >= MAX_DB_NAME) {
+ if (strlen(argv[
0
]) >= MAX_DB_NAME) {
DEBUG(DEBUG_ERR,("Too long dbname\n"));
talloc_free(tmp_ctx);
return -1;
}
- strncpy(discard_const(dbhdr.name), argv[
1
], MAX_DB_NAME);
+ strncpy(discard_const(dbhdr.name), argv[
0
], MAX_DB_NAME);
write(fh, &dbhdr, sizeof(dbhdr));
write(fh, outdata.dptr, outdata.dsize);