Fix typo and adapt sys.c (shutdown) from Samsung