Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions src/Views/PartitioningView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,52 @@ public class Installer.PartitioningView : AbstractInstallerView {
partitions = {partitions_13, partitions_14}
};

var partitions_15 = InstallerDaemon.Partition () {
device_path = "/dev/nvme0n2p1",
filesystem = InstallerDaemon.FileSystem.FAT32,
start_sector = 4096,
end_sector = 542966,
sectors_used = InstallerDaemon.PartitionUsage () {
tag = 1,
value = 35376
},
current_lvm_volume_group = ""
};

var partitions_16 = InstallerDaemon.Partition () {
device_path = "/dev/nvme0n2p2",
filesystem = InstallerDaemon.FileSystem.EXT4,
start_sector = 544768,
end_sector = 537415679,
sectors_used = InstallerDaemon.PartitionUsage () {
tag = 1,
value = 10641584
},
current_lvm_volume_group = ""
};

var partitions_17 = InstallerDaemon.Partition () {
device_path = "/dev/nvme0n2p3",
filesystem = InstallerDaemon.FileSystem.EXT4,
start_sector = 537415680,
end_sector = 1611156503,
sectors_used = InstallerDaemon.PartitionUsage () {
tag = 1,
value = 19087560
},
current_lvm_volume_group = ""
};

physical_disks += InstallerDaemon.Disk () {
name = "WDC PC SN5000S SDEPNSJ-1T00-1032",
device_path = "/dev/nvme0n2",
sectors = 2000409264,
sector_size = 512,
rotational = false,
removable = false,
partitions = {partitions_15, partitions_16, partitions_17}
};

return InstallerDaemon.DiskInfo () {
physical_disks = physical_disks,
logical_disks = logical_disks
Expand Down
2 changes: 1 addition & 1 deletion src/Widgets/DiskBar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public class Installer.DiskBar: Gtk.Box {
// Also make sure percentage is never 0, otherwise we can assertion error:
// gtk_constraint_expression_new_subject: assertion failed: (!G_APPROX_VALUE (term->coefficient, 0.0, 0.001))
// Also we assume partitions.size is less than 100
percentage = ((int) (percentage * 100) / 100.0).clamp (0.01, 1.0 - partitions.size / 100.0);
percentage = ((int) (percentage * 100) / 100.0).clamp (0.1, 1.0 - partitions.size / 100.0);

widget.set_parent (this);

Expand Down