1303095Ssobomax/* 2303095Ssobomax * Copyright (c) 2004-2016 Maxim Sobolev <sobomax@FreeBSD.org> 3303095Ssobomax * Copyright (c) 2011 Aleksandr Rybalko <ray@ddteam.net> 4303095Ssobomax * All rights reserved. 5303095Ssobomax * 6303095Ssobomax * Redistribution and use in source and binary forms, with or without 7303095Ssobomax * modification, are permitted provided that the following conditions 8303095Ssobomax * are met: 9303095Ssobomax * 1. Redistributions of source code must retain the above copyright 10303095Ssobomax * notice, this list of conditions and the following disclaimer. 11303095Ssobomax * 2. Redistributions in binary form must reproduce the above copyright 12303095Ssobomax * notice, this list of conditions and the following disclaimer in the 13303095Ssobomax * documentation and/or other materials provided with the distribution. 14303095Ssobomax * 15303095Ssobomax * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16303095Ssobomax * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17303095Ssobomax * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18303095Ssobomax * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19303095Ssobomax * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20303095Ssobomax * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21303095Ssobomax * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22303095Ssobomax * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23303095Ssobomax * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24303095Ssobomax * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25303095Ssobomax * SUCH DAMAGE. 26303095Ssobomax * 27303095Ssobomax * $FreeBSD$ 28303095Ssobomax */ 29303095Ssobomax 30303095Ssobomax/* Format L3.0, since we move to XZ API */ 31303095Ssobomax#define CLOOP_MAGIC_LZMA \ 32303095Ssobomax "#!/bin/sh\n" \ 33303095Ssobomax "#L3.0\n" \ 34303095Ssobomax "n=uncompress\n" \ 35303095Ssobomax "m=geom_$n\n" \ 36303095Ssobomax "(kldstat -m $m 2>&-||kldload $m)>&-&&" \ 37303095Ssobomax "mount_cd9660 /dev/`mdconfig -af $0`.$n $1\n" \ 38303095Ssobomax "exit $?\n" 39303095Ssobomax#define DEFAULT_SUFX_LZMA ".ulzma" 40303095Ssobomax 41303095Ssobomaxvoid *mkuz_lzma_init(uint32_t); 42303095Ssobomaxstruct mkuz_blk *mkuz_lzma_compress(void *, const struct mkuz_blk *); 43