diff options
Diffstat (limited to 'cmd/srv9p/main.c')
-rw-r--r-- | cmd/srv9p/main.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/cmd/srv9p/main.c b/cmd/srv9p/main.c index c5a3367..076d756 100644 --- a/cmd/srv9p/main.c +++ b/cmd/srv9p/main.c @@ -99,17 +99,23 @@ static COROUTINE read_cr(void *_srv) { cr_end(); } +const char *hexdig = "0123456789abcdef"; + int main() { struct lib9p_srv srv = { .rootdir = get_root, }; - for (int i = 0; i < CONFIG_SRV9P_NUM_CONNS; i++) - if (!coroutine_add(read_cr, &srv)) + for (int i = 0; i < CONFIG_SRV9P_NUM_CONNS; i++) { + char name[] = {'r', 'e', 'a', 'd', '-', hexdig[i], '\0'}; + if (!coroutine_add(name, read_cr, &srv)) error(1, 0, "coroutine_add(read_cr, &srv)"); - for (int i = 0; i < 2*CONFIG_SRV9P_NUM_CONNS; i++) - if (!coroutine_add(lib9p_srv_write_cr, &srv)) + } + for (int i = 0; i < 2*CONFIG_SRV9P_NUM_CONNS; i++) { + char name[] = {'w', 'r', 'i', 't', 'e', '-', hexdig[i], '\0'}; + if (!coroutine_add(name, lib9p_srv_write_cr, &srv)) error(1, 0, "coroutine_add(lib9p_srv_write_cr, &srv)"); + } coroutine_main(); return 1; |