@@ -2179,23 +2179,29 @@ static int validate_occ_list_update_ctx(
21792179 //Make sure header fields have valid data
21802180 if (len < sizeof (* occ_header )) {
21812181 errno = EPROTO ;
2182+ printf ("File: %s, Line: %d\n" , __FILE__ , __LINE__ );
21822183 goto err_cleanup ;
21832184 } else if (occ_header -> aelver != 0 ||
21842185 occ_header -> aeolhl != sizeof (* occ_header )) {
21852186 //Make sure header is the right version and length
21862187 errno = EPROTO ;
2188+ printf ("File: %s, Line: %d\n" , __FILE__ , __LINE__ );
21872189 goto err_cleanup ;
21882190 } else if (nvme_mi_aem_aeolli_get_aeoltl (occ_header -> aeolli ) > len ) {
21892191 //Full length is bigger than the data that was received
21902192 errno = EPROTO ;
2193+ printf ("File: %s, Line: %d\n" , __FILE__ , __LINE__ );
21912194 goto err_cleanup ;
21922195 } else if (check_generation_num &&
21932196 ctx -> last_generation_num ==
21942197 (int ) nvme_mi_aem_aemti_get_aemgn (occ_header -> aemti )) {
21952198 //This is a duplicate and shouldn't be parsed.
21962199 //Let's just act like there's no updates
2200+ printf ("File: %s, Line: %d\n" , __FILE__ , __LINE__ );
2201+
21972202 occ_header -> numaeo = 0 ;
21982203 } else if (check_generation_num ) {
2204+ printf ("File: %s, Line: %d\n" , __FILE__ , __LINE__ );
21992205 ctx -> last_generation_num =
22002206 nvme_mi_aem_aemti_get_aemgn (occ_header -> aemti );
22012207 }
@@ -2215,9 +2221,11 @@ static int validate_occ_list_update_ctx(
22152221 for (int i = 0 ; i < occ_header -> numaeo ; i ++ ) {
22162222 //Validate this item
22172223 if (current -> aelhlen != sizeof (* current )) {
2224+ printf ("File: %s, Line: %d\n" , __FILE__ , __LINE__ );
22182225 errno = EPROTO ;
22192226 goto err_cleanup ;
22202227 } else if (!ctx -> callbacks .enabled_map .enabled [current -> aeoui .aeoi ]) {
2228+ printf ("File: %s, Line: %d\n" , __FILE__ , __LINE__ );
22212229 //This is unexpected as this AE shouldn't be enabled
22222230 errno = EPROTO ;
22232231 goto err_cleanup ;
@@ -2228,6 +2236,8 @@ static int validate_occ_list_update_ctx(
22282236
22292237 bytes_so_far += offset ;
22302238 if (bytes_so_far > nvme_mi_aem_aeolli_get_aeoltl (occ_header -> aeolli )) {
2239+ printf ("Get() = %d\n" , nvme_mi_aem_aeolli_get_aeoltl (occ_header -> aeolli ));
2240+ printf ("File: %s, Line: %d\n" , __FILE__ , __LINE__ );
22312241 errno = EPROTO ;
22322242 goto err_cleanup ;
22332243 }
0 commit comments