src/devices/block/bin/gpt/gpt.cc
// Looks up the type GUID for the given partition name.
//
// |scheme| is only necessary for names which have both new and legacy mappings
// such as "vbmeta_a".
//
// Returns the GUID if exactly one was found, otherwise returns nullptr and logs
// an error.
Looks up the type GUID for the given partition name.
|scheme| is only necessary for names which have both new and legacy mappings
such as "vbmeta_a".

Returns the GUID if exactly one was found, otherwise returns nullptr and logs
an error.
Looks up the type GUID for the given partition name . |scheme| is only necessary for names which have both new and legacy mappings such as " vbmeta_a " . Returns the GUID if exactly one was found otherwise returns nullptr and logs an error .
const uint8_t* GetTypeGuid(const char* name, std::optional<PartitionScheme> scheme) {
  std::list<const GuidProperties*> matches = KnownGuid::Find(name, std::nullopt, scheme);
  if (matches.empty()) {
    fprintf(stderr, "GUID lookup failed: unknown partition '%s'\n", name);
    return nullptr;
  }
  if (matches.size() > 1) {
    fprintf(stderr,
            "GUID lookup failed: partition '%s' has multiple mappings, please specify a scheme\n",
            name);
    return nullptr;
  }
  return matches.front()->type_guid().bytes();
}
const uint8_t * GetTypeGuid ( const char * name , std :: optional < PartitionScheme > scheme ) { std :: list < const GuidProperties * > matches = KnownGuid :: Find ( name , std :: nullopt , scheme ) ; if ( matches . empty ( ) ) { fprintf ( stderr , " \n " , name ) ; return nullptr ; } if ( matches . size ( ) > 1 ) { fprintf ( stderr , " \n " , name ) ; return nullptr ; } return matches . front ( ) -> type_guid ( ) . bytes ( ) ; }
Looks up the type GUID for the given partition name.
Looks up the type GUID for the given partition name .