Commit 3c5c48011809045881d30e197577ef1dca9a3e72
Committed by
James Bottomley
1 parent
331954cfd8
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
[SCSI] libiscsi: Added support to show targetalias in sysfs
sysfs patch to view target alias: /sys/class/iscsi_session/session*/targetalias Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Showing 2 changed files with 7 additions and 0 deletions Side-by-side Diff
drivers/scsi/libiscsi.c
... | ... | @@ -2807,6 +2807,7 @@ |
2807 | 2807 | kfree(session->username); |
2808 | 2808 | kfree(session->username_in); |
2809 | 2809 | kfree(session->targetname); |
2810 | + kfree(session->targetalias); | |
2810 | 2811 | kfree(session->initiatorname); |
2811 | 2812 | kfree(session->ifacename); |
2812 | 2813 | |
... | ... | @@ -3233,6 +3234,8 @@ |
3233 | 3234 | return iscsi_switch_str_param(&session->password_in, buf); |
3234 | 3235 | case ISCSI_PARAM_TARGET_NAME: |
3235 | 3236 | return iscsi_switch_str_param(&session->targetname, buf); |
3237 | + case ISCSI_PARAM_TARGET_ALIAS: | |
3238 | + return iscsi_switch_str_param(&session->targetalias, buf); | |
3236 | 3239 | case ISCSI_PARAM_TPGT: |
3237 | 3240 | sscanf(buf, "%d", &session->tpgt); |
3238 | 3241 | break; |
... | ... | @@ -3298,6 +3301,9 @@ |
3298 | 3301 | break; |
3299 | 3302 | case ISCSI_PARAM_TARGET_NAME: |
3300 | 3303 | len = sprintf(buf, "%s\n", session->targetname); |
3304 | + break; | |
3305 | + case ISCSI_PARAM_TARGET_ALIAS: | |
3306 | + len = sprintf(buf, "%s\n", session->targetalias); | |
3301 | 3307 | break; |
3302 | 3308 | case ISCSI_PARAM_TPGT: |
3303 | 3309 | len = sprintf(buf, "%d\n", session->tpgt); |