Too much C coding makes for dumb errors in shell. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>