--- nono/vm/human68k.cpp 2026/04/29 17:04:28 1.1 +++ nono/vm/human68k.cpp 2026/04/29 17:04:29 1.1.1.2 @@ -80,13 +80,14 @@ Human68k::Init() // 実行ファイルオープン int file_fd = open(human68k_file, O_RDONLY); if (file_fd == -1) { - warn("open %s", human68k_file); + warn("Human68k executable \"%s\" open failed", human68k_file); return false; } struct stat st; if (fstat(file_fd, &st) != 0) { - warn("fstat %s", human68k_file); + warn("Human68k executable \"%s\" fstat failed", human68k_file); + close(file_fd); return false; } uint32 file_size; @@ -96,7 +97,8 @@ Human68k::Init() // mmap file = (uint8 *)mmap(NULL, file_size, PROT_READ, MAP_PRIVATE, file_fd, 0); if (file == MAP_FAILED) { - warn("mmap"); + warn("Human68k executable \"%s\" mmap failed", human68k_file); + close(file_fd); return false; } @@ -113,12 +115,13 @@ Human68k::Init() } else if (file[0] == 0x60 && file[1] == 0x1a) { r = LoadZ(file, file_size); } else { - warnx("Invalid file extension"); + warnx("Human68k executable \"%s\" cannot identify file type", + human68k_file); return false; } } if (!r) { - warnx("Invalid file format"); + warnx("Human68k executable \"%s\" invalid file format", human68k_file); return false; }