summaryrefslogtreecommitdiff
path: root/src/plugins/dummy
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/dummy')
-rw-r--r--src/plugins/dummy/Makefile.in2
-rw-r--r--src/plugins/dummy/dummy.c21
2 files changed, 11 insertions, 12 deletions
diff --git a/src/plugins/dummy/Makefile.in b/src/plugins/dummy/Makefile.in
index 1cd85a5..86475ba 100644
--- a/src/plugins/dummy/Makefile.in
+++ b/src/plugins/dummy/Makefile.in
@@ -211,6 +211,8 @@ INTF_OPEN = @INTF_OPEN@
INTF_OPEN_LIB = @INTF_OPEN_LIB@
INTF_SERIAL = @INTF_SERIAL@
INTF_SERIAL_LIB = @INTF_SERIAL_LIB@
+INTF_USB = @INTF_USB@
+INTF_USB_LIB = @INTF_USB_LIB@
IPMITOOL_INTF_LIB = @IPMITOOL_INTF_LIB@
LD = @LD@
LDFLAGS = @LDFLAGS@
diff --git a/src/plugins/dummy/dummy.c b/src/plugins/dummy/dummy.c
index eb2d086..8bfc4cf 100644
--- a/src/plugins/dummy/dummy.c
+++ b/src/plugins/dummy/dummy.c
@@ -117,7 +117,7 @@ data_write(int fd, void *data_ptr, int data_len)
/* TODO - add poll() */
data_written = write(fd, data_ptr, data_len);
errno_save = errno;
- if (data_read > 0) {
+ if (data_written > 0) {
data_total+= data_written;
}
if (errno_save != 0) {
@@ -149,9 +149,6 @@ static void
ipmi_dummyipmi_close(struct ipmi_intf *intf)
{
struct dummy_rq req;
- int data_total = 0;
- int data_written = 0;
- int try = 0;
if (intf->fd < 0) {
return;
}
@@ -245,7 +242,7 @@ ipmi_dummyipmi_send_cmd(struct ipmi_intf *intf, struct ipmi_rq *req)
return NULL;
}
}
-
+
memset(&rsp_dummy, 0, sizeof(rsp_dummy));
if (data_read(intf->fd, &rsp_dummy, sizeof(struct dummy_rs)) != 0) {
return NULL;
@@ -276,11 +273,11 @@ ipmi_dummyipmi_send_cmd(struct ipmi_intf *intf, struct ipmi_rq *req)
}
struct ipmi_intf ipmi_dummy_intf = {
- name: "dummy",
- desc: "Linux DummyIPMI Interface",
- open: ipmi_dummyipmi_open,
- close: ipmi_dummyipmi_close,
- sendrecv: ipmi_dummyipmi_send_cmd,
- my_addr: IPMI_BMC_SLAVE_ADDR,
- target_addr: IPMI_BMC_SLAVE_ADDR,
+ .name = "dummy",
+ .desc = "Linux DummyIPMI Interface",
+ .open = ipmi_dummyipmi_open,
+ .close = ipmi_dummyipmi_close,
+ .sendrecv = ipmi_dummyipmi_send_cmd,
+ .my_addr = IPMI_BMC_SLAVE_ADDR,
+ .target_addr = IPMI_BMC_SLAVE_ADDR,
};