# vim: ft=gdblog # to have a minimum of syntax coloring below and make gdb commands stand out a bit, # execute the following 2 lines on vim's comamnd prompt (':') or add them into your .vimrc: # au Syntax gdblog syn match Comment /^+REM.*$/ # au Syntax gdblog syn match Statement /^+[a-z/]\+ *.*$/ Starting program: /home/user/grub-2.02~beta2/grub-probe -vv -d /dev/sda1 >> ~/adm/grub/gdb2.txt grub-core/kern/disk.c:196: Opening `hostdisk//dev/sda'... grub-core/kern/disk.c:196: Opening `hostdisk//dev/sda'... grub-core/disk/diskfilter.c:135: Scanning for DISKFILTER devices on disk hostdisk//dev/sda grub-core/osdep/hostdisk.c:415: opening the device `/dev/sda' in open_device() grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda' grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda' grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda' grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda' ... a lot of output here related to scanning for raid (mdraid1x,mdraid09,dmraid_nv,ldm) ... grub-core/kern/disk.c:295: Closing `hostdisk//dev/sda'. grub-core/kern/disk.c:196: Opening `hostdisk//dev/sda,msdos1'... grub-core/partmap/msdos.c:188: partition 0: flag 0x80, type 0x83, start 0x3f, len ... ( ~10GB size) [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1". Breakpoint 1, probe (path=0x0, device_names=0x8151888, delim=10 '\n') at util/grub-probe.c:379 379 fs = grub_fs_probe (dev); +i br Num Type Disp Enb Address What 1 breakpoint keep y 0x0804ab8f in probe at util/grub-probe.c:379 breakpoint already hit 1 time 2 breakpoint keep y 0x080ea4a9 in grub_fs_probe at grub-core/kern/fs.c:73 +s grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:49 49 if (device->disk) +list 44,86 44 grub_fs_t 45 grub_fs_probe (grub_device_t device) 46 { 47 grub_fs_t p; 48 49 if (device->disk) 50 { 51 /* Make it sure not to have an infinite recursive calls. */ 52 static int count = 0; 53 54 for (p = grub_fs_list; p; p = p->next) 55 { 56 grub_dprintf ("fs", "Detecting %s...\n", p->name); 57 58 /* This is evil: newly-created just mounted BtrFS after copying all 59 GRUB files has a very peculiar unrecoverable corruption which 60 will be fixed at sync but we'd rather not do a global sync and 61 syncing just files doesn't seem to help. Relax the check for 62 this time. */ 63 #ifdef GRUB_UTIL 64 if (grub_strcmp (p->name, "btrfs") == 0) 65 { 66 char *label = 0; 67 p->uuid (device, &label); 68 if (label) 69 grub_free (label); 70 } 71 else 72 #endif 73 (p->dir) (device, "/", probe_dummy_iter, NULL); 74 if (grub_errno == GRUB_ERR_NONE) 75 return p; 76 77 grub_error_push (); 78 grub_dprintf ("fs", "%s detection failed.\n", p->name); 79 grub_error_pop (); 80 81 if (grub_errno != GRUB_ERR_BAD_FS 82 && grub_errno != GRUB_ERR_OUT_OF_RANGE) 83 return 0; 84 85 grub_errno = GRUB_ERR_NONE; 86 } +c Continuing. grub-core/kern/fs.c:56: Detecting zfs... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +n grub-core/osdep/hostdisk.c:415: opening the device `/dev/sda1' in open_device() grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/fs/zfs/zfs.c:1187: label ok 0 grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/fs/zfs/zfs.c:1187: label ok 1 grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/fs/zfs/zfs.c:1187: label ok 2 grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/fs/zfs/zfs.c:1187: label ok 3 grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' 74 if (grub_errno == GRUB_ERR_NONE) +p grub_errno $2 = GRUB_ERR_BAD_FS +n 77 grub_error_push (); +n 78 grub_dprintf ("fs", "%s detection failed.\n", p->name); +n grub-core/kern/fs.c:78: zfs detection failed. 79 grub_error_pop (); +n 81 if (grub_errno != GRUB_ERR_BAD_FS +n 85 grub_errno = GRUB_ERR_NONE; +n 54 for (p = grub_fs_list; p; p = p->next) +c Continuing. grub-core/kern/fs.c:56: Detecting xfs... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: xfs detection failed. grub-core/kern/fs.c:56: Detecting ufs2... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: ufs2 detection failed. grub-core/kern/fs.c:56: Detecting ufs1_be... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: ufs1_be detection failed. grub-core/kern/fs.c:56: Detecting ufs1... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: ufs1 detection failed. grub-core/kern/fs.c:56: Detecting udf... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' grub-core/kern/fs.c:78: udf detection failed. grub-core/kern/fs.c:56: Detecting tarfs... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: tarfs detection failed. grub-core/kern/fs.c:56: Detecting squash4... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: squash4 detection failed. grub-core/kern/fs.c:56: Detecting sfs... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: sfs detection failed. grub-core/kern/fs.c:56: Detecting romfs... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: romfs detection failed. grub-core/kern/fs.c:56: Detecting reiserfs... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: reiserfs detection failed. grub-core/kern/fs.c:56: Detecting procfs... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: procfs detection failed. grub-core/kern/fs.c:56: Detecting odc... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: odc detection failed. grub-core/kern/fs.c:56: Detecting ntfs... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: ntfs detection failed. grub-core/kern/fs.c:56: Detecting nilfs2... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: nilfs2 detection failed. grub-core/kern/fs.c:56: Detecting newc... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: newc detection failed. grub-core/kern/fs.c:56: Detecting minix_be... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: minix_be detection failed. grub-core/kern/fs.c:56: Detecting minix3_be... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: minix3_be detection failed. grub-core/kern/fs.c:56: Detecting minix3... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: minix3 detection failed. grub-core/kern/fs.c:56: Detecting minix2_be... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +c Continuing. grub-core/kern/fs.c:78: minix2_be detection failed. grub-core/kern/fs.c:56: Detecting minix2... Breakpoint 2, grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:73 73 (p->dir) (device, "/", probe_dummy_iter, NULL); +s grub_minix_dir (device=0x8152b60, path=0x81264aa "/", hook=0x80ea405 , hook_data=0x0) at grub-core/fs/minix.c:528 528 { +list 525,548 525 static grub_err_t 526 grub_minix_dir (grub_device_t device, const char *path, 527 grub_fs_dir_hook_t hook, void *hook_data) 528 { 529 struct grub_minix_data *data = 0; 530 unsigned int pos = 0; 531 532 data = grub_minix_mount (device->disk); 533 if (!data) 534 return grub_errno; 535 536 grub_minix_read_inode (data, GRUB_MINIX_ROOT_INODE); 537 if (grub_errno) 538 goto fail; 539 540 grub_minix_find_file (data, path); 541 if (grub_errno) 542 goto fail; 543 544 if ((GRUB_MINIX_INODE_MODE (data) & GRUB_MINIX_IFDIR) != GRUB_MINIX_IFDIR) 545 { 546 grub_error (GRUB_ERR_BAD_FILE_TYPE, N_("not a directory")); 547 goto fail; 548 } +n 529 struct grub_minix_data *data = 0; +n 530 unsigned int pos = 0; +n 532 data = grub_minix_mount (device->disk); +s grub_minix_mount (disk=0x8152750) at grub-core/fs/minix.c:461 461 data = grub_malloc (sizeof (struct grub_minix_data)); +list 455,523 455 /* Mount the filesystem on the disk DISK. */ 456 static struct grub_minix_data * 457 grub_minix_mount (grub_disk_t disk) 458 { 459 struct grub_minix_data *data; 460 461 data = grub_malloc (sizeof (struct grub_minix_data)); 462 if (!data) 463 return 0; 464 465 /* Read the superblock. */ 466 grub_disk_read (disk, GRUB_MINIX_SBLOCK, 0, 467 sizeof (struct grub_minix_sblock),&data->sblock); 468 if (grub_errno) 469 goto fail; 470 471 if (data->sblock.magic == grub_cpu_to_minix16_compile_time (GRUB_MINIX_MAGIC)) 472 { 473 #if !defined(MODE_MINIX3) 474 data->filename_size = 14; 475 #else 476 data->filename_size = 60; 477 #endif 478 } 479 #if !defined(MODE_MINIX3) 480 else if (data->sblock.magic 481 == grub_cpu_to_minix16_compile_time (GRUB_MINIX_MAGIC_30)) 482 data->filename_size = 30; 483 #endif 484 else 485 goto fail; 486 487 /* 20 means 1G zones. We could support up to 31 but already 1G isn't 488 supported by anything else. */ 489 if (grub_minix_to_cpu16 (data->sblock.log2_zone_size) >= 20) 490 goto fail; 491 492 data->disk = disk; 493 data->linknest = 0; 494 #ifdef MODE_MINIX3 495 /* These tests are endian-independent. No need to byteswap. */ 496 if (data->sblock.block_size == 0xffff) 497 data->block_size = 2; 498 else 499 { 500 if ((data->sblock.block_size == grub_cpu_to_minix16_compile_time (0x200)) 501 || (data->sblock.block_size == 0) 502 || (data->sblock.block_size & grub_cpu_to_minix16_compile_time (0x1ff))) 503 goto fail; 504 data->block_size = grub_minix_to_cpu16 (data->sblock.block_size) 505 >> GRUB_DISK_SECTOR_BITS; 506 } 507 #else 508 data->block_size = 2; 509 #endif 510 511 return data; 512 513 fail: 514 grub_free (data); 515 #if defined(MODE_MINIX3) 516 grub_error (GRUB_ERR_BAD_FS, "not a minix3 filesystem"); 517 #elif defined(MODE_MINIX2) 518 grub_error (GRUB_ERR_BAD_FS, "not a minix2 filesystem"); 519 #else 520 grub_error (GRUB_ERR_BAD_FS, "not a minix filesystem"); 521 #endif 522 return 0; 523 } +p sizeof(struct grub_minix_data) $3 = 104 +n 462 if (!data) +p data $4 = (struct grub_minix_data *) 0x8152cb0 +n 467 sizeof (struct grub_minix_sblock),&data->sblock); +p sizeof(struct grub_minix_sblock) $5 = 20 +n 466 grub_disk_read (disk, GRUB_MINIX_SBLOCK, 0, +list 45,45 45 #define GRUB_MINIX_SBLOCK 2 +n 468 if (grub_errno) +p grub_errno $6 = GRUB_ERR_NONE +REM the read into data->sblock was successful +p/x &data->sblock $7 = 0x8152cb0 +x/20xb &data->sblock 0x8152cb0: 0xf0 0x51 0x09 0x00 0x90 0x42 0x25 0x00 0x8152cb8: 0xed 0xdc 0x01 0x00 0x09 0x02 0x08 0x00 0x8152cc0: 0x68 0x24 0x05 0x00 +x/10xh &data->sblock 0x8152cb0: 0x51f0 0x0009 0x4290 0x0025 0xdced 0x0001 0x0209 0x0008 0x8152cc0: 0x2468 0x0005 +x/5xw &data->sblock 0x8152cb0: 0x000951f0 0x00254290 0x0001dced 0x00080209 0x8152cc0: 0x00052468 +REM The 5 4-byte words above correspond to the first 5 words from the ext4 superblock: +REM 0x0 __le32 s_inodes_count Total inode count. +REM 0x4 __le32 s_blocks_count_lo Total block count. +REM 0x8 __le32 s_r_blocks_count_lo Reserved block count. +REM 0xC __le32 s_free_blocks_count_lo Free block count. +REM 0x10 __le32 s_free_inodes_count Free inode count. +show print pretty Pretty formatting of structures is off. +set print pretty +REM Now I will print the same byte as a *minix2* superblock: +p/x data->sblock $8 = { inode_cnt = 0x51f0, zone_cnt = 0x9, inode_bmap_size = 0x4290, zone_bmap_size = 0x25, first_data_zone = 0xdced, log2_zone_size = 0x1, max_file_size = 0x80209, magic = 0x2468 } +REM ... so the minix2 superblock fields map onto the ext4 superblocks fields as follows: +REM ... the 'log2_zone_size' corresponds to the upper 16 bits of the ext4's reserved_block_count +REM ... and the 'magic' to the lower 16 bits of the ext4's free_inodes_count +REM Displaying the ext4 superblock fields with 'tune2fs -l /dev/sda1' or debugfs confirms the values above. +REM By (incredibly bad, but not totally rare) luck, the ext4 reserved block and free inode count values +REM happen to match the values needed to pass the only 2 tests done for a minix2 filesystem. +n 471 if (data->sblock.magic == grub_cpu_to_minix16_compile_time (GRUB_MINIX_MAGIC)) +p/x data->sblock.magic $9 = 0x2468 +list grub-core/fs/minix.c:31,39 31 #ifdef MODE_MINIX3 32 #define GRUB_MINIX_MAGIC 0x4D5A 33 #elif defined(MODE_MINIX2) 34 #define GRUB_MINIX_MAGIC 0x2468 35 #define GRUB_MINIX_MAGIC_30 0x2478 36 #else 37 #define GRUB_MINIX_MAGIC 0x137F 38 #define GRUB_MINIX_MAGIC_30 0x138F 39 #endif +list grub-core/fs/minix.c:34,34 34 #define GRUB_MINIX_MAGIC 0x2468 +list grub-core/fs/minix.c:50,58 50 #ifdef MODE_BIGENDIAN 51 #define grub_cpu_to_minix16_compile_time grub_cpu_to_be16_compile_time 52 #define grub_minix_to_cpu16 grub_be_to_cpu16 53 #define grub_minix_to_cpu32 grub_be_to_cpu32 54 #else 55 #define grub_cpu_to_minix16_compile_time grub_cpu_to_le16_compile_time 56 #define grub_minix_to_cpu16 grub_le_to_cpu16 57 #define grub_minix_to_cpu32 grub_le_to_cpu32 58 #endif +list grub-core/fs/minix.c:55,55 55 #define grub_cpu_to_minix16_compile_time grub_cpu_to_le16_compile_time +list include/grub/types.h:251,251 251 # define grub_cpu_to_le16_compile_time(x) ((grub_uint16_t) (x)) +list include/grub/types.h:86,86 86 typedef unsigned short grub_uint16_t; +REM back to the magic value test: +list grub-core/fs/minix.c:471,485 471 if (data->sblock.magic == grub_cpu_to_minix16_compile_time (GRUB_MINIX_MAGIC)) 472 { 473 #if !defined(MODE_MINIX3) 474 data->filename_size = 14; 475 #else 476 data->filename_size = 60; 477 #endif 478 } 479 #if !defined(MODE_MINIX3) 480 else if (data->sblock.magic 481 == grub_cpu_to_minix16_compile_time (GRUB_MINIX_MAGIC_30)) 482 data->filename_size = 30; 483 #endif 484 else 485 goto fail; +p/x data->sblock.magic $10 = 0x2468 +list grub-core/fs/minix.c:34,34 34 #define GRUB_MINIX_MAGIC 0x2468 +REM ...and the tests succeeds. We have a minix2 filesystem! (or do we??) +n 474 data->filename_size = 14; +n 489 if (grub_minix_to_cpu16 (data->sblock.log2_zone_size) >= 20) +REM another place where a minix2 filesystem could have been ruled out +p/x data->sblock.log2_zone_size $11 = 0x1 +REM ...alas, not the case here +list 487,490 487 /* 20 means 1G zones. We could support up to 31 but already 1G isn't 488 supported by anything else. */ 489 if (grub_minix_to_cpu16 (data->sblock.log2_zone_size) >= 20) 490 goto fail; +REM A value of 1 for data->sblock.log2_zone_size means zones of size 2 (!). +REM But that is accepted. +n 492 data->disk = disk; +REM At this point there is no test left and the sda1 partition which contains an ext4 filesystem +REM is really accepted as a valid minix2 filesystem instead. +REM This assumption -- a minix2 filesystem -- breaks pretty quickly: a few lines further down +REM a test to find a directory will unsurprisingly fail. However, building on the (wrong) assumption +REM of a minix2 filesystem, that will be interpreted as a *corrupted* minix2, thus leading to the +REM unhelpful 'not a directory' error message. +n 493 data->linknest = 0; +n 508 data->block_size = 2; +n 511 return data; +n 523 } +n grub_minix_dir (device=0x8152b60, path=0x81264aa "/", hook=0x80ea405 , hook_data=0x0) at grub-core/fs/minix.c:533 533 if (!data) +n 536 grub_minix_read_inode (data, GRUB_MINIX_ROOT_INODE); +n grub-core/osdep/hostdisk.c:394: reusing open device `/dev/sda1' 537 if (grub_errno) +p grub_errno $12 = GRUB_ERR_NONE +n 540 grub_minix_find_file (data, path); +p path $13 = 0x81264aa "/" +n 541 if (grub_errno) +p grub_errno $14 = GRUB_ERR_NONE +n 544 if ((GRUB_MINIX_INODE_MODE (data) & GRUB_MINIX_IFDIR) != GRUB_MINIX_IFDIR) +list grub-core/fs/minix.c:78,78 78 #define GRUB_MINIX_INODE_MODE(data) (grub_minix_to_cpu16 (data->inode.mode)) +list grub-core/fs/minix.c:50,58 50 #ifdef MODE_BIGENDIAN 51 #define grub_cpu_to_minix16_compile_time grub_cpu_to_be16_compile_time 52 #define grub_minix_to_cpu16 grub_be_to_cpu16 53 #define grub_minix_to_cpu32 grub_be_to_cpu32 54 #else 55 #define grub_cpu_to_minix16_compile_time grub_cpu_to_le16_compile_time 56 #define grub_minix_to_cpu16 grub_le_to_cpu16 57 #define grub_minix_to_cpu32 grub_le_to_cpu32 58 #endif +list grub-core/fs/minix.c:56,56 56 #define grub_minix_to_cpu16 grub_le_to_cpu16 +list include/grub/types.h:238,238 238 # define grub_le_to_cpu16(x) ((grub_uint16_t) (x)) +p/x data->inode.mode $15 = 0x81a4 +list grub-core/fs/minix.c:47,47 47 #define GRUB_MINIX_IFDIR 0040000U +p/x 0040000U $16 = 0x4000 +p/t data->inode.mode $17 = 1000000110100100 +p/t 0040000U $18 = 100000000000000 +list grub-core/fs/minix.c:544,548 544 if ((GRUB_MINIX_INODE_MODE (data) & GRUB_MINIX_IFDIR) != GRUB_MINIX_IFDIR) 545 { 546 grub_error (GRUB_ERR_BAD_FILE_TYPE, N_("not a directory")); 547 goto fail; 548 } +p (data->inode.mode & 0040000U) $19 = 0 +p (data->inode.mode & 0040000U) != 0040000U $20 = 1 +n 546 grub_error (GRUB_ERR_BAD_FILE_TYPE, N_("not a directory")); +n 547 goto fail; +n 590 grub_free (data); +n 591 return grub_errno; +p grub_errno $21 = GRUB_ERR_BAD_FILE_TYPE +n 592 } +n grub_fs_probe (device=0x8152b60) at grub-core/kern/fs.c:74 74 if (grub_errno == GRUB_ERR_NONE) +list 73,86 73 (p->dir) (device, "/", probe_dummy_iter, NULL); 74 if (grub_errno == GRUB_ERR_NONE) 75 return p; 76 77 grub_error_push (); 78 grub_dprintf ("fs", "%s detection failed.\n", p->name); 79 grub_error_pop (); 80 81 if (grub_errno != GRUB_ERR_BAD_FS 82 && grub_errno != GRUB_ERR_OUT_OF_RANGE) 83 return 0; 84 85 grub_errno = GRUB_ERR_NONE; 86 } +n 77 grub_error_push (); +n 78 grub_dprintf ("fs", "%s detection failed.\n", p->name); +n grub-core/kern/fs.c:78: minix2 detection failed. 79 grub_error_pop (); +n 81 if (grub_errno != GRUB_ERR_BAD_FS +p grub_errno $22 = GRUB_ERR_BAD_FILE_TYPE +n 82 && grub_errno != GRUB_ERR_OUT_OF_RANGE) +p grub_errno $23 = GRUB_ERR_BAD_FILE_TYPE +n 83 return 0; +n 122 } +n probe (path=0x0, device_names=0x8151888, delim=10 '\n') at util/grub-probe.c:380 380 if (! fs) +p fs $24 = (grub_fs_t) 0x0 +n 381 grub_util_error ("%s", grub_errmsg); +p grub_errmsg $25 = "not a directory\000esystem\000m\000l\000agic number\000sda", '\000' +show print null-stop Printing of char arrays to stop at first null char is off. +set print null-stop on +p grub_errmsg $26 = "not a directory" +n [Inferior 1 (process 20237) exited with code 01] +REM The output message is '/home/user/grub-2.02~beta2/grub-probe: error: not a directory.' +set logging off