- multiple simultaneous Volumes
For 1.30 release:
+- Change stat1= fgets()!=NULL to stat1=fgest()==NULL; in
+ run_program -- bpipe.c
+- Add RunBeforeJob and RunAfterJob to the Client program.
- Have SD compute MD5 or SHA1 and compare to what FD computes.
- Make VolumeToCatalog calculate an MD5 or SHA1 from the
actual data on the Volume and compare it.
- Implement multiple simultaneous file Volumes on a single device.
- Cleanup db_update_media and db_update_pool
- Flush all the daemon messages at the end of every job.
-
* Run an external program. Optionally wait a specified number
* of seconds. Program killed if wait exceeded. Optionally
* return the output from the program (normally a single line).
+ *
+ * Contrary to my normal calling conventions, this program
+ *
+ * Returns: 0 on success
+ * non-zero on error
*/
int run_program(char *prog, int wait, POOLMEM *results)
{
}
if (results) {
results[0] = 0;
- stat1 = fgets(results, sizeof_pool_memory(results), bpipe->rfd) != NULL;
+ stat1 = fgets(results, sizeof_pool_memory(results), bpipe->rfd) == NULL;
} else {
- stat1 = 1;
+ stat1 = 0;
}
stat2 = close_bpipe(bpipe);
- return stat1 && stat2;
+ return stat2 != 0 ? stat2 : stat1;
}
changer = edit_device_codes(jcr, changer, jcr->device->changer_command,
"loaded");
status = run_program(changer, timeout, results);
+ Dmsg3(100, "run_prog: %s stat=%d result=%s\n", changer, status, results);
if (status == 0) {
loaded = atoi(results);
} else {