fiasco: Add .txt filename extension when unpacking mmc layout file

This commit is contained in:
Pali Rohár committed 2023-04-15 18:28:03 +02:00
1 parent f6b0a7be3a
commit 6a1d35cb3a
1 file changed
+2 -2
+2 -2
View File
@@ -632,13 +632,13 @@ int fiasco_unpack(struct fiasco * fiasco, const char * dir) {
if ( ! name ) if ( ! name )
ALLOC_ERROR_RETURN(-1); ALLOC_ERROR_RETURN(-1);
layout_name = calloc(1, strlen(name) + sizeof("_layout")-1 + 1); layout_name = calloc(1, strlen(name) + sizeof("_layout.txt")-1 + 1);
if ( ! layout_name ) { if ( ! layout_name ) {
free(name); free(name);
ALLOC_ERROR_RETURN(-1); ALLOC_ERROR_RETURN(-1);
} }
sprintf(layout_name, "%s_layout", name); sprintf(layout_name, "%s_layout.txt", name);
free(name); free(name);
printf(" Layout file: %s\n", layout_name); printf(" Layout file: %s\n", layout_name);