@@ -312,16 +312,16 @@ static void show_dapustor_ext_add_smart_log_jsn(struct nvme_extended_additional_
312
312
json_object_add_value_object (dev_stats , "temp_since_born" , entry_stats );
313
313
314
314
entry_stats = json_create_object ();
315
- json_object_add_value_int (entry_stats , "normalized" , smart -> temp_since_born .norm );
315
+ json_object_add_value_int (entry_stats , "normalized" , smart -> temp_since_bootup .norm );
316
316
multi = json_create_object ();
317
317
json_object_add_value_int (multi , "min" ,
318
- le16_to_cpu (smart -> temp_since_born .temperature .min ));
318
+ le16_to_cpu (smart -> temp_since_bootup .temperature .min ));
319
319
json_object_add_value_int (multi , "max" ,
320
- le16_to_cpu (smart -> temp_since_born .temperature .max ));
320
+ le16_to_cpu (smart -> temp_since_bootup .temperature .max ));
321
321
json_object_add_value_int (multi , "cur" ,
322
- le16_to_cpu (smart -> temp_since_born .temperature .cur ));
322
+ le16_to_cpu (smart -> temp_since_bootup .temperature .cur ));
323
323
json_object_add_value_object (entry_stats , "raw" , multi );
324
- json_object_add_value_object (dev_stats , "temp_since_born " , entry_stats );
324
+ json_object_add_value_object (dev_stats , "temp_since_bootup " , entry_stats );
325
325
326
326
entry_stats = json_create_object ();
327
327
json_object_add_value_int (entry_stats , "normalized" , smart -> inflight_write_io_cmd .norm );
@@ -542,8 +542,11 @@ static int dapustor_additional_smart_log(int argc, char **argv, struct command *
542
542
else if (!cfg .raw_binary )
543
543
show_dapustor_smart_log (& smart_log , & ext_smart_log ,
544
544
cfg .namespace_id , dev -> name , has_ext );
545
- else
545
+ else {
546
546
d_raw ((unsigned char * )& smart_log , sizeof (smart_log ));
547
+ if (has_ext )
548
+ d_raw ((unsigned char * )& ext_smart_log , sizeof (ext_smart_log ));
549
+ }
547
550
}
548
551
dev_close (dev );
549
552
return err ;
0 commit comments