From: <vl...@us...> - 2008-06-30 09:58:23
|
Revision: 425 http://scst.svn.sourceforge.net/scst/?rev=425&view=rev Author: vlnb Date: 2008-06-30 02:50:27 -0700 (Mon, 30 Jun 2008) Log Message: ----------- Fixes few harmless issues: 1. The #define on line 228 of iscsi-scst/usr/isns.c triggers a compiler warning on ppc. 2. make iscsi && sudo make iscsi_install triggers the following error message (2.6.22.17 kernel, ppc), but doesn't break installation: ... install: cannot stat `usr/iscsi-scst-adm': No such file or directory ... 3. Unneeded "unlikely" removed Issues 1 and 2 reported by Bart Van Assche <bar...@gm...> Modified Paths: -------------- trunk/iscsi-scst/Makefile trunk/iscsi-scst/usr/isns.c trunk/scst/src/scst_lib.c Modified: trunk/iscsi-scst/Makefile =================================================================== --- trunk/iscsi-scst/Makefile 2008-06-30 09:38:39 UTC (rev 424) +++ trunk/iscsi-scst/Makefile 2008-06-30 09:50:27 UTC (rev 425) @@ -35,7 +35,7 @@ install: all @install -vD usr/iscsi-scstd $(DISTDIR)/usr/local/sbin/iscsi-scstd - -@install -vD usr/iscsi-scst-adm $(DISTDIR)/usr/local/sbin/iscsi-scst-adm +# -@install -vD usr/iscsi-scst-adm $(DISTDIR)/usr/local/sbin/iscsi-scst-adm if [ -f /etc/debian_version ]; then \ install -vD -m 755 etc/initd/initd.debian $(DISTDIR)/etc/init.d/iscsi-scst; \ elif [ -f /etc/redhat-release ]; then \ Modified: trunk/iscsi-scst/usr/isns.c =================================================================== --- trunk/iscsi-scst/usr/isns.c 2008-06-30 09:38:39 UTC (rev 424) +++ trunk/iscsi-scst/usr/isns.c 2008-06-30 09:50:27 UTC (rev 425) @@ -216,7 +216,7 @@ } #if __BYTE_ORDER == __LITTLE_ENDIAN -#define set_scn_flag(x) \ +#define correct_scn_flag_endiannes(x) \ { \ x = (x & 0x55555555) << 1 | (x & 0xaaaaaaaa) >> 1; \ x = (x & 0x33333333) << 2 | (x & 0xcccccccc) >> 2; \ @@ -225,7 +225,7 @@ x = (x & 0x0000ffff) << 16 | (x & 0xffff0000) >> 16; \ } #else -#define set_scn_flag(x) (x) +#define correct_scn_flag_endiannes(x) { } #endif static int isns_scn_register(void) @@ -258,7 +258,7 @@ scn_flags = ISNS_SCN_FLAG_INITIATOR | ISNS_SCN_FLAG_OBJECT_REMOVE | ISNS_SCN_FLAG_OBJECT_ADDED | ISNS_SCN_FLAG_OBJECT_UPDATED; - set_scn_flag(scn_flags); + correct_scn_flag_endiannes(scn_flags); scn_flags = htonl(scn_flags); length += isns_tlv_set(&tlv, ISNS_ATTR_ISCSI_SCN_BITMAP, Modified: trunk/scst/src/scst_lib.c =================================================================== --- trunk/scst/src/scst_lib.c 2008-06-30 09:38:39 UTC (rev 424) +++ trunk/scst/src/scst_lib.c 2008-06-30 09:50:27 UTC (rev 425) @@ -1902,7 +1902,7 @@ cmd->op_flags = ptr->flags; res = (*ptr->get_trans_len)(cmd, ptr->off); - if (unlikely(cmd->bufflen == 0)) { + if (cmd->bufflen == 0) { /* * According to SPC bufflen 0 for data transfer commands isn't * an error, so we need to fix the transfer direction. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |