summaryrefslogtreecommitdiffstats
path: root/ctrl
diff options
context:
space:
mode:
Diffstat (limited to 'ctrl')
-rw-r--r--ctrl/facemgr/src/facelet.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/ctrl/facemgr/src/facelet.c b/ctrl/facemgr/src/facelet.c
index 929005f57..a6231f457 100644
--- a/ctrl/facemgr/src/facelet.c
+++ b/ctrl/facemgr/src/facelet.c
@@ -998,7 +998,8 @@ facelet_snprintf(char * s, size_t size, const facelet_t * facelet)
assert(facelet);
/* Header + key attributes (netdevice + family) */
- rc = snprintf(cur, s + size - cur, "<Facelet %s %s (%s)",
+ rc = snprintf(cur, s + size - cur, "<Facelet [%d] %s %s (%s)",
+ facelet->id,
facelet_status_str[facelet->status],
facelet_get_error(facelet) ? "/!\\" : "",
(facelet->family == AF_INET) ? "AF_INET" :
@@ -1208,6 +1209,15 @@ int facelet_snprintf_json(char * s, size_t size, const facelet_t * facelet, int
if (cur >= s + size)
return cur - s;
+ /* id */
+ rc = snprintf(cur, s + size - cur, "%*s%s: %d,\n", 4 * (indent+1), "", "\"id\"",
+ facelet->id);
+ if (rc < 0)
+ return rc;
+ cur += rc;
+ if (cur >= s + size)
+ return cur - s;
+
/* Status */
rc = snprintf(cur, s + size - cur, "%*s%s: \"%s\",\n", 4 * (indent+1), "", "\"status\"",
facelet_status_str[facelet->status]);