Skip to content

Commit

Permalink
Remove doublets of Emsg and Dmsg
Browse files Browse the repository at this point in the history
Emsg now automtatically does Dmsg, so we would then get
double output.
  • Loading branch information
pstorz committed Mar 30, 2016
1 parent fb1b7dd commit c626a26
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 43 deletions.
1 change: 0 additions & 1 deletion src/lib/bsys.c
Expand Up @@ -746,7 +746,6 @@ void write_state_file(char *dir, const char *progname, int port)
secure_erase(NULL, fname);
if ((sfd = open(fname, O_CREAT|O_WRONLY|O_BINARY, 0640)) < 0) {
berrno be;
Dmsg2(000, "Could not create state file. %s ERR=%s\n", fname, be.bstrerror());
Emsg2(M_ERROR, 0, _("Could not create state file. %s ERR=%s\n"), fname, be.bstrerror());
goto bail_out;
}
Expand Down
1 change: 0 additions & 1 deletion src/lib/crypto_cache.c
Expand Up @@ -156,7 +156,6 @@ void write_crypto_cache(const char *cache_file)
if ((fd = open(cache_file, O_CREAT | O_WRONLY | O_BINARY, 0640)) < 0) {
berrno be;

Dmsg2(000, "Could not create crypto cache file. %s ERR=%s\n", cache_file, be.bstrerror());
Emsg2(M_ERROR, 0, _("Could not create crypto cache file. %s ERR=%s\n"), cache_file, be.bstrerror());
goto bail_out;
}
Expand Down
35 changes: 0 additions & 35 deletions src/lib/scsi_lli.c
Expand Up @@ -67,8 +67,6 @@ static inline bool do_scsi_cmd_page(int fd, const char *device_name,

Emsg2(M_ERROR, 0, _("Failed to open %s: ERR=%s\n"),
device_name, be.bstrerror());
Dmsg2(010, "Failed to open %s: ERR=%s\n",
device_name, be.bstrerror());
return false;
}
opened_device = true;
Expand All @@ -91,8 +89,6 @@ static inline bool do_scsi_cmd_page(int fd, const char *device_name,

Emsg2(M_ERROR, 0, _("Unable to perform SG_IO ioctl on fd %d: ERR=%s\n"),
fd, be.bstrerror());
Dmsg2(010, "Unable to perform SG_IO ioctl on fd %d: ERR=%s\n",
fd, be.bstrerror());
goto bail_out;
}

Expand All @@ -101,10 +97,6 @@ static inline bool do_scsi_cmd_page(int fd, const char *device_name,
io_hdr.info, io_hdr.masked_status, io_hdr.msg_status);
Emsg2(M_ERROR, 0, _(" host status 0x%02x driver status 0x%02x\n"),
io_hdr.host_status, io_hdr.driver_status );
Dmsg3(010, "Failed with info 0x%02x mask status 0x%02x msg status 0x%02x\n",
io_hdr.info, io_hdr.masked_status, io_hdr.msg_status);
Dmsg2(010, " host status 0x%02x driver status 0x%02x\n",
io_hdr.host_status, io_hdr.driver_status );
goto bail_out;
}

Expand Down Expand Up @@ -193,8 +185,6 @@ static inline bool do_scsi_cmd_page(int fd, const char *device_name,

Emsg2(M_ERROR, 0, _("Failed to open %s: ERR=%s\n"),
device_name, be.bstrerror());
Dmsg2(010, "Failed to open %s: ERR=%s\n",
device_name, be.bstrerror());
return false;
}
opened_device = true;
Expand All @@ -219,10 +209,6 @@ static inline bool do_scsi_cmd_page(int fd, const char *device_name,
fd, be.bstrerror());
Emsg3(M_ERROR, 0, _("Sense Key: %0.2X ASC: %0.2X ASCQ: %0.2X\n"),
LOBYTE(sense.senseKey), sense.addSenseCode, sense.addSenseCodeQual);
Dmsg2(010, "Unable to perform USCSICMD ioctl on fd %d: ERR=%s\n",
fd, be.bstrerror());
Dmsg3(010, "Sense Key: %0.2X ASC: %0.2X ASCQ: %0.2X\n",
LOBYTE(sense.senseKey), sense.addSenseCode, sense.addSenseCodeQual);
goto bail_out;
}

Expand Down Expand Up @@ -302,8 +288,6 @@ static inline bool do_scsi_cmd_page(int fd, const char *device_name,

Emsg2(M_ERROR, 0, _("Failed to find CAM device for %s: ERR=%s\n"),
device_name, be.bstrerror());
Dmsg2(010, "Failed to find CAM device for %s: ERR=%s\n",
device_name, be.bstrerror());
return false;
}

Expand All @@ -313,17 +297,13 @@ static inline bool do_scsi_cmd_page(int fd, const char *device_name,

Emsg2(M_ERROR, 0, _("Failed to open CAM device for %s: ERR=%s\n"),
device_name, be.bstrerror());
Dmsg2(010, "Failed to open CAM device for %s: ERR=%s\n",
device_name, be.bstrerror());
return false;
}

