[BZ #6947]
authorUlrich Drepper <drepper@redhat.com>
Fri, 31 Oct 2008 17:29:46 +0000 (17:29 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 31 Oct 2008 17:29:46 +0000 (17:29 +0000)
* sysdeps/unix/sysv/linux/ulimit.c (__ulimit): Handle UL_GETFSIZE
return value in case rlimit is RLIM_INFINITY.

[BZ #6947]
* sysdeps/unix/sysv/linux/ulimit.c (__ulimit): Fix return value
for UL_SETFSIZE.

ChangeLog
localedata/si_LK.in [new file with mode: 0644]
sysdeps/unix/sysv/linux/ulimit.c

index 815a5fe..af8cabb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
 
+       * sysdeps/unix/sysv/linux/ulimit.c (__ulimit): Handle UL_GETFSIZE
+       return value in case rlimit is RLIM_INFINITY.
+
+       [BZ #6947]
+       * sysdeps/unix/sysv/linux/ulimit.c (__ulimit): Fix return value
+       for UL_SETFSIZE.
+
        [BZ #6974]
        * sunrpc/rpc_main.c (mkfile_output): Properly handle filename
        without dot.  Properly terminate the string with a null byte.
diff --git a/localedata/si_LK.in b/localedata/si_LK.in
new file mode 100644 (file)
index 0000000..dc6b22b
--- /dev/null
@@ -0,0 +1,101 @@
+෴
+අ
+ආ
+ඇ
+ඈ
+ඉ
+ඊ
+උ
+ඌ
+ඍ
+ඎ
+ඏ
+ඐ
+එ
+ඒ
+ඓ
+ඔ
+ඕ
+ඖ
+ං
+ඃ
+ක
+කා
+කැ
+කෑ
+කි
+කී
+කු
+කූ
+කෘ
+කෲ
+කෟ
+කෳ
+කෙ
+කේ
+කෛ
+කො
+කෝ
+කෞ
+ක්
+ඛ
+ග
+ඝ
+ඞ
+ඟ
+ච
+ඡ
+ජ
+ඣ
+ඥ
+ඤ
+ඦ
+ට
+ඨ
+ඩ
+ඪ
+ණ
+ඬ
+ත
+ථ
+ද
+ධ
+න
+ඳ
+ප
+ඵ
+බ
+භ
+ම
+ඹ
+ය
+ර
+ර්‍
+ල
+ව
+ශ
+ෂ
+ස
+හ
+ළ
+ෆ
+ා
+ැ
+ෑ
+ි
+ී
+ු
+ූ
+ෘ
+ෲ
+ෟ
+ෳ
+ෙ
+ේ
+ෛ
+ො
+ෝ
+ෞ
+්
+්‍ය
+්‍ර
index 9c309c3..0b87599 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,92,1994-1998,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,1994-1998,2000,2001,2008
+   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
@@ -47,26 +48,32 @@ __ulimit (int cmd, ...)
       /* Get limit on file size.  */
       if (__getrlimit (RLIMIT_FSIZE, &limit) == 0)
        /* Convert from bytes to 512 byte units.  */
-       result =  limit.rlim_cur / 512;
+       result =  (limit.rlim_cur == RLIM_INFINITY
+                  ? LONG_MAX : limit.rlim_cur / 512);
       break;
 
     case UL_SETFSIZE:
       /* Set limit on file size.  */
       {
        long int newlimit = va_arg (va, long int);
+       long int newlen;
 
        if ((rlim_t) newlimit > RLIM_INFINITY / 512)
          {
            limit.rlim_cur = RLIM_INFINITY;
            limit.rlim_max = RLIM_INFINITY;
+           newlen = LONG_MAX;
          }
        else
          {
            limit.rlim_cur = newlimit * 512;
            limit.rlim_max = newlimit * 512;
+           newlen = newlimit;
          }
 
        result = __setrlimit (RLIMIT_FSIZE, &limit);
+       if (result != -1)
+         result = newlen;
       }
       break;