MCPcopy Create free account
hub / github.com/cgsecurity/testdisk / align_structure

Function align_structure

src/godmode.c:136–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136static void align_structure(list_part_t *list_part, const disk_t *disk, const unsigned int align)
137{
138 if(disk->arch==&arch_i386)
139 {
140 align_structure_i386(list_part, disk, align);
141 return ;
142 }
143 {
144 list_part_t *element;
145 const unsigned int location_boundary=get_location_boundary(disk);
146 for(element=list_part; element!=NULL; element=element->next)
147 {
148 const uint64_t partition_end=(element->part->part_offset+element->part->part_size-1+location_boundary-1)/location_boundary*location_boundary-1;
149 element->part->part_size=partition_end-element->part->part_offset+1;
150 }
151 }
152}
153
154void only_one_bootable( list_part_t *list_part, const list_part_t *part_boot)
155{

Callers 1

interface_recoveryFunction · 0.85

Calls 2

align_structure_i386Function · 0.85
get_location_boundaryFunction · 0.85

Tested by

no test coverage detected