fix compile error if OFFLOAD_BOOT_SUPPORT defined
If OFFLOAD_BOOT_SUPPORT is defined, usr/iface.c gets a compile error, fixed by this patch. Signed-off-by: Lee Duncan leeman.dun...@gmail.com -- diff --git a/usr/iface.c b/usr/iface.c index 3a9582e..b7e9760 100644 --- a/usr/iface.c +++ b/usr/iface.c @@ -896,6 +896,9 @@ int iface_setup_from_boot_context(struct iface_rec *iface, struct iscsi_transport *t = NULL; char transport_name[ISCSI_TRANSPORT_NAME_MAXLEN]; uint32_t hostno; +#ifdef OFFLOAD_BOOT_SUPPORTED + int rc; +#endif if (strlen(context-initiatorname)) strlcpy(iface-iname, context-initiatorname, -- 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.
fix compile error if OFFLOAD_BOOT_SUPPORT defined
If OFFLOAD_BOOT_SUPPORT is defined, usr/iface.c gets a compile error, fixed by this patch. Signed-off-by: Lee Duncan leeman.dun...@gmail.com -- diff --git a/usr/iface.c b/usr/iface.c index 3a9582e..b7e9760 100644 --- a/usr/iface.c +++ b/usr/iface.c @@ -896,6 +896,9 @@ int iface_setup_from_boot_context(struct iface_rec *iface, struct iscsi_transport *t = NULL; char transport_name[ISCSI_TRANSPORT_NAME_MAXLEN]; uint32_t hostno; +#ifdef OFFLOAD_BOOT_SUPPORTED + int rc; +#endif if (strlen(context-initiatorname)) strlcpy(iface-iname, context-initiatorname, -- 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.
Re: fix compile error if OFFLOAD_BOOT_SUPPORT defined
On 06/20/2012 12:03 PM, Lee Duncan wrote: If OFFLOAD_BOOT_SUPPORT is defined, usr/iface.c gets a compile error, fixed by this patch. How about the attached? It also fixes the warning we have been getting when it is not defined. -- 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. diff --git a/usr/iface.c b/usr/iface.c index 3a9582e..79d1101 100644 --- a/usr/iface.c +++ b/usr/iface.c @@ -894,7 +894,6 @@ int iface_setup_from_boot_context(struct iface_rec *iface, struct boot_context *context) { struct iscsi_transport *t = NULL; - char transport_name[ISCSI_TRANSPORT_NAME_MAXLEN]; uint32_t hostno; if (strlen(context-initiatorname)) @@ -910,6 +909,8 @@ int iface_setup_from_boot_context(struct iface_rec *iface, } else if (strlen(context-iface)) { /* this ifdef is only temp until distros and firmwares are updated */ #ifdef OFFLOAD_BOOT_SUPPORTED + char transport_name[ISCSI_TRANSPORT_NAME_MAXLEN]; + int rc; memset(transport_name, 0, ISCSI_TRANSPORT_NAME_MAXLEN); /* make sure offload driver is loaded */
Re: fix compile error if OFFLOAD_BOOT_SUPPORT defined
Heh. Your patch looks better to me. I actually prefer declaring variables in the block they are used, but Linux seems to shy away from that. On Jun 20, 2012, at 12:24 PM, Mike Christie wrote: On 06/20/2012 12:03 PM, Lee Duncan wrote: If OFFLOAD_BOOT_SUPPORT is defined, usr/iface.c gets a compile error, fixed by this patch. How about the attached? It also fixes the warning we have been getting when it is not defined. fix-iface-offload-boot-err-and-warn.patch -- 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.