separate partition format handling from generic code