cta-rmcd issues if `/dev/sg0` is missing
It looks like if /dev/sg0
device is missing one cannot launch cta-rmcd
.
Indeed in https://gitlab.cern.ch/cta/CTA/-/blob/main/mediachanger/castorrmc/rmc/rmc_send_scsi_cmd.c#L144
Even if the specified device path is fine, this portion of the code:
/* get the major device ID of the sg devices ... */
if (stat ("/dev/sg0", &sbufa) < 0) {
serrno = errno;
snprintf (rmc_err_msgbuf, sizeof(rmc_err_msgbuf), "/dev/sg0 : stat error : %s\n", strerror(errno));
rmc_err_msgbuf[sizeof(rmc_err_msgbuf) - 1] = '\0';
*msgaddr = rmc_err_msgbuf;
return (-1);
}
exits from rmc_send_scsi_cmd
if /dev/sg0
is missing.