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

Function init_list_part

src/photorec.c:1044–1059  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1042}
1043
1044list_part_t *init_list_part(disk_t *disk, const struct ph_options *options)
1045{
1046 int insert_error=0;
1047 list_part_t *list_part;
1048 partition_t *partition_wd;
1049 list_part=disk->arch->read_part(disk, (options!=NULL?options->verbose:0), 0);
1050 /*@ assert valid_list_part(list_part); */
1051 partition_wd=new_whole_disk(disk);
1052 list_part=insert_new_partition(list_part, partition_wd, 0, &insert_error);
1053 if(insert_error>0)
1054 {
1055 free(partition_wd);
1056 }
1057 /*@ assert valid_list_part(list_part); */
1058 return list_part;
1059}
1060
1061/* file_block_remove_from_sp: remove block from list_search_space, update offset and new_current_search_space in consequence */
1062/*@

Callers 2

menu_photorecFunction · 0.85
select_diskMethod · 0.85

Calls 2

new_whole_diskFunction · 0.85
insert_new_partitionFunction · 0.85

Tested by

no test coverage detected