Is an edge of `type` with properties `p` a reference to an image -- * USAGE {ref:image}, or DEPENDS_ON {via:from|copy-from}? */
| 1890 | /* Is an edge of `type` with properties `p` a reference to an image -- |
| 1891 | * USAGE {ref:image}, or DEPENDS_ON {via:from|copy-from}? */ |
| 1892 | static bool dk_hub_ref(const char *type, const char *p) { |
| 1893 | char v[CBM_SZ_32]; |
| 1894 | if (strcmp(type, "USAGE") == 0) { |
| 1895 | return dk_prop(p, "ref", v, sizeof(v)) && strcmp(v, "image") == 0; |
| 1896 | } |
| 1897 | return dk_prop(p, "via", v, sizeof(v)) && |
| 1898 | (strcmp(v, "from") == 0 || strcmp(v, "copy-from") == 0); |
| 1899 | } |
| 1900 | |
| 1901 | /* The edges of Image `img`: build edges out (DEPENDS_ON {via:build}) and |
| 1902 | * references in, each with the tag of its `image` reference. */ |
no test coverage detected