diff options
-rw-r--r-- | drivers/target/target_core_transport.c | 9 | ||||
-rw-r--r-- | include/target/target_core_base.h | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index bd587b70661a..96b64d57ebbb 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c | |||
@@ -907,15 +907,18 @@ int transport_dump_vpd_ident( | |||
907 | 907 | ||
908 | switch (vpd->device_identifier_code_set) { | 908 | switch (vpd->device_identifier_code_set) { |
909 | case 0x01: /* Binary */ | 909 | case 0x01: /* Binary */ |
910 | sprintf(buf, "T10 VPD Binary Device Identifier: %s\n", | 910 | snprintf(buf, sizeof(buf), |
911 | "T10 VPD Binary Device Identifier: %s\n", | ||
911 | &vpd->device_identifier[0]); | 912 | &vpd->device_identifier[0]); |
912 | break; | 913 | break; |
913 | case 0x02: /* ASCII */ | 914 | case 0x02: /* ASCII */ |
914 | sprintf(buf, "T10 VPD ASCII Device Identifier: %s\n", | 915 | snprintf(buf, sizeof(buf), |
916 | "T10 VPD ASCII Device Identifier: %s\n", | ||
915 | &vpd->device_identifier[0]); | 917 | &vpd->device_identifier[0]); |
916 | break; | 918 | break; |
917 | case 0x03: /* UTF-8 */ | 919 | case 0x03: /* UTF-8 */ |
918 | sprintf(buf, "T10 VPD UTF-8 Device Identifier: %s\n", | 920 | snprintf(buf, sizeof(buf), |
921 | "T10 VPD UTF-8 Device Identifier: %s\n", | ||
919 | &vpd->device_identifier[0]); | 922 | &vpd->device_identifier[0]); |
920 | break; | 923 | break; |
921 | default: | 924 | default: |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 4fa0f1038360..199b0ad1a55e 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -44,7 +44,7 @@ | |||
44 | /* Used by core_alua_store_tg_pt_gp_info() and target_core_alua_tg_pt_gp_show_attr_members() */ | 44 | /* Used by core_alua_store_tg_pt_gp_info() and target_core_alua_tg_pt_gp_show_attr_members() */ |
45 | #define TG_PT_GROUP_NAME_BUF 256 | 45 | #define TG_PT_GROUP_NAME_BUF 256 |
46 | /* Used to parse VPD into struct t10_vpd */ | 46 | /* Used to parse VPD into struct t10_vpd */ |
47 | #define VPD_TMP_BUF_SIZE 128 | 47 | #define VPD_TMP_BUF_SIZE 254 |
48 | /* Used by transport_generic_cmd_sequencer() */ | 48 | /* Used by transport_generic_cmd_sequencer() */ |
49 | #define READ_BLOCK_LEN 6 | 49 | #define READ_BLOCK_LEN 6 |
50 | #define READ_CAP_LEN 8 | 50 | #define READ_CAP_LEN 8 |