/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* fiocompress - a utility to compress files with a filesystem.
* Used to build compressed boot archives to reduce memory
* requirements for booting.
*/
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <utility.h>
#include <zlib.h>
#include "message.h"
static void setup_infile(char *);
static void setup_outfile(char *);
static void do_decomp(void);
static int dstfd;
static char *srcfile;
static char *dstfile;
int
{
int compress = 0;
int decompress = 0;
int doioc = 0;
char c;
switch (c) {
case 'm':
doioc++;
break;
case 'c':
if (decompress) {
exit(-1);
}
compress = 1;
break;
case 'd':
if (compress) {
exit(-1);
}
decompress = 1;
break;
case 'b':
exit(-1);
}
break;
case '?':
exit(-1);
}
}
exit(-1);
}
if (decompress)
do_decomp();
else {
if (doioc) {
exit(-1);
}
}
}
return (0);
}
static void
{
int fd;
void *addr;
if (fd == -1) {
exit(-1);
}
exit(-1);
}
if (addr == MAP_FAILED) {
exit(-1);
}
}
static void
{
int fd;
if (fd == -1) {
exit(-1);
}
}
static void
{
void *dstbuf;
int i;
exit(-1);
}
exit(-1);
}
exit(-1);
}
for (i = 0; i < blks; i++) {
int ret;
exit(-1);
}
exit(-1);
}
}
exit(-1);
}
exit(-1);
}
}
static void
{
void *dstbuf;
int i;
int ret;
exit(-1);
}
exit(-1);
}
exit(-1);
}
exit(-1);
}
for (i = 0; i < blks; i++) {
exit(-1);
}
exit(-1);
}
exit(-1);
}
}
exit(-1);
}
exit(-1);
}
}