/*
* Amanda, The Advanced Maryland Automatic Network Disk Archiver
* Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved.
* All Rights Reserved.
*
* Permission to use, copy, modify, distribute, and sell this software and its
amfree(hostname);
return (-1);
}
- if ((dtype = lookup_dumptype(dumptype)) == NULL) {
+ if (lookup_dumptype(dumptype) == NULL) {
diskdevice = dumptype;
skip_whitespace(s, ch);
if(ch == '\0' || ch == '#') {
char *
match_disklist(
disklist_t *origqp,
+ gboolean exact_match,
int sargc,
char ** sargv)
{
int prev_match;
disk_t *dp_skip;
disk_t *dp;
+ char **new_sargv = NULL;
if(sargc <= 0)
return NULL;
+ if (exact_match) {
+ new_sargv = g_new0(char *, sargc+1);
+ for (i=0; i<sargc; i++) {
+ if (*sargv[i] == '=') {
+ new_sargv[i] = g_strdup(sargv[i]);
+ } else {
+ new_sargv[i] = g_strconcat("=", sargv[i], NULL);
+ }
+ }
+ sargv = new_sargv;
+ }
+
+
for(dp = origqp->head; dp != NULL; dp = dp->next) {
if(dp->todo == 1)
dp->todo = -1;
dp->todo = 0;
}
+ if (new_sargv) {
+ for (i=0; i<sargc; i++)
+ g_free(new_sargv[i]);
+ g_free(new_sargv);
+ }
return errstr;
}
gboolean
match_dumpfile(
dumpfile_t *file,
+ gboolean exact_match,
int sargc,
char ** sargv)
{
dl.head = dl.tail = &d;
- (void)match_disklist(&dl, sargc, sargv);
+ (void)match_disklist(&dl, exact_match, sargc, sargv);
return d.todo;
}