From owner-p4-projects@FreeBSD.ORG Mon Jun 19 06:58:17 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7C97616A47D; Mon, 19 Jun 2006 06:58:17 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 39CDB16A474 for ; Mon, 19 Jun 2006 06:58:17 +0000 (UTC) (envelope-from als@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF39943D46 for ; Mon, 19 Jun 2006 06:58:16 +0000 (GMT) (envelope-from als@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k5J6wGpW022735 for ; Mon, 19 Jun 2006 06:58:16 GMT (envelope-from als@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k5J6wGT1022732 for perforce@freebsd.org; Mon, 19 Jun 2006 06:58:16 GMT (envelope-from als@FreeBSD.org) Date: Mon, 19 Jun 2006 06:58:16 GMT Message-Id: <200606190658.k5J6wGT1022732@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to als@FreeBSD.org using -f From: Alex Lyashkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 99586 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2006 06:58:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=99586 Change 99586 by als@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 __FBSDID("$FreeBSD$"); @@ -13,7 +12,6 @@ #include #include - 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);