Like the above function but automatically convert the result into * a long. On error (missing field) LONG_MIN is returned. */
| 7942 | /* Like the above function but automatically convert the result into |
| 7943 | * a long. On error (missing field) LONG_MIN is returned. */ |
| 7944 | static long getLongInfoField(char *info, char *field) { |
| 7945 | char *value = getInfoField(info,field); |
| 7946 | long l; |
| 7947 | |
| 7948 | if (!value) return LONG_MIN; |
| 7949 | l = strtol(value,NULL,10); |
| 7950 | zfree(value); |
| 7951 | return l; |
| 7952 | } |
| 7953 | |
| 7954 | /* Convert number of bytes into a human readable string of the form: |
| 7955 | * 100B, 2G, 100M, 4K, and so forth. */ |
no test coverage detected