diff options
Diffstat (limited to 'src/fat1x.c')
-rw-r--r-- | src/fat1x.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/fat1x.c b/src/fat1x.c index 4af020a..a3500e1 100644 --- a/src/fat1x.c +++ b/src/fat1x.c @@ -138,33 +138,27 @@ int fat1x_boot_sector(disk_t *disk_car, partition_t *partition, const int verbos if(*current_cmd!=NULL) { command=0; - while(*current_cmd[0]==',') - (*current_cmd)++; - if(strncmp(*current_cmd,"rebuildbs",9)==0) + skip_comma_in_command(current_cmd); + if(check_command(current_cmd,"rebuildbs",9)==0) { - (*current_cmd)+=9; command='R'; } - else if(strncmp(*current_cmd,"dump",4)==0) + else if(check_command(current_cmd,"dump",4)==0) { - (*current_cmd)+=4; command='D'; } - else if(strncmp(*current_cmd,"list",4)==0) + else if(check_command(current_cmd,"list",4)==0) { - (*current_cmd)+=4; if(strchr(options,'L')!=NULL) command='L'; } - else if(strncmp(*current_cmd,"repairfat",9)==0) + else if(check_command(current_cmd,"repairfat",9)==0) { - (*current_cmd)+=9; if(strchr(options,'C')!=NULL) command='C'; } - else if(strncmp(*current_cmd,"initroot",8)==0) + else if(check_command(current_cmd,"initroot",8)==0) { - (*current_cmd)+=8; if(strchr(options,'I')!=NULL) command='I'; } |