Oil edges up to $42, eyeing Libya and U.S. inventories