summaryrefslogtreecommitdiffstats
path: root/cpukit/libi2c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2007-10-11 12:46:50 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2007-10-11 12:46:50 +0000
commitc57316a40956b00b5d10f19dbb253383069d515a (patch)
tree240b27e7f3199bf8321262422d9bad61b5c071c4 /cpukit/libi2c
parentgdb-6.7 (diff)
downloadrtems-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')
-rw-r--r--cpukit/libi2c/libi2c.c6
-rw-r--r--cpukit/libi2c/libi2c.h3
2 files changed, 5 insertions, 4 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 '/' */
diff --git a/cpukit/libi2c/libi2c.h b/cpukit/libi2c/libi2c.h
index 38677af389..2dfbddd458 100644
--- a/cpukit/libi2c/libi2c.h
+++ b/cpukit/libi2c/libi2c.h
@@ -113,7 +113,8 @@ typedef struct rtems_libi2c_bus_ops_
* (i.e., libi2c) and the minor number encodes a bus# and a i2c address.
*
* The name will be registered in the filesystem (parent
- * directories must exist). It may be NULL in which case
+ * directories must exist, also IMFS filesystem must exist see
+ * CONFIGURE_USE_IMFS_AS_BASE_FILESYSTEM). It may be NULL in which case
* the library will pick a default.
*
* RETURNS: bus # (>=0) or -1 on error (errno set).