mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-25 20:30:31 +00:00
mkdos33fs: cleanup whitespace
This commit is contained in:
parent
6c4b06ae1a
commit
5ecc16e840
@ -39,39 +39,40 @@ int main(int argc, char **argv) {
|
|||||||
|
|
||||||
/* Parse Command Line Arguments */
|
/* Parse Command Line Arguments */
|
||||||
|
|
||||||
while ((c = getopt (argc, argv,"t:s:b:d:f:hv"))!=-1) {
|
while ((c = getopt (argc, argv,"t:s:b:d:f:hv"))!=-1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
|
||||||
case 't': num_tracks=strtol(optarg,&endptr,10);
|
case 't':
|
||||||
if ( endptr == optarg ) usage(argv[0], 1);
|
num_tracks=strtol(optarg,&endptr,10);
|
||||||
break;
|
if ( endptr == optarg ) usage(argv[0], 1);
|
||||||
|
break;
|
||||||
|
|
||||||
case 's': num_sectors=strtol(optarg,&endptr,10);
|
case 's':
|
||||||
if ( endptr == optarg ) usage(argv[0], 1);
|
num_sectors=strtol(optarg,&endptr,10);
|
||||||
break;
|
if ( endptr == optarg ) usage(argv[0], 1);
|
||||||
case 'b': block_size=strtol(optarg,&endptr,10);
|
break;
|
||||||
if ( endptr == optarg ) usage(argv[0], 1);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'd': copy_dos=1;
|
case 'b':
|
||||||
strncpy(dos_src,optarg,BUFSIZ);
|
block_size=strtol(optarg,&endptr,10);
|
||||||
break;
|
if ( endptr == optarg ) usage(argv[0], 1);
|
||||||
|
break;
|
||||||
case 'f':
|
case 'd':
|
||||||
if (strlen(optarg)>30) {
|
copy_dos=1;
|
||||||
fprintf(stderr,"Auto boot filename too long!\n");
|
strncpy(dos_src,optarg,BUFSIZ);
|
||||||
exit(1);
|
break;
|
||||||
}
|
case 'f':
|
||||||
memcpy(boot_filename,optarg,strlen(optarg));
|
if (strlen(optarg)>30) {
|
||||||
for(i=strlen(optarg);i<30;i++) boot_filename[i]=' ';
|
fprintf(stderr,"Auto boot filename too long!\n");
|
||||||
// printf("Writing boot filename \"%s\"\n",boot_filename);
|
exit(1);
|
||||||
break;
|
}
|
||||||
|
memcpy(boot_filename,optarg,strlen(optarg));
|
||||||
case 'v': usage(argv[0],0);
|
for(i=strlen(optarg);i<30;i++) boot_filename[i]=' ';
|
||||||
case 'h': usage(argv[0],1);
|
// printf("Writing boot filename \"%s\"\n",boot_filename);
|
||||||
|
break;
|
||||||
}
|
case 'v': usage(argv[0],0);
|
||||||
}
|
case 'h': usage(argv[0],1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (optind==argc) {
|
if (optind==argc) {
|
||||||
printf("Error! Must include device name\n\n");
|
printf("Error! Must include device name\n\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user