Add function to set_active_partition.