src/devices/block/bin/gpt/gpt.cc
/*
 * Set whether a partition is visible or not to the EFI firmware. If a
 * partition is set as hidden, the firmware will not attempt to boot from the
 * partition.
 */
Set whether a partition is visible or not to the EFI firmware. If a
partition is set as hidden, the firmware will not attempt to boot from the
partition.
Set whether a partition is visible or not to the EFI firmware . If a partition is set as hidden the firmware will not attempt to boot from the partition .
zx_status_t SetVisibility(char* dev, uint32_t idx_part, bool visible) {
  std::unique_ptr<GptDevice> gpt = Init(dev);
  if (!gpt) {
    return ZX_ERR_INTERNAL;
  }
  zx_status_t rc;
  rc = gpt->SetPartitionVisibility(idx_part, visible);
  if (rc != ZX_OK) {
    fprintf(stderr, "Partition visibility edit failed: %s\n", zx_status_get_string(rc));
    return rc;
  }
  return Commit(gpt.get(), dev);
}
zx_status_t SetVisibility ( char * dev , uint32_t idx_part , bool visible ) { std :: unique_ptr < GptDevice > gpt = Init ( dev ) ; if ( ! gpt ) { return ZX_ERR_INTERNAL ; } zx_status_t rc ; rc = gpt -> SetPartitionVisibility ( idx_part , visible ) ; if ( rc != ZX_OK ) { fprintf ( stderr , " \n " , zx_status_get_string ( rc ) ) ; return rc ; } return Commit ( gpt . get ( ) , dev ) ; }
Set whether a partition is visible or not to the EFI firmware.
Set whether a partition is visible or not to the EFI firmware .