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

Function change_sector_size

src/geometry.c:50–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50int change_sector_size(disk_t *disk, const int cyl_modified, const unsigned int sector_size)
51{
52 /* Using 3*512=1536 as sector size and */
53 /* 63/3=21 for number of sectors is an easy way to test */
54 /* MS Backup internal blocksize is 256 bytes */
55 switch(sector_size)
56 {
57 case 1:
58 case 256:
59 case 512:
60 case 1024:
61 case 3*512:
62 case 2048:
63 case 4096:
64 case 8192:
65 disk->sector_size = sector_size;
66 if(cyl_modified==0)
67 set_cylinders_from_size_up(disk);
68 return 0;
69 default:
70 return 1;
71 }
72}
73
74int change_geometry_cli(disk_t *disk_car, char ** current_cmd)
75{

Callers 2

change_geometry_cliFunction · 0.85
change_geometry_ncursesFunction · 0.85

Calls 1

Tested by

no test coverage detected