[EFISYS]: Add 'bcd_hive' as a dependency.

[FATTEN]: Fix help message. Functions with no parameters are void. Remove an hardcoded array size.

svn path=/trunk/; revision=69160
This commit is contained in:
Hermès Bélusca-Maïto 2015-09-09 19:48:15 +00:00
parent 30ea4eb1ae
commit 95a7eb8721
2 changed files with 14 additions and 19 deletions

View file

@ -17,7 +17,7 @@ endif()
add_custom_target(efisys
COMMAND native-fatten ${CMAKE_CURRENT_BINARY_DIR}/efisys.bin -format 2880 EFIBOOT -boot ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/fat.bin -mkdir EFI -mkdir EFI/BOOT -add $<TARGET_FILE:bootmgfw> EFI/BOOT/boot${EFI_PLATFORM_ID}.efi -add ${CMAKE_BINARY_DIR}/boot/bootdata/BCD EFI/BOOT/BCD
DEPENDS native-fatten bootmgfw fat
DEPENDS native-fatten fat bootmgfw bcd_hive
VERBATIM)
##bootcd

View file

@ -17,7 +17,7 @@ static int isMounted = 0;
static char buff[32768];
// tool needed by fatfs
DWORD get_fattime()
DWORD get_fattime(void)
{
/* 31-25: Year(0-127 org.1980), 24-21: Month(1-12), 20-16: Day(1-31) */
/* 15-11: Hour(0-23), 10-5: Minute(0-59), 4-0: Second(0-29 *2) */
@ -69,7 +69,7 @@ int is_command(const char* parg)
if (nargs > _max_) { printf("Too many args for command %s.\n", argv[-1]); PRINT_HELP_AND_QUIT(); } \
} while(0)
int need_mount()
int need_mount(void)
{
int r;
@ -99,9 +99,9 @@ void print_help(char const * const name)
#else
printf("Commands:\n");
#endif
printf(" -format <sectors> [<filesystem>]\n"
printf(" -format <sectors> [<filesystem>] [<custom header label>]\n"
" Formats the disk image.\n");
printf(" -boot <sector file> [<custom header label>]\n"
printf(" -boot <sector file>\n"
" Writes a new boot sector.\n");
printf(" -add <src path> <dst path>\n"
" Copies an external file or directory into the image.\n");
@ -269,7 +269,6 @@ int main(int oargc, char* oargv[])
ret = 1;
goto exit;
}
}
}
else if (strcmp(parg, "boot") == 0)
@ -282,7 +281,6 @@ int main(int oargc, char* oargv[])
// Arg 1: boot file
fe = fopen(argv[0], "rb");
if (!fe)
{
printf("Error: unable to open external file '%s' for reading.", argv[0]);
@ -345,7 +343,6 @@ int main(int oargc, char* oargv[])
// Arg 2: virtual filename
fe = fopen(argv[0], "rb");
if (!fe)
{
printf("Error: unable to open external file '%s' for reading.", argv[0]);
@ -391,7 +388,6 @@ int main(int oargc, char* oargv[])
}
fv = fopen(argv[1], "wb");
if (!fv)
{
printf("Error: unable to open external file '%s' for writing.", argv[1]);
@ -498,7 +494,7 @@ int main(int oargc, char* oargv[])
printf("Listing directory contents of: %s\n", root);
info.lfname = lfname;
info.lfsize = 256;
info.lfsize = sizeof(lfname)-1;
while ((!f_readdir(&dir, &info)) && (strlen(info.fname) > 0))
{
if (strlen(info.lfname) > 0)
@ -524,4 +520,3 @@ exit:
return ret;
}