[U-Boot] image-fit: switch ENOLINK to ENOENT

Jonathan Gray jsg at jsg.id.au
Thu Sep 8 14:01:52 CEST 2016


On Wed, Sep 07, 2016 at 02:00:19PM -0400, Tom Rini wrote:
> On Sat, Sep 03, 2016 at 08:30:14AM +1000, Jonathan Gray wrote:
> 
> > ENOLINK is not required by POSIX and does not exist on OpenBSD
> > and likely other systems.
> > 
> > Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
> 
> Applied to u-boot/master, thanks!

Thanks for applying this and the other patch.

In tools/kwboot.c I've also locally changed EPROTO and EBADMSG as they
aren't on OpenBSD either.

They are in POSIX however so I am trying to get them into OpenBSD,
but it will need some time to be scheduled as introducing errnos
involves cranking the major version of libc due to the size of the array
with errno strings changing.

I wasn't sure if the following would be accepted for that reason,
thoughts?

FreeBSD and NetBSD seems to have definitions for both already.

diff --git a/tools/kwboot.c b/tools/kwboot.c
index 26b3949..9b50b32 100644
--- a/tools/kwboot.c
+++ b/tools/kwboot.c
@@ -402,13 +402,13 @@ kwboot_xm_sendblock(int fd, struct kwboot_block *block)
 		rc = 0;
 		break;
 	case NAK:
-		errno = EBADMSG;
+		errno = ECONNREFUSED;
 		break;
 	case CAN:
 		errno = ECANCELED;
 		break;
 	default:
-		errno = EPROTO;
+		errno = EIO;
 		break;
 	}
 


More information about the U-Boot mailing list