raw.c revision 265625
1177663Sdfr/*-
2177663Sdfr * Copyright (c) 2014 Juniper Networks, Inc.
3177663Sdfr * All rights reserved.
4177663Sdfr *
5177663Sdfr * Redistribution and use in source and binary forms, with or without
6180025Sdfr * modification, are permitted provided that the following conditions
7177663Sdfr * are met:
8177663Sdfr * 1. Redistributions of source code must retain the above copyright
9177663Sdfr *    notice, this list of conditions and the following disclaimer.
10177663Sdfr * 2. Redistributions in binary form must reproduce the above copyright
11177663Sdfr *    notice, this list of conditions and the following disclaimer in the
12177663Sdfr *    documentation and/or other materials provided with the distribution.
13181040Sps *
14177663Sdfr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15177663Sdfr * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16177663Sdfr * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17177663Sdfr * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18177663Sdfr * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19177663Sdfr * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20177663Sdfr * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21177663Sdfr * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22177663Sdfr * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23177663Sdfr * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24177663Sdfr * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: user/marcel/mkimg/raw.c 265625 2014-05-08 01:13:18Z marcel $");
29
30#include <sys/types.h>
31#include <sys/apm.h>
32#include <sys/endian.h>
33#include <sys/errno.h>
34#include <stdlib.h>
35#include <string.h>
36#include <unistd.h>
37
38#include "format.h"
39#include "image.h"
40#include "mkimg.h"
41
42static int
43raw_write(int fd __unused)
44{
45
46	return (ENOSYS);
47}
48
49static struct mkimg_format raw_format = {
50	.name = "raw",
51	.description = "Raw Disk",
52	.write = raw_write,
53};
54
55FORMAT_DEFINE(raw_format);
56