@@ -24,7 +24,10 @@
fdin = open (src, O_RDONLY);
if (fdin < 0) {
- condlog(0, "[copy.c] cannot open %s", src);
+ if (errno == ENOENT)
+ condlog(3, "callout %s does not exist, ignoring");
+ else
+ condlog(0, "[copy.c] cannot open %s", src);
return -1;
}
/*
@@ -1338,8 +1338,11 @@
*/
vector_foreach_slot (conf->binvec, bin,i) {
if ((fd = open(bin, O_RDONLY)) < 0) {
- condlog(0, "cannot open %s : %s\n", bin,
- strerror(errno));
+ if (errno == ENOENT)
+ condlog(3, "callout %s does not exist, ignoring");
+ else
+ condlog(0, "cannot open %s : %s", bin,
+ strerror(errno));
continue;
}
if (fstat(fd, &statbuf) < 0) {
@@ -1368,11 +1371,8 @@
* populate the ramfs with callout binaries
*/
vector_foreach_slot (conf->binvec, bin,i) {
- if (copytodir(bin, CALLOUT_DIR) < 0) {
- condlog(0, "cannot copy %s in ramfs : %s", bin,
- strerror(errno));
+ if (copytodir(bin, CALLOUT_DIR) < 0)
continue;
- }
condlog(4, "cp %s in ramfs", bin);
}
free_strvec(conf->binvec);
@@ -269,7 +269,7 @@
rc = do_rtpg(fd, buf, buflen);
if (rc < 0)
goto out;
- scsi_buflen = buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3] + 4;
+ scsi_buflen = (buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3]) + 4;
if (buflen < scsi_buflen) {
free(buf);
buf = (unsigned char *)malloc(scsi_buflen);