* Helper function to convert clock status codes into a human readable version. */
| 13 | * Helper function to convert clock status codes into a human readable version. |
| 14 | */ |
| 15 | char * format_clock_status(clockbound_clock_status status) { |
| 16 | switch (status) { |
| 17 | case CLOCKBOUND_STA_UNKNOWN: |
| 18 | return "UNKNOWN"; |
| 19 | case CLOCKBOUND_STA_SYNCHRONIZED: |
| 20 | return "SYNCHRONIZED"; |
| 21 | case CLOCKBOUND_STA_FREE_RUNNING: |
| 22 | return "FREE_RUNNING"; |
| 23 | case CLOCKBOUND_STA_DISRUPTED: |
| 24 | return "DISRUPTED"; |
| 25 | default: |
| 26 | return "BAD CLOCK STATUS"; |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | /* |
| 31 | * Helper function to convert clockbound error kind codes into a human readable version. |