*
*/
/*
- Copyright (C) 2000-2003 Kern Sibbald and John Walker
+ Copyright (C) 2000-2004 Kern Sibbald and John Walker
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
mode |= O_CTG; /* set contiguous bit if needed */
}
Dmsg1(50, "Create file: %s\n", attr->ofname);
+ if (is_bopen(bfd)) {
+ Jmsg1(jcr, M_ERROR, 0, "bpkt already open fid=%d\n", bfd->fid);
+ }
if ((bopen(bfd, attr->ofname, mode, S_IRUSR | S_IWUSR)) < 0) {
Jmsg2(jcr, M_ERROR, 0, _("Could not create %s: ERR=%s\n"),
attr->ofname, berror(bfd));
return CF_ERROR;
}
return CF_EXTRACT;
-
+#ifndef HAVE_WIN32 // none of these exists on MS Windows
case FT_RAW: /* Bacula raw device e.g. /dev/sda1 */
case FT_FIFO: /* Bacula fifo to save data */
case FT_SPEC:
}
}
if (attr->type == FT_RAW || attr->type == FT_FIFO) {
- btimer_id tid;
+ btimer_t *tid;
Dmsg1(200, "FT_RAW|FT_FIFO %s\n", attr->ofname);
mode = O_WRONLY | O_BINARY;
/* Timeout open() in 60 seconds */
} else {
tid = NULL;
}
+ if (is_bopen(bfd)) {
+ Jmsg1(jcr, M_ERROR, 0, "bpkt already open fid=%d\n", bfd->fid);
+ }
if ((bopen(bfd, attr->ofname, mode, 0)) < 0) {
Jmsg2(jcr, M_ERROR, 0, _("Could not open %s: ERR=%s\n"),
attr->ofname, berror(bfd));
return CF_ERROR;
}
return CF_CREATED;
-
+#endif
} /* End inner switch */
case FT_DIR:
* and saved.
*/
if (!is_portable_backup(bfd)) {
+ if (is_bopen(bfd)) {
+ Jmsg1(jcr, M_ERROR, 0, "bpkt already open fid=%d\n", bfd->fid);
+ }
if ((bopen(bfd, attr->ofname, O_WRONLY|O_BINARY, 0)) < 0) {
Jmsg2(jcr, M_ERROR, 0, _("Could not open %s: ERR=%s\n"),
attr->ofname, berror(bfd));