1235778Sgber/*- 2235778Sgber * Copyright (c) 2012 Semihalf. 3235778Sgber * All rights reserved. 4235778Sgber * 5235778Sgber * Redistribution and use in source and binary forms, with or without 6235778Sgber * modification, are permitted provided that the following conditions 7235778Sgber * are met: 8235778Sgber * 1. Redistributions of source code must retain the above copyright 9235778Sgber * notice, this list of conditions and the following disclaimer. 10235778Sgber * 2. Redistributions in binary form must reproduce the above copyright 11235778Sgber * notice, this list of conditions and the following disclaimer in the 12235778Sgber * documentation and/or other materials provided with the distribution. 13235778Sgber * 14235778Sgber * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15235778Sgber * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16235778Sgber * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17235778Sgber * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18235778Sgber * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19235778Sgber * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20235778Sgber * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21235778Sgber * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22235778Sgber * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23235778Sgber * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24235778Sgber * SUCH DAMAGE. 25235778Sgber * 26235778Sgber * $FreeBSD$ 27235778Sgber */ 28235778Sgber 29235778Sgber#ifndef _FLASH_SLICER_H_ 30235778Sgber#define _FLASH_SLICER_H_ 31235778Sgber 32235778Sgber#include <sys/types.h> 33235778Sgber 34235778Sgber#define FLASH_SLICES_MAX_NUM 8 35235778Sgber#define FLASH_SLICES_MAX_NAME_LEN (32 + 1) 36235778Sgber 37235778Sgber#define FLASH_SLICES_FLAG_NONE 0 38235778Sgber#define FLASH_SLICES_FLAG_RO 1 /* Read only */ 39235778Sgber 40235778Sgberstruct flash_slice { 41235778Sgber off_t base; 42235778Sgber off_t size; 43235778Sgber char *label; 44235778Sgber unsigned int flags; 45235778Sgber}; 46235778Sgber 47235778Sgber#ifdef _KERNEL 48235778Sgberint flash_fill_slices(device_t, struct flash_slice *, int *); 49235778Sgber#endif /* _KERNEL */ 50235778Sgber 51235778Sgber#endif /* _FLASH_SLICER_H_ */ 52