ccb = cam_getccb(cam_dev);
if (!ccb) {
Emsg1(M_ERROR, 0, _("Failed to allocate new ccb for %s\n"),
device_name);
Dmsg1(0, "Failed to allocate new ccb for %s\n",
device_name);
goto bail_out;
}

Expand All @@ -348,9 +328,6 @@ static inline bool do_scsi_cmd_page(int fd, const char *device_name,
Emsg2(M_ERROR, 0, _("Failed to send ccb to device %s: %s\n"),
device_name, cam_error_string(cam_dev, ccb, errbuf, sizeof(errbuf),
CAM_ESF_ALL, CAM_EPF_ALL));
Dmsg2(010, "Failed to send ccb to device %s: %s\n",
device_name, cam_error_string(cam_dev, ccb, errbuf, sizeof(errbuf),
CAM_ESF_ALL, CAM_EPF_ALL));
cam_freeccb(ccb);
goto bail_out;
}
Expand Down Expand Up @@ -440,8 +417,6 @@ static inline bool do_scsi_cmd_page(int fd, const char *device_name,

Emsg2(M_ERROR, 0, _("Failed to open %s: ERR=%s\n"),
device_name, be.bstrerror());
Dmsg2(010, "Failed to open %s: ERR=%s\n",
device_name, be.bstrerror());
return false;
}
opened_device = true;
Expand All @@ -463,8 +438,6 @@ static inline bool do_scsi_cmd_page(int fd, const char *device_name,

Emsg2(M_ERROR, 0, _("Unable to perform SCIOCCOMMAND ioctl on fd %d: ERR=%s\n"),
fd, be.bstrerror());
Dmsg2(010, "Unable to perform SCIOCCOMMAND ioctl on fd %d: ERR=%s\n",
fd, be.bstrerror());
goto bail_out;
}

Expand All @@ -476,28 +449,20 @@ static inline bool do_scsi_cmd_page(int fd, const char *device_name,
sense = req.sense;
Emsg3(M_ERROR, 0, _("Sense Key: %0.2X ASC: %0.2X ASCQ: %0.2X\n"),
LOBYTE(sense.senseKey), sense.addSenseCode, sense.addSenseCodeQual);
Dmsg3(010, "Sense Key: %0.2X ASC: %0.2X ASCQ: %0.2X\n",
LOBYTE(sense.senseKey), sense.addSenseCode, sense.addSenseCodeQual);
break;
case SCCMD_TIMEOUT:
Emsg1(M_ERROR, 0, _("SCIOCCOMMAND ioctl on %s returned SCSI command timed out\n"),
devicename);
Dmsg1(010, "SCIOCCOMMAND ioctl on %s returned SCSI command timed out\n",
devicename);
break;
case SCCMD_BUSY:
Emsg1(M_ERROR, 0, _("SCIOCCOMMAND ioctl on %s returned device is busy\n"),
devicename);
Dmsg1(010, "SCIOCCOMMAND ioctl on %s returned device is busy\n",
devicename);
break;
case SCCMD_SENSE:
break;
default:
Emsg2(M_ERROR, 0, _("SCIOCCOMMAND ioctl on %s returned unknown status %d\n"),
device_name, req.retsts);
Dmsg2(010, "SCIOCCOMMAND ioctl on %s returned unknown status %d\n",
device_name, req.retsts);
break;
}

Expand Down
7 changes: 3 additions & 4 deletions src/plugins/stored/scsicrypto-sd.c
Expand Up @@ -386,10 +386,9 @@ static bRC do_set_scsi_encryption_key(void *value)
DEFAULT_PASSPHRASE_LENGTH / 8,
(unsigned char *)WrappedVolEncrKey,
(unsigned char *)VolEncrKey) != 0) {
Dmsg1(dbglvl,
"scsicrypto-sd: Failed to unwrap encryption key using %s\n", director->keyencrkey.value);
Emsg0(M_ERROR, 0,
_("scsicrypto-sd: Failed to unwrap encryption key, probably wrong KeyEncryptionKey in config\n"));
Emsg1(M_ERROR, 0,
"scsicrypto-sd: Failed to unwrap encryption key using %s, probably wrong KeyEncryptionKey in config\n",
director->keyencrkey.value);
return bRC_Error;
}
}
Expand Down
1 change: 0 additions & 1 deletion src/stored/backends/unix_file_device.c
Expand Up @@ -285,7 +285,6 @@ bool unix_file_device::d_truncate(DCR *dcr)

dev_errno = errno;
Mmsg2(errmsg, _("Could not reopen: %s, ERR=%s\n"), archive_name.c_str(), be.bstrerror());
Dmsg1(100, "reopen failed: %s", errmsg);
Emsg0(M_FATAL, 0, errmsg);

return false;
Expand Down
2 changes: 1 addition & 1 deletion src/win32/stored/backends/win32_file_device.c
Expand Up @@ -270,8 +270,8 @@ bool win32_file_device::d_truncate(DCR *dcr)

dev_errno = errno;
Mmsg2(errmsg, _("Could not reopen: %s, ERR=%s\n"), archive_name.c_str(), be.bstrerror());
Dmsg1(100, "reopen failed: %s", errmsg);
Emsg0(M_FATAL, 0, errmsg);

return false;
}

Expand Down

0 comments on commit c626a26

Please sign in to comment.