From ea66767c2515ba91c40152504536fa653b6284f8 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Tue, 13 Apr 2010 18:30:53 +0000 Subject: [PATCH] Minor versionning fixes and comments git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1610 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/Makefile | 1 + iscsi-scst/usr/event.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/iscsi-scst/Makefile b/iscsi-scst/Makefile index f756709ea..b9c363ffe 100644 --- a/iscsi-scst/Makefile +++ b/iscsi-scst/Makefile @@ -42,6 +42,7 @@ include/iscsi_scst_itf_ver.h: include/iscsi_scst.h echo "/* Autogenerated, don't edit */" >include/iscsi_scst_itf_ver.h echo "" >>include/iscsi_scst_itf_ver.h echo -n "#define ISCSI_SCST_INTERFACE_VERSION " >>include/iscsi_scst_itf_ver.h + echo -n "ISCSI_VERSION_STRING \"_\" " >>include/iscsi_scst_itf_ver.h echo "\"`sha1sum include/iscsi_scst.h|awk '{printf $$1}'`\"" >>include/iscsi_scst_itf_ver.h install: all diff --git a/iscsi-scst/usr/event.c b/iscsi-scst/usr/event.c index 449030b3b..bcc9c08bb 100644 --- a/iscsi-scst/usr/event.c +++ b/iscsi-scst/usr/event.c @@ -730,6 +730,11 @@ void handle_iscsi_events(int fd) #endif int rc; + /* + * The way of handling errors by exit() is one of the worst possible, + * but IET developers thought it's OK. ToDo: fix somewhen. + */ + retry: if ((rc = nl_read(fd, &event, sizeof(event))) < 0) { if (errno == EAGAIN) @@ -829,7 +834,8 @@ retry: break; default: - log_warning("Unknown event %u", event.code); + log_error("Unknown event %u", event.code); + /* We might be out of sync in size */ exit(-1); break; }