Update of /cvsroot/linuxisns/isnsNT/isnsclient/src
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv24842/isnsclient/src
Modified Files:
iscsi.c isns.c
Log Message:
add control node
Index: isns.c
===================================================================
RCS file: /cvsroot/linuxisns/isnsNT/isnsclient/src/isns.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** isns.c 18 Dec 2006 23:00:04 -0000 1.5
--- isns.c 2 Jan 2007 20:15:24 -0000 1.6
***************
*** 133,140 ****
src_type = 0;
! if (0 !=
! GetInput (cmdLine,
! "SRC type",
! "*0:NONE 1:iSCSI Node 3:iFCP Node", sizeof (cmdLine)))
{
src_type = atoi (cmdLine);
--- 133,138 ----
src_type = 0;
! if (0 != GetInput (cmdLine,"SRC type",
! "*0:Control Node 1:iSCSI Node 3:iFCP Node", sizeof (cmdLine)))
{
src_type = atoi (cmdLine);
***************
*** 144,153 ****
{
case 0:
! ISNSAppendAttr (p_cmd, 0, 0, NULL, 0);
break;
case 1:
! if (0 ==
! GetInput (cmdLine, "SRC: iSCSI Node Id", "(none)",
! sizeof (cmdLine)))
{
printf ("***ERROR: You must enter an iSCSI Node Id.\n");
--- 142,156 ----
{
case 0:
! if (0 == GetInput (cmdLine, "SRC: iSCSI Node Id", "(none)",sizeof (cmdLine)))
! {
! ISNSAppendAttr (p_cmd, ISNS_ISCSI_NODE_ID, PAD4 (strlen (CONTROL_NODE)),CONTROL_NODE, 0);
! }
! else
! ISNSAppendAttr (p_cmd, ISNS_ISCSI_NODE_ID, PAD4 (strlen (cmdLine)),cmdLine, 0);
!
break;
+
case 1:
! if (0 == GetInput (cmdLine, "SRC: iSCSI Node Id", "(none)", sizeof (cmdLine)))
{
printf ("***ERROR: You must enter an iSCSI Node Id.\n");
***************
*** 155,166 ****
}
! ISNSAppendAttr (p_cmd, ISNS_ISCSI_NODE_ID, PAD4 (strlen (cmdLine)),
! cmdLine, 0);
break;
case 2:
! if (0 ==
! GetHexInput (cmdLine, "SRC: iFCP Node WWPN", NULL,
! sizeof (cmdLine)))
{
printf ("***ERROR: You must enter an iFCP Node WWPN.\n");
--- 158,166 ----
}
! ISNSAppendAttr (p_cmd, ISNS_ISCSI_NODE_ID, PAD4 (strlen (cmdLine)),cmdLine, 0);
break;
case 2:
! if (0 == GetHexInput (cmdLine, "SRC: iFCP Node WWPN", NULL, sizeof (cmdLine)))
{
printf ("***ERROR: You must enter an iFCP Node WWPN.\n");
Index: iscsi.c
===================================================================
RCS file: /cvsroot/linuxisns/isnsNT/isnsclient/src/iscsi.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** iscsi.c 20 Dec 2006 17:04:24 -0000 1.7
--- iscsi.c 2 Jan 2007 20:15:24 -0000 1.8
***************
*** 468,473 ****
ISNSCreateHdr (ISNS_REG_DD_REQ, &cmd, sizeof (cmd), 0);
! /* Zero out the src field. */
! ISNSAppendAttr (&cmd, 0, 0, NULL, 0);
/* Get DD ID */
--- 468,474 ----
ISNSCreateHdr (ISNS_REG_DD_REQ, &cmd, sizeof (cmd), 0);
! /* Insert SRC */
! if (-1 == GetSrc (&cmd, 0))
! return;
/* Get DD ID */
|