Comment on iscsi_write_sysfs_value(). A lot of fixes and comments on iscsi_generate_target(); incorrect usage of strncpy (was using sizeof() on wrong argument), use same size for all domain string variables, null first byte in some variables that could be checked with strlen() without having been used, check num of tmp[] so a string with 20 or more dots don't segfault, snprintf checks.