Advertisement
uaa

OpenBSD/uthum.c diff

uaa
Jul 30th, 2013
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. Index: uthum.c
  2. ===================================================================
  3. RCS file: /cvs/src/sys/dev/usb/uthum.c,v
  4. retrieving revision 1.23
  5. diff -u -p -r1.23 uthum.c
  6. --- uthum.c 8 May 2013 08:26:25 -0000 1.23
  7. +++ uthum.c 31 Jul 2013 04:12:43 -0000
  8. @@ -820,15 +820,19 @@ uthum_print_sensorinfo(struct uthum_soft
  9. printf("type %s (temperature)",
  10. uthum_sensor_type_s[s->dev_type]);
  11. if (s->cal_offset)
  12. - printf(", calibration offset %d.%d degC",
  13. - s->cal_offset / 100, abs(s->cal_offset % 100));
  14. + printf(", calibration offset %c%d.%d degC",
  15. + (s->cal_offset < 0) ? '-' : '+',
  16. + abs(s->cal_offset / 100),
  17. + abs(s->cal_offset % 100));
  18. break;
  19. case SENSOR_HUMIDITY:
  20. printf("type %s (humidity)",
  21. uthum_sensor_type_s[s->dev_type]);
  22. if (s->cal_offset)
  23. - printf("calibration offset %d.%d %%RH",
  24. - s->cal_offset / 100, abs(s->cal_offset % 100));
  25. + printf("calibration offset %c%d.%d %%RH",
  26. + (s->cal_offset < 0) ? '-' : '+',
  27. + abs(s->cal_offset / 100),
  28. + abs(s->cal_offset % 100));
  29. break;
  30. default:
  31. printf("unknown");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement