diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-10-11 12:46:50 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-10-11 12:46:50 +0000 |
commit | c57316a40956b00b5d10f19dbb253383069d515a (patch) | |
tree | 240b27e7f3199bf8321262422d9bad61b5c071c4 /cpukit/libi2c/libi2c.c | |
parent | gdb-6.7 (diff) | |
download | rtems-c57316a40956b00b5d10f19dbb253383069d515a.tar.bz2 |
2007-10-11 Daniel Hellstrom <daniel@gaisler.com>
* libi2c/libi2c.c, libi2c/libi2c.h: Add message about needing IMFS.
Fixed check of status when registering driver. Add use of strerror().
Diffstat (limited to 'cpukit/libi2c/libi2c.c')
-rw-r--r-- | cpukit/libi2c/libi2c.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/libi2c/libi2c.c b/cpukit/libi2c/libi2c.c index a33c8d2a5b..0adf2f1ae4 100644 --- a/cpukit/libi2c/libi2c.c +++ b/cpukit/libi2c/libi2c.c @@ -323,7 +323,7 @@ rtems_libi2c_initialize () return -1; sc = rtems_io_register_driver (0, &libi2c_io_ops, &rtems_libi2c_major); - if (RTEMS_SUCCESSFUL != 0) { + if (RTEMS_SUCCESSFUL != sc) { fprintf (stderr, DRVNM " Claiming driver slot failed (rtems status code %i)\n", sc); @@ -366,8 +366,8 @@ rtems_libi2c_register_bus (char *name, rtems_libi2c_bus_t * bus) i = stat (nmcpy, &sbuf); *chpt = tmp; if (i) { - fprintf (stderr, "Bad name '%s'; parent directory doesn't exist\n", - nmcpy); + fprintf (stderr, "Get %s status failed: %s\n", + nmcpy,strerror(errno)); return -RTEMS_INVALID_NAME; } /* should be a directory since name terminates in '/' */ |