]> sourceware.org Git - glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Sun, 30 Apr 2000 09:40:55 +0000 (09:40 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 30 Apr 2000 09:40:55 +0000 (09:40 +0000)
* sysdeps/unix/sysv/linux/if_index.c (if_nameindex): Set errno to
ENOBUFS if we are out of memory.

ChangeLog
sysdeps/unix/sysv/linux/if_index.c

index 24cdb640cf336b361fcb2241802827d193e20528..e2883555b39a0181291762f95b33d99c754cdd55 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-04-30  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/unix/sysv/linux/if_index.c (if_nameindex): Set errno to
+       ENOBUFS if we are out of memory.
+
        * sysdeps/generic/bits/fcntl.h (F_SETOWN, F_GETOWN): Make
        available if __USE_XOPEN2K.
        * sysdeps/mach/hurd/bits/fcntl.h: Likewise.
index 44d310befe94bada26bad3d4437e0c4c49d626d1..764dac79e4f79dfdfb507d7ad8012d4f4ce1a2e2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -133,6 +133,7 @@ if_nameindex (void)
   if (idx == NULL)
     {
       __close (fd);
+      __set_errno (ENOBUFS);
       return NULL;
     }
 
@@ -151,7 +152,10 @@ if_nameindex (void)
          free (idx);
          __close (fd);
          if (saved_errno == EINVAL)
-           __set_errno (ENOSYS);
+           saved_errno = ENOSYS;
+         else if (saved_errno == ENOMEM)
+           saved_errno = ENOBUFS;
+         __set_errno (saved_errno);
          return NULL;
        }
       idx[i].if_index = ifr->ifr_ifindex;
This page took 0.049513 seconds and 5 git commands to generate.