Ticket #1213: os_linux-lsraid_ioc-test.patch
File os_linux-lsraid_ioc-test.patch, 1.2 KB (added by , 6 years ago) |
---|
-
os_linux.cpp
78 78 #include "utility.h" 79 79 #include "cciss.h" 80 80 #include "megaraid.h" 81 #define LSRAID_IOC_FIRMWARE _IOWR('R', 1, struct megasas_ocpacket) 81 82 #include "aacraid.h" 82 83 #include "nvmecmds.h" 83 84 … … 1321 1322 } 1322 1323 1323 1324 /* Open Device IOCTL node */ 1324 if ((m_fd = ::open("/dev/megaraid_s as_ioctl_node", O_RDWR)) >= 0) {1325 if ((m_fd = ::open("/dev/megaraid_swr_ioctl_node", O_RDWR)) >= 0) { 1325 1326 pt_cmd = &linux_megaraid_device::megasas_cmd; 1326 1327 } 1327 1328 else if ((m_fd = ::open("/dev/megadev0", O_RDWR)) >= 0) { … … 1330 1331 else { 1331 1332 int err = errno; 1332 1333 linux_smart_device::close(); 1333 return set_err(err, "cannot open /dev/megaraid_s as_ioctl_node or /dev/megadev0");1334 return set_err(err, "cannot open /dev/megaraid_swr_ioctl_node or /dev/megadev0"); 1334 1335 } 1335 1336 set_fd(m_fd); 1336 1337 return true; … … 1448 1449 } 1449 1450 1450 1451 errno = 0; 1451 int rc = ioctl(m_fd, MEGASAS_IOC_FIRMWARE, &uio);1452 int rc = ioctl(m_fd, LSRAID_IOC_FIRMWARE, &uio); 1452 1453 if (pthru->cmd_status || rc != 0) { 1453 1454 if (pthru->cmd_status == 12) { 1454 1455 return set_err(EIO, "megasas_cmd: Device %d does not exist\n", m_disknum);