struct proto_handler proto;
};
-#define DUMP_PREFIX "./"
#define DUMP_SUFFIX " dump"
static void proto_shell_add_handler(const char *script, struct json_object *obj)
FILE *f;
int buflen, len;
- cmd = alloca(strlen(name) + 1 + sizeof(DUMP_PREFIX) + sizeof(DUMP_SUFFIX));
- sprintf(cmd, DUMP_PREFIX "%s" DUMP_SUFFIX, name);
+ cmd = alloca(strlen(name) + 1 + sizeof(DUMP_SUFFIX));
+ sprintf(cmd, "%s" DUMP_SUFFIX, name);
f = popen(cmd, "r");
if (!f)
if (proto_fd < 0)
goto close_cur;
- glob("*.sh", 0, NULL, &g);
+ glob("./*.sh", 0, NULL, &g);
for (i = 0; i < g.gl_pathc; i++)
proto_shell_add_script(g.gl_pathv[i]);