On Thu, 2012-11-01 at 19:42 -0500, Mike Christie wrote:
> On 10/24/2012 06:30 PM, Eddie Wai wrote:
> > +           /* boot_nic is only for IBFT subsys */
> > +           memset(&context->boot_nic, 0, sizeof(context->boot_nic));
> > +           snprintf(context->boot_nic, sizeof(context->boot_nic), "%s",
> > +                    id);
> >     } else
> >             strlcpy(context->scsi_host_name, subsys,
> >                     sizeof(context->scsi_host_name));
> > @@ -224,6 +228,11 @@ static void fill_initiator_context(char *subsys, 
> > struct boot_context *context)
> >                   sizeof(context->initiatorname));
> >     sysfs_get_str("initiator", subsys, "isid", context->isid,
> >                   sizeof(context->isid));
> > +
> > +   if (!strcmp(IBFT_SUBSYS, subsys))
> > +           /* boot_initiator is only for IBFT subsys */
> > +           strlcpy(context->boot_initiator, "initiator",
> > +                   sizeof(context->boot_initiator));
> >  }
> >  static int fill_tgt_context(char *subsys, char *id,
> >                         struct boot_context *context)
> > @@ -240,6 +249,12 @@ static int fill_tgt_context(char *subsys, char *id,
> >     if (rc)
> >             return rc;
> >  
> > +   if (!strcmp(IBFT_SUBSYS, subsys)) {
> > +           /* boot_target is only for IBFT subsys */
> > +           memset(&context->boot_target, 0, sizeof(context->boot_target));
> > +           snprintf(context->boot_target, sizeof(context->boot_target),
> > +                    "%s", id);
> > +   }
> 
> The above 3 chunks are not correct. Non-ibft drivers export the above
> info too. It is in a different root dir though. Instead of the ibft dir
> 
> #define IBFT_SYSFS_ROOT         "/sys/firmware/ibft/"
> 
> it is in a per host dir
> 
> #define ISCSI_LLD_SUBSYS_PREFIX "iscsi_boot"
> 
The patch wasn't originally intended to export these boot_xxx info for
non-ibft drivers.  But we can certainly do so.
> 


-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.

Reply via email to