session_save(): returns if STATUS_QUIT
This commit is contained in:
parent
9e18c597cb
commit
38084f56e0
1 changed files with 3 additions and 1 deletions
|
@ -162,6 +162,8 @@ int session_load(char **cmd_device, char **current_cmd, alloc_data_t *list_free_
|
||||||
int session_save(alloc_data_t *list_free_space, struct ph_param *params, const struct ph_options *options)
|
int session_save(alloc_data_t *list_free_space, struct ph_param *params, const struct ph_options *options)
|
||||||
{
|
{
|
||||||
FILE *f_session;
|
FILE *f_session;
|
||||||
|
if(params->status==STATUS_QUIT)
|
||||||
|
return 0;
|
||||||
f_session=fopen(SESSION_FILENAME,"wb");
|
f_session=fopen(SESSION_FILENAME,"wb");
|
||||||
if(!f_session)
|
if(!f_session)
|
||||||
{
|
{
|
||||||
|
@ -286,7 +288,7 @@ int session_save(alloc_data_t *list_free_space, struct ph_param *params, const
|
||||||
case STATUS_QUIT:
|
case STATUS_QUIT:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(params->status!=STATUS_QUIT && params->offset!=-1)
|
if(params->status!=STATUS_FIND_OFFSET && params->offset!=-1)
|
||||||
fprintf(f_session, "%llu,",
|
fprintf(f_session, "%llu,",
|
||||||
(long long unsigned)(params->offset/params->disk->sector_size));
|
(long long unsigned)(params->offset/params->disk->sector_size));
|
||||||
fprintf(f_session,"inter\n");
|
fprintf(f_session,"inter\n");
|
||||||
|
|
Loading…
Reference in a new issue