13077Sache/*
23077Sache * Copyright (C) 1994 by Andrew A. Chernov, Moscow, Russia.
33077Sache * All rights reserved.
43077Sache *
53077Sache * Redistribution and use in source and binary forms, with or without
63077Sache * modification, are permitted provided that the following conditions
73077Sache * are met:
83077Sache * 1. Redistributions of source code must retain the above copyright
93077Sache *    notice, this list of conditions and the following disclaimer.
103077Sache * 2. Redistributions in binary form must reproduce the above copyright
113077Sache *    notice, this list of conditions and the following disclaimer in the
123077Sache *    documentation and/or other materials provided with the distribution.
133077Sache *
143077Sache * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
153077Sache * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
163077Sache * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
173077Sache * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
183077Sache * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
193077Sache * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
203077Sache * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
213077Sache * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
223077Sache * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
233077Sache * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
243077Sache * SUCH DAMAGE.
2566834Sphk *
2666834Sphk * $FreeBSD$
273077Sache */
283077Sache
293077Sache#include <sys/ioctl.h>
3066834Sphk#include <sys/consio.h>
313077Sache#include <stdio.h>
323077Sache
333077Sache#include FIL
343077Sache
353077Sacheint main(int argc, char **argv)
363077Sache{
373077Sache	FILE *fd;
383077Sache
393077Sache	if (argc == 2) {
403077Sache		if ((fd = fopen(argv[1], "w")) == NULL) {
413077Sache			perror(argv[1]);
423077Sache			return 1;
433077Sache		}
443077Sache		fwrite(&scrmap, sizeof(scrmap_t), 1, fd);
453077Sache		fclose(fd);
463077Sache		return 0;
473077Sache	}
483077Sache	else {
493077Sache		fprintf(stderr, "usage: %s <mapfile>\n", argv[0]);
503077Sache		return 1;
513077Sache	}
523077Sache}
53