# HG changeset patch # User gthomas # Date 1045240299 0 # Node ID 8285bebc3a8970a447c90a201c16e6397501fa85 # Parent 62d320796ef8a46ade8d71f3fe9c90996e3ef145 Minor IDE [debug] improvements. diff --git a/packages/redboot/current/ChangeLog b/packages/redboot/current/ChangeLog --- a/packages/redboot/current/ChangeLog +++ b/packages/redboot/current/ChangeLog @@ -3,6 +3,12 @@ 2003-02-14 Jonathan Larmour + + * src/fs/ide.c: Print more info if failed to identify IDE device. + + * src/fs/e2fs.c: Improved debug output. + 2003-02-04 Mark Salter 2003-02-04 Brian Murphy diff --git a/packages/redboot/current/src/fs/e2fs.c b/packages/redboot/current/src/fs/e2fs.c --- a/packages/redboot/current/src/fs/e2fs.c +++ b/packages/redboot/current/src/fs/e2fs.c @@ -9,6 +9,7 @@ // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +// Copyright (C) 2003 Gary Thomas // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -135,7 +136,7 @@ e2fs_get_inode(e2fs_desc_t *e2fs, int in // and the offset within that sector. offset %= SECTOR_SIZE; -#if DEBUG_E2FS > 0 +#if DEBUG_E2FS > 0x08 diag_printf("%s: ino[%d], sec_nr[%d] offset[%d]\n", __FUNCTION__, ino, sec_nr, offset); #endif @@ -269,6 +270,9 @@ search_dir_block(e2fs_desc_t *e2fs, cyg_ cyg_uint16 reclen, len; cyg_uint32 offset; +#if DEBUG_E2FS > 0 + diag_dump_buf(blkbuf, e2fs->blocksize); +#endif offset = 0; while (offset < e2fs->blocksize) { dir = (e2fs_dir_entry_t *)((char *)blkbuf + offset); @@ -360,7 +364,7 @@ e2fs_follow_symlink(e2fs_desc_t *e2fs, c if (!e2fs_get_inode(e2fs, sym_ino, &inode)) { #if DEBUG_E2FS > 0 - diag_printf("%s: e2fs_get_inode [%d] failed\n", __FUNCTION__, *ino); + diag_printf("%s: e2fs_get_inode [%d] failed\n", __FUNCTION__, sym_ino); #endif return 0; } diff --git a/packages/redboot/current/src/fs/ide.c b/packages/redboot/current/src/fs/ide.c --- a/packages/redboot/current/src/fs/ide.c +++ b/packages/redboot/current/src/fs/ide.c @@ -9,6 +9,7 @@ // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +// Copyright (C) 2003 Gary Thomas // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -441,8 +442,11 @@ ide_init(void) HAL_IDE_WRITE_UINT8(i, IDE_REG_FEATURES, 0); CYGACC_CALL_IF_DELAY_US(50000); HAL_IDE_READ_UINT8(i, IDE_REG_DEVICE, u8); - if (u8 != DEV_INIT_VAL) + if (u8 != DEV_INIT_VAL) { + diag_printf("IDE failed to identify unit %d - wrote: %x, read: %x\n", + i, DEV_INIT_VAL, u8); continue; + } // device present priv->flags |= IDE_DEV_PRESENT;