On 23/08/2017 06:49, Fam Zheng wrote: >> + >> + /* A simple feature negotation protocol, even though there is >> + * no optional feature right now. >> + */ >> + if (pr_manager_helper_read(pr_mgr, &flags, sizeof(flags), errp) < 0) { > Not returning the return value of pr_manager_helper_read()?. > >> + return -EINVAL; >> + } >> + >> + flags = 0; >> + if (pr_manager_helper_write(pr_mgr, -1, &flags, sizeof(flags), errp) < >> 0) { >> + return -EINVAL; > Same here. >
Sorry, I forgot to answer these. The QIOChannel functions (and thus pr_manager_helper_read/write) only answer -1 or QIO_CHANNEL_ERROR_BLOCK. I'll change read/write to return -EINVAL instead. Paolo