[U-Boot] [PATCH] env: factor out the env_get_char_spec() function