changed logic to skip entries without chance for success
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 20 Feb 2004 19:06:14 +0000 (19:06 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 20 Feb 2004 19:06:14 +0000 (19:06 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@978 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/src/vlimit.c

index 690b672..df552be 100644 (file)
@@ -124,17 +124,18 @@ showAll(int ctx)
 
   if (vc_get_rlimit_mask(-2, &mask)==-1) {
     perror("vc_get_rlimit_mask()");
-    exit(1);
+    //exit(1);
   }
 
   for (i=0; i<32; ++i) {
     uint32_t           bitmask = (1<<i);
     struct vc_rlimit   limit;
     char               buf[100], *ptr=buf;
-    
+
+    if (((mask.min|mask.soft|mask.hard) & bitmask)==0) continue;
     if (vc_get_rlimit(ctx, i, &limit)==-1) {
       perror("vc_get_rlimit()");
-      continue;
+      //continue;
     }
 
     memset(buf, ' ', sizeof buf);