Senate confirms Petraeus as US military commander in Iraq