diff --git a/lib/dsmlist.c b/lib/dsmlist.c index a2a66d4..ea16f5b 100644 --- a/lib/dsmlist.c +++ b/lib/dsmlist.c @@ -31,7 +31,7 @@ char *units(double size) { while (size >= base && div < (int)(sizeof SIZES / sizeof *SIZES)-1) { if (verbose > 2) - fprintf(stderr,"BEFORE: %s: SIZE: [%3.2f], DIV: [%d], REM: [%3.2f]\n",__func__,size,div,rem); + fprintf(stderr,"%s: BEFORE - SIZE: [%3.2f], DIV: [%d], REM: [%3.2f]\n",__func__,size,div,rem); rem = ((int)size % base); size /= base; @@ -39,7 +39,7 @@ char *units(double size) { } if (verbose > 2) - fprintf(stderr,"AFTER: %s: SIZE: [%3.2f], DIV: [%d], REM: [%3.2f]\n",__func__,size,div,rem); + fprintf(stderr,"%s: AFTER - SIZE: [%3.2f], DIV: [%d], REM: [%3.2f]\n",__func__,size,div,rem); sprintf(s,"%3.2f %s",size,SIZES[div]); @@ -50,6 +50,7 @@ char *units(double size) { * Our Callback to show what is in TSM */ int tsm_listfile_cb(dsmQueryType qType, DataBlk *qResp, void *userdata, dsBool_t friendly) { + extern int verbose; char stor[2]; char state[3]; char ced[4]; @@ -172,6 +173,8 @@ int tsm_listfile_cb(dsmQueryType qType, DataBlk *qResp, void *userdata, dsBool_t (respBackup.encryptionType & DSM_ENCRYPT_USER ? "U" : "-"))); strcat(ced,respBackup.clientDeduplicated ? "D" : "-"); + if (verbose > 2) + fprintf(stderr,"%s: clientDeduplicated: %d\n",__func__,respBackup.clientDeduplicated); #ifdef USE_DIGEST // Object Info diff --git a/lib/dsmsession.c b/lib/dsmsession.c index bd695cc..4fefab6 100644 --- a/lib/dsmsession.c +++ b/lib/dsmsession.c @@ -306,19 +306,28 @@ dsInt16_t tsm_queryfile(dsUint32_t dsmHandle, dsmQueryType qType, tsm_query_call case qtArchive: qDataP = &qaData; + qryRespArchiveData qaResp; + + qResp.bufferLen = sizeof(qaResp); + qResp.bufferPtr = (char *) &qaResp; + + qaResp.stVersion = qryRespArchiveDataVersion; + if (verbose) fprintf(stderr,"%s: Query filespace %s\n",__func__,dsmObjnameToStr(*qaData.objName)); - qryRespArchiveData qaResp; - qaResp.stVersion = qryRespArchiveDataVersion; - - qResp.bufferPtr = (char *) &qaResp; - qResp.bufferLen = sizeof(qaResp); break; case qtBackup: qDataP = &qbData; + qryRespBackupData qbResp; + + qResp.bufferLen = sizeof(qbResp); + qResp.bufferPtr = (char *) &qbResp; + + qbResp.stVersion = qryRespBackupDataVersion; + if (verbose) fprintf(stderr,"%s: Query filespace %s\n",__func__,dsmObjnameToStr(*qbData.objName)); if (verbose > 1) { @@ -326,11 +335,6 @@ dsInt16_t tsm_queryfile(dsUint32_t dsmHandle, dsmQueryType qType, tsm_query_call fprintf(stderr,"%s: OBJSTATE : %s\n",__func__,qbData.objState==DSM_ACTIVE ? "DSM_ACTIVE" : "DSM_ANY_MATCH"); } - qryRespBackupData qbResp; - qbResp.stVersion = qryRespBackupDataVersion; - - qResp.bufferPtr = (char *) &qbResp; - qResp.bufferLen = sizeof(qbResp); break; default: @@ -381,7 +385,7 @@ dsInt16_t tsm_queryfile(dsUint32_t dsmHandle, dsmQueryType qType, tsm_query_call } if (rc != DSM_RC_FINISHED && rc != DSM_RC_MORE_DATA) { - printf("%s: dsmGetNextObj() failed %s\n",__func__,tsm_printerr(dsmHandle,rc)); + printf("%s: dsmGetNextQObj() failed %s\n",__func__,tsm_printerr(dsmHandle,rc)); return rc; }