esp: remove the buf and buflen parameters from get_cmd()