opt = get_limit (limind, &soft_limit, &hard_limit);
if (opt < 0)
{
-- builtin_error ("cannot get %s limit: %s", limits[limind].description,
-- strerror (errno));
+- builtin_error (_("%s: cannot get limit: %s"), limits[limind].description,
+- strerror (errno));
- return (EXECUTION_FAILURE);
+ if (( errno == 22) && (limits[limind].parameter == RLIMIT_LOCKS))
+ {
+ }
+ else
+ {
-+ builtin_error ("cannot get %s limit: %s", limits[limind].description,
++ builtin_error (_("%s: cannot get limit: %s"), limits[limind].description,
+ strerror (errno));
+ return (EXECUTION_FAILURE);
+ }
+
+ if (dont_locks)
+ {
-+ builtin_error ("cannot set it on the current kernel");
++ builtin_error (_("cannot set it on the current kernel"));
+ return (EXECUTION_FAILURE);
+ }
/* Setting the limit.
if (STREQ (cmdarg, "hard"))
-@@ -617,7 +635,17 @@
+@@ -617,8 +635,18 @@
for (i = 0; limits[i].option > 0; i++)
{
if (get_limit (i, &softlim, &hardlim) < 0)
-- builtin_error ("cannot get %s limit: %s", limits[i].description, strerror (errno));
+- builtin_error ("%s: cannot get limit: %s", limits[i].description,
+- strerror (errno));
+ {
+ if ((errno == 22) && (limits[i].parameter == RLIMIT_LOCKS))
+ {
+ hardlim = RLIM_INFINITY;
+ printone (i, (mode & LIMIT_SOFT) ? softlim : hardlim, 1);
+ } else
-+ builtin_error ("cannot get %s limit: %s", limits[i].description, strerror (errno));
++ builtin_error ("%s: cannot get limit: %s", limits[i].description,
++ strerror (errno));
+ }
else
printone (i, (mode & LIMIT_SOFT) ? softlim : hardlim, 1);