@@ -2176,33 +2176,33 @@ static int validate_occ_list_update_ctx(
21762176 struct nvme_mi_aem_ctx * ctx ,
21772177 bool check_generation_num )
21782178{
2179- printf ( "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
2179+ fprintf ( stderr , "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
21802180 //Make sure header fields have valid data
21812181 if (len < sizeof (* occ_header )) {
21822182 errno = EPROTO ;
2183- printf ( "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
2183+ fprintf ( stderr , "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
21842184 goto err_cleanup ;
21852185 } else if (occ_header -> aelver != 0 ||
21862186 occ_header -> aeolhl != sizeof (* occ_header )) {
21872187 //Make sure header is the right version and length
21882188 errno = EPROTO ;
2189- printf ( "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
2189+ fprintf ( stderr , "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
21902190 goto err_cleanup ;
21912191 } else if (nvme_mi_aem_aeolli_get_aeoltl (occ_header -> aeolli ) > len ) {
21922192 //Full length is bigger than the data that was received
21932193 errno = EPROTO ;
2194- printf ( "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
2194+ fprintf ( stderr , "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
21952195 goto err_cleanup ;
21962196 } else if (check_generation_num &&
21972197 ctx -> last_generation_num ==
21982198 (int ) nvme_mi_aem_aemti_get_aemgn (occ_header -> aemti )) {
21992199 //This is a duplicate and shouldn't be parsed.
22002200 //Let's just act like there's no updates
2201- printf ( "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
2201+ fprintf ( stderr , "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
22022202
22032203 occ_header -> numaeo = 0 ;
22042204 } else if (check_generation_num ) {
2205- printf ( "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
2205+ fprintf ( stderr , "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
22062206 ctx -> last_generation_num =
22072207 nvme_mi_aem_aemti_get_aemgn (occ_header -> aemti );
22082208 }
@@ -2222,11 +2222,11 @@ static int validate_occ_list_update_ctx(
22222222 for (int i = 0 ; i < occ_header -> numaeo ; i ++ ) {
22232223 //Validate this item
22242224 if (current -> aelhlen != sizeof (* current )) {
2225- printf ( "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
2225+ fprintf ( stderr , "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
22262226 errno = EPROTO ;
22272227 goto err_cleanup ;
22282228 } else if (!ctx -> callbacks .enabled_map .enabled [current -> aeoui .aeoi ]) {
2229- printf ( "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
2229+ fprintf ( stderr , "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
22302230 //This is unexpected as this AE shouldn't be enabled
22312231 errno = EPROTO ;
22322232 goto err_cleanup ;
@@ -2237,8 +2237,8 @@ static int validate_occ_list_update_ctx(
22372237
22382238 bytes_so_far += offset ;
22392239 if (bytes_so_far > nvme_mi_aem_aeolli_get_aeoltl (occ_header -> aeolli )) {
2240- printf ( "Get() = %d\n" , nvme_mi_aem_aeolli_get_aeoltl (occ_header -> aeolli ));
2241- printf ( "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
2240+ fprintf ( stderr , "Get() = %d and bsf=%zd \n" , nvme_mi_aem_aeolli_get_aeoltl (occ_header -> aeolli ), bytes_so_far );
2241+ fprintf ( stderr , "File: %s, Line: %d\n" , __FILE__ , __LINE__ );
22422242 errno = EPROTO ;
22432243 goto err_cleanup ;
22442244 }
0 commit comments