- snprintf(out, size, "%s-%s-%d-verify.state", prefix, name, num);
+ char ename[PATH_MAX];
+ char *ptr;
+
+ /*
+ * Escape '/', just turn them into '.'
+ */
+ ptr = ename;
+ do {
+ *ptr = *name;
+ if (*ptr == '\0')
+ break;
+ else if (*ptr == '/')
+ *ptr = '.';
+ ptr++;
+ name++;
+ } while (1);
+
+ snprintf(out, size, "%s-%s-%d-verify.state", prefix, ename, num);