libiscsi.c (6e9041c6ddd6cbdc61d87bcaca8ca7bb17c28377) libiscsi.c (3b9373e95a6019cf89abe6c8b17c07828db96ad4)
1/*
2 * iSCSI lib functions
3 *
4 * Copyright (C) 2006 Red Hat, Inc. All rights reserved.
5 * Copyright (C) 2004 - 2006 Mike Christie
6 * Copyright (C) 2004 - 2005 Dmitry Yusupov
7 * Copyright (C) 2004 - 2005 Alex Aizman
8 * maintained by open-iscsi@googlegroups.com

--- 2794 unchanged lines hidden (view full) ---

2803
2804 kfree(session->password);
2805 kfree(session->password_in);
2806 kfree(session->username);
2807 kfree(session->username_in);
2808 kfree(session->targetname);
2809 kfree(session->targetalias);
2810 kfree(session->initiatorname);
1/*
2 * iSCSI lib functions
3 *
4 * Copyright (C) 2006 Red Hat, Inc. All rights reserved.
5 * Copyright (C) 2004 - 2006 Mike Christie
6 * Copyright (C) 2004 - 2005 Dmitry Yusupov
7 * Copyright (C) 2004 - 2005 Alex Aizman
8 * maintained by open-iscsi@googlegroups.com

--- 2794 unchanged lines hidden (view full) ---

2803
2804 kfree(session->password);
2805 kfree(session->password_in);
2806 kfree(session->username);
2807 kfree(session->username_in);
2808 kfree(session->targetname);
2809 kfree(session->targetalias);
2810 kfree(session->initiatorname);
2811 kfree(session->boot_root);
2812 kfree(session->boot_nic);
2813 kfree(session->boot_target);
2811 kfree(session->ifacename);
2812
2813 iscsi_destroy_session(cls_session);
2814 iscsi_host_dec_session_cnt(shost);
2815 module_put(owner);
2816}
2817EXPORT_SYMBOL_GPL(iscsi_session_teardown);
2818

--- 424 unchanged lines hidden (view full) ---

3243 sscanf(buf, "%d", &conn->persistent_port);
3244 break;
3245 case ISCSI_PARAM_PERSISTENT_ADDRESS:
3246 return iscsi_switch_str_param(&conn->persistent_address, buf);
3247 case ISCSI_PARAM_IFACE_NAME:
3248 return iscsi_switch_str_param(&session->ifacename, buf);
3249 case ISCSI_PARAM_INITIATOR_NAME:
3250 return iscsi_switch_str_param(&session->initiatorname, buf);
2814 kfree(session->ifacename);
2815
2816 iscsi_destroy_session(cls_session);
2817 iscsi_host_dec_session_cnt(shost);
2818 module_put(owner);
2819}
2820EXPORT_SYMBOL_GPL(iscsi_session_teardown);
2821

--- 424 unchanged lines hidden (view full) ---

3246 sscanf(buf, "%d", &conn->persistent_port);
3247 break;
3248 case ISCSI_PARAM_PERSISTENT_ADDRESS:
3249 return iscsi_switch_str_param(&conn->persistent_address, buf);
3250 case ISCSI_PARAM_IFACE_NAME:
3251 return iscsi_switch_str_param(&session->ifacename, buf);
3252 case ISCSI_PARAM_INITIATOR_NAME:
3253 return iscsi_switch_str_param(&session->initiatorname, buf);
3254 case ISCSI_PARAM_BOOT_ROOT:
3255 return iscsi_switch_str_param(&session->boot_root, buf);
3256 case ISCSI_PARAM_BOOT_NIC:
3257 return iscsi_switch_str_param(&session->boot_nic, buf);
3258 case ISCSI_PARAM_BOOT_TARGET:
3259 return iscsi_switch_str_param(&session->boot_target, buf);
3251 default:
3252 return -ENOSYS;
3253 }
3254
3255 return 0;
3256}
3257EXPORT_SYMBOL_GPL(iscsi_set_param);
3258

--- 62 unchanged lines hidden (view full) ---

3321 len = sprintf(buf, "%s\n", session->password_in);
3322 break;
3323 case ISCSI_PARAM_IFACE_NAME:
3324 len = sprintf(buf, "%s\n", session->ifacename);
3325 break;
3326 case ISCSI_PARAM_INITIATOR_NAME:
3327 len = sprintf(buf, "%s\n", session->initiatorname);
3328 break;
3260 default:
3261 return -ENOSYS;
3262 }
3263
3264 return 0;
3265}
3266EXPORT_SYMBOL_GPL(iscsi_set_param);
3267

--- 62 unchanged lines hidden (view full) ---

3330 len = sprintf(buf, "%s\n", session->password_in);
3331 break;
3332 case ISCSI_PARAM_IFACE_NAME:
3333 len = sprintf(buf, "%s\n", session->ifacename);
3334 break;
3335 case ISCSI_PARAM_INITIATOR_NAME:
3336 len = sprintf(buf, "%s\n", session->initiatorname);
3337 break;
3338 case ISCSI_PARAM_BOOT_ROOT:
3339 len = sprintf(buf, "%s\n", session->boot_root);
3340 break;
3341 case ISCSI_PARAM_BOOT_NIC:
3342 len = sprintf(buf, "%s\n", session->boot_nic);
3343 break;
3344 case ISCSI_PARAM_BOOT_TARGET:
3345 len = sprintf(buf, "%s\n", session->boot_target);
3346 break;
3329 default:
3330 return -ENOSYS;
3331 }
3332
3333 return len;
3334}
3335EXPORT_SYMBOL_GPL(iscsi_session_get_param);
3336

--- 136 unchanged lines hidden ---
3347 default:
3348 return -ENOSYS;
3349 }
3350
3351 return len;
3352}
3353EXPORT_SYMBOL_GPL(iscsi_session_get_param);
3354

--- 136 unchanged lines hidden ---