File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3118,15 +3118,17 @@ int tape_set_attribute_to_cm(struct device_data* dev,
31183118 return -1 ;
31193119 }
31203120
3121+ /* we reserve the size of the attribute + the MAM header size since the buffer will contain both */
31213122 attr_data = calloc (1 , attr_size + TC_MAM_PAGE_HEADER_SIZE );
31223123 if (!attr_data )
31233124 return - LTFS_NO_MEMORY ;
31243125
3126+ /* fill the MAM header information */
31253127 ltfs_u16tobe (attr_data , type ); /* set attribute type */
31263128 attr_data [2 ] = format ; /* set data format type */
31273129 ltfs_u16tobe (attr_data + 3 , attr_size ); /* set data size */
31283130
3129- /* data becomes the available space after TC_MAM_PAGE_HEADER_SIZE to start writing in , that is the reason why we add it here*/
3131+ /* data becomes the remaining space after TC_MAM_PAGE_HEADER_SIZE to start writing in, that is the reason why we add it here to the buffer address */
31303132 data = attr_data + TC_MAM_PAGE_HEADER_SIZE ;
31313133
31323134 /* set attribute data */
You can’t perform that action at this time.
0 commit comments