open file on --test, check it can...

This commit is contained in:
Laurent Vivier
2004-12-26 20:12:44 +00:00
parent a7092964e5
commit a67a546c6c

View File

@@ -554,8 +554,6 @@ int main(int argc, char **argv)
printf("append: %s\n", append_string); printf("append: %s\n", append_string);
printf("buffer size: %d\n", buffer_size); printf("buffer size: %d\n", buffer_size);
if (action_test == 0)
{
/* set kernel info into second level */ /* set kernel info into second level */
fd = open(second_path, O_RDWR); fd = open(second_path, O_RDWR);
@@ -566,6 +564,8 @@ int main(int argc, char **argv)
return 15; return 15;
} }
if (action_test == 0)
{
/* set kernel info */ /* set kernel info */
ret = emile_second_set_kernel_scsi(fd, kernel_path); ret = emile_second_set_kernel_scsi(fd, kernel_path);
@@ -599,6 +599,8 @@ int main(int argc, char **argv)
append_string, second_path); append_string, second_path);
return 18; return 18;
} }
}
close(fd); close(fd);
/* set second info in first level */ /* set second info in first level */
@@ -611,6 +613,8 @@ int main(int argc, char **argv)
return 19; return 19;
} }
if (action_test == 0)
{
ret = emile_first_set_param_scsi(fd, second_path); ret = emile_first_set_param_scsi(fd, second_path);
if (ret == -1) if (ret == -1)
{ {
@@ -619,9 +623,12 @@ int main(int argc, char **argv)
second_path, first_path); second_path, first_path);
return 20; return 20;
} }
}
close(fd); close(fd);
if (action_test == 0)
{
/* copy first level to boot block */ /* copy first level to boot block */
ret = copy_file_to_bootblock(first_path, partition); ret = copy_file_to_bootblock(first_path, partition);