Skip to content

Commit

Permalink
ndmp: Implement some of the NDMP specific storage routines.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco van Wieringen committed Jun 25, 2016
1 parent 9c5d8bf commit e228044
Show file tree
Hide file tree
Showing 6 changed files with 896 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/dird/dird_conf.c
Expand Up @@ -280,6 +280,8 @@ static RES_ITEM store_items[] = {
{ "PairedStorage", CFG_TYPE_RES, ITEM(res_store.paired_storage), R_STORAGE, 0, NULL, NULL, NULL },
{ "MaximumBandwidthPerJob", CFG_TYPE_SPEED, ITEM(res_store.max_bandwidth), 0, 0, NULL, NULL, NULL },
{ "CollectStatistics", CFG_TYPE_BOOL, ITEM(res_store.collectstats), 0, CFG_ITEM_DEFAULT, "false", NULL, NULL },
{ "ChangerDevice", CFG_TYPE_STRNAME, ITEM(res_store.changer_device), 0, 0, NULL, NULL, NULL },
{ "TapeDevice", CFG_TYPE_ALIST_STR, ITEM(res_store.tape_devices), 0, 0, NULL, NULL, NULL },
TLS_CONFIG(res_store)
{ NULL, 0, { 0 }, 0, 0, NULL, NULL, NULL }
};
Expand Down Expand Up @@ -2525,6 +2527,12 @@ void free_resource(RES *sres, int type)
if (res->res_store.media_type) {
free(res->res_store.media_type);
}
if (res->res_store.changer_device) {
free(res->res_store.changer_device);
}
if (res->res_store.tape_devices) {
delete res->res_store.tape_devices;
}
if (res->res_store.device) {
delete res->res_store.device;
}
Expand Down Expand Up @@ -2765,6 +2773,7 @@ static bool update_resource_pointer(int type, RES_ITEM *items)
} else {
int status;

res->res_store.tape_devices = res_all.res_store.tape_devices;
res->res_store.paired_storage = res_all.res_store.paired_storage;
res->res_store.tls.allowed_cns = res_all.res_store.tls.allowed_cns;

Expand Down
2 changes: 2 additions & 0 deletions src/dird/dird_conf.h
Expand Up @@ -288,6 +288,8 @@ class STORERES : public BRSRES {
char *username; /* Username to use for authentication if protocol supports it */
s_password password;
char *media_type; /* Media Type provided by this Storage */
char *changer_device; /* If DIR controls storage directly changer device used */
alist *tape_devices; /* If DIR controls storage directly tape devices in storage */
alist *device; /* Alternate devices for this Storage */
int32_t MaxConcurrentJobs; /* Maximum concurrent jobs */
int32_t MaxConcurrentReadJobs; /* Maximum concurrent jobs reading */
Expand Down

0 comments on commit e228044

Please sign in to comment.