cleanup output in error-case
[util-vserver.git] / util-vserver / src / vlimit.c
index c4351ea..690b672 100644 (file)
@@ -75,7 +75,7 @@ showHelp(int fd, char const *cmd, int res)
   WRITE_MSG(fd, "Usage:  ");
   WRITE_STR(fd, cmd);
   WRITE_MSG(fd,
-           " [-c|--ctx <ctx>] [-a|--all] [-MSH  --<nr> <value>]*\n"
+           " [-c <ctx>] [-a|--all] [-MSH  --<nr> <value>]*\n"
            "Please report bugs to " PACKAGE_BUGREPORT "\n");
   exit(res);
 }
@@ -124,7 +124,7 @@ 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) {
@@ -134,7 +134,7 @@ showAll(int ctx)
     
     if (vc_get_rlimit(ctx, i, &limit)==-1) {
       perror("vc_get_rlimit()");
-      //continue;
+      continue;
     }
 
     memset(buf, ' ', sizeof buf);
@@ -147,7 +147,7 @@ showAll(int ctx)
 
     *ptr++ = '\n';
     write(1, buf, ptr-buf);
- }
+  }
 }
 
 static void
@@ -193,7 +193,7 @@ int main (int argc, char *argv[])
 
       if (set_mask & 1) limits[id].min  = val;
       if (set_mask & 2) limits[id].soft = val;
-      if (set_mask & 4) limits[id].soft = val;
+      if (set_mask & 4) limits[id].hard = val;
 
       lim_mask |= (1<<id);
       set_mask  = 0;