Deleted Added
full compact
ccdconfig.c (50476) ccdconfig.c (51690)
1/* $NetBSD: ccdconfig.c,v 1.2.2.1 1995/11/11 02:43:35 thorpej Exp $ */
2
3/*
4 * Copyright (c) 1995 Jason R. Thorpe.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 20 unchanged lines hidden (view full) ---

29 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 */
34
35#ifndef lint
36static const char rcsid[] =
1/* $NetBSD: ccdconfig.c,v 1.2.2.1 1995/11/11 02:43:35 thorpej Exp $ */
2
3/*
4 * Copyright (c) 1995 Jason R. Thorpe.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 20 unchanged lines hidden (view full) ---

29 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 */
34
35#ifndef lint
36static const char rcsid[] =
37 "$FreeBSD: head/sbin/ccdconfig/ccdconfig.c 50476 1999-08-28 00:22:10Z peter $";
37 "$FreeBSD: head/sbin/ccdconfig/ccdconfig.c 51690 1999-09-26 21:37:46Z billf $";
38#endif /* not lint */
39
40#include <sys/param.h>
41#include <sys/linker.h>
42#include <sys/disklabel.h>
43#include <sys/device.h>
44#include <sys/stat.h>
45#include <sys/module.h>

--- 153 unchanged lines hidden (view full) ---

199static int
200do_single(argc, argv, action)
201 int argc;
202 char **argv;
203 int action;
204{
205 struct ccd_ioctl ccio;
206 char *ccd, *cp, *cp2, **disks;
38#endif /* not lint */
39
40#include <sys/param.h>
41#include <sys/linker.h>
42#include <sys/disklabel.h>
43#include <sys/device.h>
44#include <sys/stat.h>
45#include <sys/module.h>

--- 153 unchanged lines hidden (view full) ---

199static int
200do_single(argc, argv, action)
201 int argc;
202 char **argv;
203 int action;
204{
205 struct ccd_ioctl ccio;
206 char *ccd, *cp, *cp2, **disks;
207 int noflags = 0, i, ileave, flags, j;
207 int noflags = 0, i, ileave, flags = 0, j;
208
209 bzero(&ccio, sizeof(ccio));
210
211 /*
212 * If unconfiguring, all arguments are treated as ccds.
213 */
214 if (action == CCD_UNCONFIG || action == CCD_UNCONFIGALL) {
215 for (i = 0; argc != 0; ) {

--- 106 unchanged lines hidden (view full) ---

322 int action;
323{
324 FILE *f;
325 char line[_POSIX2_LINE_MAX];
326 char *cp, **argv;
327 int argc, rval;
328 gid_t egid;
329
208
209 bzero(&ccio, sizeof(ccio));
210
211 /*
212 * If unconfiguring, all arguments are treated as ccds.
213 */
214 if (action == CCD_UNCONFIG || action == CCD_UNCONFIGALL) {
215 for (i = 0; argc != 0; ) {

--- 106 unchanged lines hidden (view full) ---

322 int action;
323{
324 FILE *f;
325 char line[_POSIX2_LINE_MAX];
326 char *cp, **argv;
327 int argc, rval;
328 gid_t egid;
329
330 rval = 0;
330 egid = getegid();
331 setegid(getgid());
332 if ((f = fopen(ccdconf, "r")) == NULL) {
333 setegid(egid);
334 warn("fopen: %s", ccdconf);
335 return (1);
336 }
337 setegid(egid);

--- 395 unchanged lines hidden ---
331 egid = getegid();
332 setegid(getgid());
333 if ((f = fopen(ccdconf, "r")) == NULL) {
334 setegid(egid);
335 warn("fopen: %s", ccdconf);
336 return (1);
337 }
338 setegid(egid);

--- 395 unchanged lines hidden ---