rmtfs.c: Exit when fail to get rprocfd

When -s option is specified rmtfs handled the start of rproc
but at init may be the /sys entries are not fully populated yet
due to module load/setup so exit with 1 and let systemd restart
the service.

Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
This commit is contained in:
Aníbal Limón 2020-01-29 22:07:51 -06:00 committed by Bjorn Andersson
parent df6c19d033
commit 29eb4a5b06

View File

@ -517,6 +517,11 @@ int main(int argc, char **argv)
/* enable sync for the mss rproc instance */
case 's':
rprocfd = rproc_init();
if (rprocfd < 0) {
fprintf(stderr, "Failed to get rprocfd\n");
return 1;
}
break;
/* -v is for verbose */