Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Change error code to ENOBUFS on lack of buffer memory



details:   https://anonhg.NetBSD.org/src/rev/1d11bb46b111
branches:  trunk
changeset: 364594:1d11bb46b111
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Thu Mar 31 01:53:22 2022 +0000

description:
Change error code to ENOBUFS on lack of buffer memory

pointed out by k-goda@IIJ

diffstat:

 sbin/ifconfig/lagg.c   |  6 +++---
 sys/net/lagg/if_lagg.c |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r b0649e7665b9 -r 1d11bb46b111 sbin/ifconfig/lagg.c
--- a/sbin/ifconfig/lagg.c      Thu Mar 31 01:49:02 2022 +0000
+++ b/sbin/ifconfig/lagg.c      Thu Mar 31 01:53:22 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lagg.c,v 1.2 2021/06/21 03:14:40 christos Exp $        */
+/*     $NetBSD: lagg.c,v 1.3 2022/03/31 01:53:22 yamaguchi Exp $       */
 
 /*
  * Copyright (c) 2021 Internet Initiative Japan Inc.
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: lagg.c,v 1.2 2021/06/21 03:14:40 christos Exp $");
+__RCSID("$NetBSD: lagg.c,v 1.3 2022/03/31 01:53:22 yamaguchi Exp $");
 #endif /* !defined(lint) */
 
 #include <sys/param.h>
@@ -269,7 +269,7 @@
                if (indirect_ioctl(env, SIOCGLAGG, req) == 0)
                        goto done;
 
-               if (errno != ENOMEM)
+               if (errno != ENOBUFS)
                        break;
                nports = req->lrq_nports + 3; /* 3: additional space */
        }
diff -r b0649e7665b9 -r 1d11bb46b111 sys/net/lagg/if_lagg.c
--- a/sys/net/lagg/if_lagg.c    Thu Mar 31 01:49:02 2022 +0000
+++ b/sys/net/lagg/if_lagg.c    Thu Mar 31 01:53:22 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_lagg.c,v 1.35 2022/03/31 01:49:02 yamaguchi Exp $   */
+/*     $NetBSD: if_lagg.c,v 1.36 2022/03/31 01:53:22 yamaguchi Exp $   */
 
 /*
  * Copyright (c) 2005, 2006 Reyk Floeter <reyk%openbsd.org@localhost>
@@ -20,7 +20,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_lagg.c,v 1.35 2022/03/31 01:49:02 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_lagg.c,v 1.36 2022/03/31 01:53:22 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2652,7 +2652,7 @@
        curlwp_bindx(bound);
 
        if (resp->lrq_nports > nports) {
-               return ENOMEM;
+               return ENOBUFS;
        }
        return 0;
 }



Home | Main Index | Thread Index | Old Index