PERFORCE change 99586 for review
Alex Lyashkov
als at FreeBSD.org
Mon Jun 19 06:58:17 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=99586
Change 99586 by als at als_head on 2006/06/19 06:57:35
Whitespace cleanup. use tabs instead off spaces.
Affected files ...
.. //depot/projects/jail2/j2_tools/jresource/jresource.c#2 edit
Differences ...
==== //depot/projects/jail2/j2_tools/jresource/jresource.c#2 (text+ko) ====
@@ -1,4 +1,3 @@
-
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -13,7 +12,6 @@
#include <stdlib.h>
#include <sysexits.h>
-
static void usage(void);
#define C_CTX 0
@@ -28,19 +26,19 @@
struct jail_2 j;
char *error;
int limit;
- int ret;
-
+ int ret;
+
if (ctx == -1)
- err(3,"Can`t set context id");
+ err(3, "Can`t set context id");
j.version = 2;
j.ctx_id = ctx;
j.cmd = cmd;
- limit = strtol(data,&error,10);
- if( *error != '\0' )
- errx(1,"Error in process limit value");
- j.data=&limit;
+ limit = strtol(data, &error, 10);
+ if (*error != '\0')
+ errx(1, "Error in process limit value");
+ j.data = &limit;
ret = jail(&j);
- if(ret != 0)
+ if (ret != 0)
err(2, "%s", "set process limit");
}
@@ -50,24 +48,23 @@
int ch;
int ctx_id = -1;
char *error;
-
- /* options descriptor */
- static struct option longopts[] = {
- { "ctx", required_argument, NULL, C_CTX },
- { "proclimit", required_argument, NULL, C_PLIMIT },
- { "sysvshm", required_argument, NULL, C_IPCSHM },
- { "sysvsem", required_argument, NULL, C_IPCSEM },
- { "sysvmsq", required_argument, NULL, C_IPCMSQ },
- { NULL, 0, NULL, 0 }
- };
+
+ /* options descriptor */
+ static struct option longopts[] = {
+ {"ctx", required_argument, NULL, C_CTX},
+ {"proclimit", required_argument, NULL, C_PLIMIT},
+ {"sysvshm", required_argument, NULL, C_IPCSHM},
+ {"sysvsem", required_argument, NULL, C_IPCSEM},
+ {"sysvmsq", required_argument, NULL, C_IPCMSQ},
+ {NULL, 0, NULL, 0}
+ };
- while ((ch = getopt_long(argc, argv, "", longopts, NULL)) != -1)
- {
- switch( ch ) {
+ while ((ch = getopt_long(argc, argv, "", longopts, NULL)) != -1) {
+ switch (ch) {
case C_CTX:
- ctx_id = strtol(optarg,&error,10);
- if( *error != '\0' )
- errx(1,"Error in context identifyer");
+ ctx_id = strtol(optarg, &error, 10);
+ if (*error != '\0')
+ errx(1, "Error in context identifyer");
break;
case C_PLIMIT:
case C_IPCSHM:
@@ -77,7 +74,7 @@
break;
default:
usage();
- errx(100,"Unknow command");
+ errx(100, "Unknow command");
}
}
return (EX_OK);
More information about the p4-projects
mailing list