Mike Christie wrote:
> Hans de Goede wrote:
>> Hi,
>>
>> While testing I noticed that "iscsiadmin -m fw" does not work properly on 
>> newer 
>> (rawhide atleast) kernels, the attached patch (already applied to the Fedora 
>> devel packages) fixes this.
>>
> 
> Did you port this from another file/version?
> 

No, I noticed this in the latest open-iscsi in Fedora and wrote the fix from 
scratch.

> Not sure what I was thinking when I put it in the while loop above the 
> code you are adding but in fwparam_ibft_sysfs.c we have 
> get_iface_from_device doing this:
> 
>                  } else if (!strncmp(dent->d_name, "net", 3)) {
>                          DIR *net_dirfd;
>                          struct dirent *net_dent;
> 
>                          strncat(dev_dir, "/", FILENAMESZ);
>                          strncat(dev_dir, dent->d_name, FILENAMESZ);
> 
>                          net_dirfd = opendir(dev_dir);
>                          if (!net_dirfd) {
>                                  printf("Could not open net path %s.\n",
>                                         dev_dir);
>                                  rc = errno;
>                                  break;
>                          }
> 
>                          while ((net_dent = readdir(net_dirfd))) {
>                                  if (!strcmp(net_dent->d_name, ".") ||
>                                      !strcmp(net_dent->d_name, ".."))
>                                          continue;
> 
>                                  strncpy(context->iface, net_dent->d_name,
>                                          sizeof(context->iface));
>                                  break;
>                          }
>                          closedir(net_dirfd);
>                          rc = 0;
>                          break;
>                  } else {
> 
> 
> which I think does the same thing you are doing right

Yes it does the same thing, is this from the open-iscsi VCS ? and where do I 
find that ?

Regards,

Hans


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to