Like the above function but automatically convert the result into * a long. On error (missing field) LONG_MIN is returned. */
| 6828 | /* Like the above function but automatically convert the result into |
| 6829 | * a long. On error (missing field) LONG_MIN is returned. */ |
| 6830 | static long getLongInfoField(char *info, char *field) { |
| 6831 | char *value = getInfoField(info,field); |
| 6832 | long l; |
| 6833 | |
| 6834 | if (!value) return LONG_MIN; |
| 6835 | l = strtol(value,NULL,10); |
| 6836 | zfree(value); |
| 6837 | return l; |
| 6838 | } |
| 6839 | |
| 6840 | /* Convert number of bytes into a human readable string of the form: |
| 6841 | * 100B, 2G, 100M, 4K, and so forth. */ |
no test coverage detected