[PATCH 1/1] fix: console: expose consoles in devfs

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Fri Mar 10 06:41:16 PST 2017


on 64bit ssize_t is not an int but a long

so use the protype for fops_write ssize_t

common/console.c: In function ‘console_register’:
common/console.c:373:22: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
  newcdev->fops.write = fops_write;

in commit b4f55fcf355a4d0ac456445a5f42f259f2812b57
By Bastian Stender <bst at pengutronix.de>

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 common/console.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/console.c b/common/console.c
index 668c870ab..4127e7617 100644
--- a/common/console.c
+++ b/common/console.c
@@ -296,7 +296,7 @@ static int fops_flush(struct cdev *dev)
 	return 0;
 }
 
-static int fops_write(struct cdev* dev, const void* buf, size_t count,
+static ssize_t fops_write(struct cdev* dev, const void* buf, size_t count,
 		      loff_t offset, ulong flags)
 {
 	struct console_device *priv = dev->priv;
-- 
2.11.0




More information about the barebox mailing list