\hypertarget{geom__redboot_8c_source}{}\doxysection{geom\+\_\+redboot.\+c}
\label{geom__redboot_8c_source}\index{geom/geom\_redboot.c@{geom/geom\_redboot.c}}
\mbox{\hyperlink{geom__redboot_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2009 Sam Leffler, Errno Consulting}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer,}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00012}00012 \textcolor{comment}{ *    without modification.}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00013}00013 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce at minimum a disclaimer}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00014}00014 \textcolor{comment}{ *    similar to the "{}NO WARRANTY"{} disclaimer below ("{}Disclaimer"{}) and any}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00015}00015 \textcolor{comment}{ *    redistribution must be conditioned upon including a substantially}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00016}00016 \textcolor{comment}{ *    similar Disclaimer requirement for further binary redistribution.}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00017}00017 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00018}00018 \textcolor{comment}{ * NO WARRANTY}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00019}00019 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00020}00020 \textcolor{comment}{ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00021}00021 \textcolor{comment}{ * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00022}00022 \textcolor{comment}{ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00023}00023 \textcolor{comment}{ * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY,}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00024}00024 \textcolor{comment}{ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00025}00025 \textcolor{comment}{ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00026}00026 \textcolor{comment}{ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00027}00027 \textcolor{comment}{ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00028}00028 \textcolor{comment}{ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00029}00029 \textcolor{comment}{ * THE POSSIBILITY OF SUCH DAMAGES.}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00030}00030 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00033}\mbox{\hyperlink{geom__redboot_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00033}} \mbox{\hyperlink{geom__redboot_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00034}00034 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/errno.h>}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/endian.h>}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/fcntl.h>}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/bio.h>}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00046}00046 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/sbuf.h>}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom_8h}{geom/geom.h}}>}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom__slice_8h}{geom/geom\_slice.h}}>}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00050}00050 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00051}\mbox{\hyperlink{geom__redboot_8c_a0c69483bb7ee99a7b6a20210b78caf15}{00051}} \textcolor{preprocessor}{\#define REDBOOT\_CLASS\_NAME "{}REDBOOT"{}}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00052}00052 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00053}\mbox{\hyperlink{structfis__image__desc}{00053}} \textcolor{keyword}{struct }\mbox{\hyperlink{structfis__image__desc}{fis\_image\_desc}} \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00054}\mbox{\hyperlink{structfis__image__desc_a2670ab5df06a38ae2f9c0d1d82100acd}{00054}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structfis__image__desc_a2670ab5df06a38ae2f9c0d1d82100acd}{name}}[16];   \textcolor{comment}{/* null-\/terminated name */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00055}\mbox{\hyperlink{structfis__image__desc_a5b8f3fce46a57fbceca2787641dfd3f3}{00055}}         uint32\_t        \mbox{\hyperlink{structfis__image__desc_a5b8f3fce46a57fbceca2787641dfd3f3}{offset}};           \textcolor{comment}{/* offset in flash */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00056}\mbox{\hyperlink{structfis__image__desc_a4b6ee910cc4fb3f2e02caa9ec63170eb}{00056}}         uint32\_t        \mbox{\hyperlink{structfis__image__desc_a4b6ee910cc4fb3f2e02caa9ec63170eb}{addr}};               \textcolor{comment}{/* address in memory */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00057}\mbox{\hyperlink{structfis__image__desc_aa8405b14c80d0c481605597a124ea665}{00057}}         uint32\_t        \mbox{\hyperlink{structfis__image__desc_aa8405b14c80d0c481605597a124ea665}{size}};               \textcolor{comment}{/* image size in bytes */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00058}\mbox{\hyperlink{structfis__image__desc_aa3e77277c3f1775d04339697f4160af3}{00058}}         uint32\_t        \mbox{\hyperlink{structfis__image__desc_aa3e77277c3f1775d04339697f4160af3}{entry}};             \textcolor{comment}{/* offset in image for entry point */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00059}\mbox{\hyperlink{structfis__image__desc_aa8b784277ff009cc6d4f57105f5c3bf4}{00059}}         uint32\_t        \mbox{\hyperlink{structfis__image__desc_aa8b784277ff009cc6d4f57105f5c3bf4}{dsize}};             \textcolor{comment}{/* data size in bytes */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00060}\mbox{\hyperlink{structfis__image__desc_a399b54175887342bac2fed50a0abfc3b}{00060}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structfis__image__desc_a399b54175887342bac2fed50a0abfc3b}{pad}}[256-\/(16+7*\textcolor{keyword}{sizeof}(uint32\_t)+\textcolor{keyword}{sizeof}(\textcolor{keywordtype}{void}*))];}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00061}\mbox{\hyperlink{structfis__image__desc_a90f0fa6b46bde21d13b6dc18635e9b05}{00061}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structfis__image__desc}{fis\_image\_desc}} *\mbox{\hyperlink{structfis__image__desc_a90f0fa6b46bde21d13b6dc18635e9b05}{next}};  \textcolor{comment}{/* linked list (in memory) */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00062}\mbox{\hyperlink{structfis__image__desc_a5dcb23d21b0dd7f22ad483b69cf27b5e}{00062}}         uint32\_t        \mbox{\hyperlink{structfis__image__desc_a5dcb23d21b0dd7f22ad483b69cf27b5e}{dsum}};               \textcolor{comment}{/* descriptor checksum */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00063}\mbox{\hyperlink{structfis__image__desc_a4a2408683e7cc3401a6df71c6759768e}{00063}}         uint32\_t        \mbox{\hyperlink{structfis__image__desc_a4a2408683e7cc3401a6df71c6759768e}{fsum}};               \textcolor{comment}{/* checksum over image data */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00064}00064 \};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00065}00065 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00066}\mbox{\hyperlink{geom__redboot_8c_a380fd79de8746ac5b88a8a808e6933f4}{00066}} \textcolor{preprocessor}{\#define FISDIR\_NAME     "{}FIS directory"{}}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00067}\mbox{\hyperlink{geom__redboot_8c_a26c8868ca005463d37cb034ae1036829}{00067}} \textcolor{preprocessor}{\#define REDBCFG\_NAME    "{}RedBoot config"{}}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00068}\mbox{\hyperlink{geom__redboot_8c_a14ea5aad3984fb3cc86f4bcb5568af82}{00068}} \textcolor{preprocessor}{\#define REDBOOT\_NAME    "{}RedBoot"{}}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00070}\mbox{\hyperlink{geom__redboot_8c_aeb5d5c3e3801d3a5e21b3386e9bf4f4d}{00070}} \textcolor{preprocessor}{\#define REDBOOT\_MAXSLICE        64}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00071}\mbox{\hyperlink{geom__redboot_8c_abe57da0841d380b73e38aec81c581d7d}{00071}} \textcolor{preprocessor}{\#define REDBOOT\_MAXOFF \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00072}00072 \textcolor{preprocessor}{        (REDBOOT\_MAXSLICE*sizeof(struct fis\_image\_desc))}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00074}\mbox{\hyperlink{structg__redboot__softc}{00074}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__redboot__softc}{g\_redboot\_softc}} \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00075}\mbox{\hyperlink{structg__redboot__softc_aabf8dc1900763df12d35cb7db4989a41}{00075}}         uint32\_t        \mbox{\hyperlink{structg__redboot__softc_aabf8dc1900763df12d35cb7db4989a41}{entry}}[\mbox{\hyperlink{geom__redboot_8c_aeb5d5c3e3801d3a5e21b3386e9bf4f4d}{REDBOOT\_MAXSLICE}}];}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00076}\mbox{\hyperlink{structg__redboot__softc_a0a804efce8e462349c70f7f0e17bb04b}{00076}}         uint32\_t        \mbox{\hyperlink{structg__redboot__softc_a0a804efce8e462349c70f7f0e17bb04b}{dsize}}[\mbox{\hyperlink{geom__redboot_8c_aeb5d5c3e3801d3a5e21b3386e9bf4f4d}{REDBOOT\_MAXSLICE}}];}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00077}\mbox{\hyperlink{structg__redboot__softc_affaefc54be50853febda18bb7673fc15}{00077}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structg__redboot__softc_affaefc54be50853febda18bb7673fc15}{readonly}}[\mbox{\hyperlink{geom__redboot_8c_aeb5d5c3e3801d3a5e21b3386e9bf4f4d}{REDBOOT\_MAXSLICE}}];}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00078}\mbox{\hyperlink{structg__redboot__softc_a5add234e363bbe61b25e62d29257bf8a}{00078}}         \mbox{\hyperlink{geom_8h_a68544c65a4d728ce733305aeba2f335b}{g\_access\_t}}    *\mbox{\hyperlink{structg__redboot__softc_a5add234e363bbe61b25e62d29257bf8a}{parent\_access}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00079}00079 \};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00080}00080 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00081}00081 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00082}\mbox{\hyperlink{geom__redboot_8c_aaae2ee8fb21642602dd0e5fb931ed7c2}{00082}} \mbox{\hyperlink{geom__redboot_8c_aaae2ee8fb21642602dd0e5fb931ed7c2}{g\_redboot\_print}}(\textcolor{keywordtype}{int} i, \textcolor{keyword}{struct} \mbox{\hyperlink{structfis__image__desc}{fis\_image\_desc}} *fd)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00083}00083 \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00084}00084 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00085}00085         printf(\textcolor{stringliteral}{"{}[\%2d] \(\backslash\)"{}\%-\/15.15s\(\backslash\)"{} \%08x:\%08x"{}}, i, fd-\/>\mbox{\hyperlink{structfis__image__desc_a2670ab5df06a38ae2f9c0d1d82100acd}{name}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00086}00086             fd-\/>\mbox{\hyperlink{structfis__image__desc_a5b8f3fce46a57fbceca2787641dfd3f3}{offset}}, fd-\/>\mbox{\hyperlink{structfis__image__desc_aa8405b14c80d0c481605597a124ea665}{size}});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00087}00087         printf(\textcolor{stringliteral}{"{} addr \%08x entry \%08x\(\backslash\)n"{}}, fd-\/>\mbox{\hyperlink{structfis__image__desc_a4b6ee910cc4fb3f2e02caa9ec63170eb}{addr}}, fd-\/>\mbox{\hyperlink{structfis__image__desc_aa3e77277c3f1775d04339697f4160af3}{entry}});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00088}00088         printf(\textcolor{stringliteral}{"{}     dsize 0x\%x dsum 0x\%x fsum 0x\%x\(\backslash\)n"{}}, fd-\/>\mbox{\hyperlink{structfis__image__desc_aa8b784277ff009cc6d4f57105f5c3bf4}{dsize}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00089}00089             fd-\/>\mbox{\hyperlink{structfis__image__desc_a5dcb23d21b0dd7f22ad483b69cf27b5e}{dsum}}, fd-\/>\mbox{\hyperlink{structfis__image__desc_a4a2408683e7cc3401a6df71c6759768e}{fsum}});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00090}00090 \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00091}00091 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00092}00092 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00093}\mbox{\hyperlink{geom__redboot_8c_ad3494508005921f2956f8b99199203aa}{00093}} \mbox{\hyperlink{geom__redboot_8c_ad3494508005921f2956f8b99199203aa}{g\_redboot\_ioctl}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, u\_long \mbox{\hyperlink{g__part__if_8m_ab932f62e09484cd3ce109f3db9d8f3ce}{cmd}}, \textcolor{keywordtype}{void} *\mbox{\hyperlink{g__part__if_8m_a735984d41155bc1032e09bece8f8d66d}{data}}, \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__if_8m_aab9e30d72b4b6af02ce19b24422ad2ce}{fflag}}, \textcolor{keyword}{struct} thread *\mbox{\hyperlink{g__part__if_8m_aaf840c84d139bb8ad4b3e668c92b3c30}{td}})}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00094}00094 \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00095}00095         \textcolor{keywordflow}{return} (ENOIOCTL);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00096}00096 \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00097}00097 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00098}00098 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00099}\mbox{\hyperlink{geom__redboot_8c_a231f568a2181fb212bfcc2aff2b32c09}{00099}} \mbox{\hyperlink{geom__redboot_8c_a231f568a2181fb212bfcc2aff2b32c09}{g\_redboot\_access}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \textcolor{keywordtype}{int} dread, \textcolor{keywordtype}{int} dwrite, \textcolor{keywordtype}{int} dexcl)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00100}00100 \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00101}00101         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_afe5c92b8a2a9e4cdf1cab6daa96923c1}{geom}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00102}00102         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__slicer}{g\_slicer}} *gsp = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00103}00103         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__redboot__softc}{g\_redboot\_softc}} *sc = gsp-\/>\mbox{\hyperlink{structg__slicer_aa87a1eddcf05b70ee032fed3e1309e36}{softc}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00104}00104 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00105}00105         \textcolor{keywordflow}{if} (dwrite > 0 \&\& sc-\/>\mbox{\hyperlink{structg__redboot__softc_affaefc54be50853febda18bb7673fc15}{readonly}}[\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_af66d4470c5f372fdc0f71d66a65542be}{index}}])}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00106}00106                 \textcolor{keywordflow}{return} (EPERM);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00107}00107         \textcolor{keywordflow}{return} (sc-\/>\mbox{\hyperlink{structg__redboot__softc_a5add234e363bbe61b25e62d29257bf8a}{parent\_access}}(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, dread, dwrite, dexcl));}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00108}00108 \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00109}00109 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00110}00110 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00111}\mbox{\hyperlink{geom__redboot_8c_a461918e3ebbee56f6f379b43a1b94101}{00111}} \mbox{\hyperlink{geom__redboot_8c_a461918e3ebbee56f6f379b43a1b94101}{g\_redboot\_start}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}})}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00112}00112 \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00113}00113         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00114}00114         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00115}00115         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__redboot__softc}{g\_redboot\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00116}00116         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__slicer}{g\_slicer}} *gsp;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00117}00117         \textcolor{keywordtype}{int} idx;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00118}00118 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00119}00119         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_to;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00120}00120         idx = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_af66d4470c5f372fdc0f71d66a65542be}{index}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00121}00121         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_afe5c92b8a2a9e4cdf1cab6daa96923c1}{geom}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00122}00122         gsp = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00123}00123         sc = gsp-\/>\mbox{\hyperlink{structg__slicer_aa87a1eddcf05b70ee032fed3e1309e36}{softc}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00124}00124         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}-\/>bio\_cmd == BIO\_GETATTR) \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00125}00125                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom_8h_a1101b455c1a4dd4d75b17628d8196ddd}{g\_handleattr\_int}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \mbox{\hyperlink{geom__redboot_8c_a0c69483bb7ee99a7b6a20210b78caf15}{REDBOOT\_CLASS\_NAME}} \textcolor{stringliteral}{"{}::entry"{}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00126}00126                     sc-\/>\mbox{\hyperlink{structg__redboot__softc_aabf8dc1900763df12d35cb7db4989a41}{entry}}[idx]))}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00127}00127                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00128}00128                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom_8h_a1101b455c1a4dd4d75b17628d8196ddd}{g\_handleattr\_int}}(\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}}, \mbox{\hyperlink{geom__redboot_8c_a0c69483bb7ee99a7b6a20210b78caf15}{REDBOOT\_CLASS\_NAME}} \textcolor{stringliteral}{"{}::dsize"{}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00129}00129                     sc-\/>\mbox{\hyperlink{structg__redboot__softc_a0a804efce8e462349c70f7f0e17bb04b}{dsize}}[idx]))}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00130}00130                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00131}00131         \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00132}00132 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00133}00133         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00134}00134 \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00135}00135 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00136}00136 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00137}\mbox{\hyperlink{geom__redboot_8c_afef12e578a7e1da0d2411eb4f75c7bef}{00137}} \mbox{\hyperlink{geom__redboot_8c_afef12e578a7e1da0d2411eb4f75c7bef}{g\_redboot\_dumpconf}}(\textcolor{keyword}{struct} sbuf *\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00138}00138         \textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} \_\_unused, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}})}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00139}00139 \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00140}00140         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__redboot__softc}{g\_redboot\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00141}00141         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__slicer}{g\_slicer}} *gsp;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00142}00142 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00143}00143         gsp = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00144}00144         sc = gsp-\/>\mbox{\hyperlink{structg__slicer_aa87a1eddcf05b70ee032fed3e1309e36}{softc}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00145}00145         \mbox{\hyperlink{geom__slice_8h_ad80d90608e158b515d28461eb9e80af4}{g\_slice\_dumpconf}}(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}}, \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00146}00146         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00147}00147                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00148}00148                         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{} entry \%d"{}}, sc-\/>\mbox{\hyperlink{structg__redboot__softc_aabf8dc1900763df12d35cb7db4989a41}{entry}}[\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_af66d4470c5f372fdc0f71d66a65542be}{index}}]);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00149}00149                         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{} dsize \%d"{}}, sc-\/>\mbox{\hyperlink{structg__redboot__softc_a0a804efce8e462349c70f7f0e17bb04b}{dsize}}[\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_af66d4470c5f372fdc0f71d66a65542be}{index}}]);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00150}00150                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00151}00151                         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<entry>\%d</entry>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00152}00152                             sc-\/>\mbox{\hyperlink{structg__redboot__softc_aabf8dc1900763df12d35cb7db4989a41}{entry}}[\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_af66d4470c5f372fdc0f71d66a65542be}{index}}]);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00153}00153                         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<dsize>\%d</dsize>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00154}00154                             sc-\/>\mbox{\hyperlink{structg__redboot__softc_a0a804efce8e462349c70f7f0e17bb04b}{dsize}}[\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_af66d4470c5f372fdc0f71d66a65542be}{index}}]);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00155}00155                 \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00156}00156         \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00157}00157 \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00158}00158 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00159}00159 \textcolor{preprocessor}{\#include <sys/ctype.h>}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00160}00160 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00161}00161 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00162}\mbox{\hyperlink{geom__redboot_8c_a932bda3a851b9894edbdb7965ef8e74c}{00162}} \mbox{\hyperlink{geom__redboot_8c_a932bda3a851b9894edbdb7965ef8e74c}{nameok}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char} \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}[16])}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00163}00163 \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00164}00164         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00165}00165 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00166}00166         \textcolor{comment}{/* descriptor names are null-\/terminated printable ascii */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00167}00167         \textcolor{keywordflow}{for} (i = 0; i < 15; i++)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00168}00168                 \textcolor{keywordflow}{if} (!isprint(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}[i]))}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00169}00169                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00170}00170         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}[i] == \textcolor{charliteral}{'\(\backslash\)0'});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00171}00171 \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00172}00172 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00173}00173 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structfis__image__desc}{fis\_image\_desc}} *}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00174}\mbox{\hyperlink{geom__redboot_8c_ab0872d4f7cd65c8141fe01ac0f35669e}{00174}} \mbox{\hyperlink{geom__redboot_8c_ab0872d4f7cd65c8141fe01ac0f35669e}{parse\_fis\_directory}}(u\_char *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{keywordtype}{size\_t} bufsize, off\_t \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}}, uint32\_t offmask)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00175}00175 \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00176}00176 \textcolor{preprocessor}{\#define match(a,b)      (bcmp(a, b, sizeof(b)-\/1) == 0)}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00177}00177         \textcolor{keyword}{struct }\mbox{\hyperlink{structfis__image__desc}{fis\_image\_desc}} *fd, *efd;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00178}00178         \textcolor{keyword}{struct }\mbox{\hyperlink{structfis__image__desc}{fis\_image\_desc}} *fisdir, *redbcfg;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00179}00179         \textcolor{keyword}{struct }\mbox{\hyperlink{structfis__image__desc}{fis\_image\_desc}} *head, **tail;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00180}00180         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00181}00181 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00182}00182         fd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structfis__image__desc}{fis\_image\_desc}} *)\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00183}00183         efd = fd + (bufsize / \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structfis__image__desc}{fis\_image\_desc}}));}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00184}00184 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00185}00185         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00186}00186 \textcolor{comment}{         * Find the start of the FIS table.}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00187}00187 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00188}00188         \textcolor{keywordflow}{while} (fd < efd \&\& fd-\/>\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}[0] != 0xff)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00189}00189                 fd++;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00190}00190         \textcolor{keywordflow}{if} (fd == efd)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00191}00191                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00192}00192         \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00193}00193                 printf(\textcolor{stringliteral}{"{}RedBoot FIS table starts at 0x\%jx\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00194}00194                     \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} + fd -\/ (\textcolor{keyword}{struct} \mbox{\hyperlink{structfis__image__desc}{fis\_image\_desc}} *) \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00195}00195 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00196}00196         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00197}00197 \textcolor{comment}{         * Scan forward collecting entries in a list.}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00198}00198 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00199}00199         fisdir = redbcfg = NULL;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00200}00200         *(tail = \&head) = NULL;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00201}00201         \textcolor{keywordflow}{for} (i = 0; fd < efd; i++, fd++) \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00202}00202                 \textcolor{keywordflow}{if} (fd-\/>\mbox{\hyperlink{structfis__image__desc_a2670ab5df06a38ae2f9c0d1d82100acd}{name}}[0] == 0xff)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00203}00203                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00204}00204                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom__redboot_8c_a124cc6b43c021df44d8f68d4060e27cd}{match}}(fd-\/>\mbox{\hyperlink{structfis__image__desc_a2670ab5df06a38ae2f9c0d1d82100acd}{name}}, \mbox{\hyperlink{geom__redboot_8c_a380fd79de8746ac5b88a8a808e6933f4}{FISDIR\_NAME}}))}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00205}00205                         fisdir = fd;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00206}00206                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom__redboot_8c_a124cc6b43c021df44d8f68d4060e27cd}{match}}(fd-\/>\mbox{\hyperlink{structfis__image__desc_a2670ab5df06a38ae2f9c0d1d82100acd}{name}}, \mbox{\hyperlink{geom__redboot_8c_a26c8868ca005463d37cb034ae1036829}{REDBCFG\_NAME}}))}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00207}00207                         redbcfg = fd;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00208}00208                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom__redboot_8c_a932bda3a851b9894edbdb7965ef8e74c}{nameok}}(fd-\/>\mbox{\hyperlink{structfis__image__desc_a2670ab5df06a38ae2f9c0d1d82100acd}{name}})) \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00209}00209                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00210}00210 \textcolor{comment}{                         * NB: flash address includes platform mapping;}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00211}00211 \textcolor{comment}{                         *     strip it so we have only a flash offset.}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00212}00212 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00213}00213                         fd-\/>\mbox{\hyperlink{structfis__image__desc_a5b8f3fce46a57fbceca2787641dfd3f3}{offset}} \&= offmask;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00214}00214                         \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00215}00215                                 \mbox{\hyperlink{geom__redboot_8c_aaae2ee8fb21642602dd0e5fb931ed7c2}{g\_redboot\_print}}(i, fd);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00216}00216                         *tail = fd;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00217}00217                         *(tail = \&fd-\/>\mbox{\hyperlink{structfis__image__desc_a90f0fa6b46bde21d13b6dc18635e9b05}{next}}) = NULL;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00218}00218                 \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00219}00219         \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00220}00220         \textcolor{keywordflow}{if} (fisdir == NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00221}00221                 \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00222}00222                         printf(\textcolor{stringliteral}{"{}No RedBoot FIS table located at \%lu\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00223}00223                             (\textcolor{keywordtype}{long}) \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00224}00224                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00225}00225         \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00226}00226         \textcolor{keywordflow}{if} (redbcfg != NULL \&\&}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00227}00227             fisdir-\/>\mbox{\hyperlink{structfis__image__desc_a5b8f3fce46a57fbceca2787641dfd3f3}{offset}} + fisdir-\/>\mbox{\hyperlink{structfis__image__desc_aa8405b14c80d0c481605597a124ea665}{size}} == redbcfg-\/>\mbox{\hyperlink{structfis__image__desc_a5b8f3fce46a57fbceca2787641dfd3f3}{offset}}) \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00228}00228                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00229}00229 \textcolor{comment}{                 * Merged FIS/RedBoot config directory.}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00230}00230 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00231}00231                 \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00232}00232                         printf(\textcolor{stringliteral}{"{}FIS/RedBoot merged at 0x\%jx (not yet)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00233}00233                             \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} + fisdir-\/>\mbox{\hyperlink{structfis__image__desc_a5b8f3fce46a57fbceca2787641dfd3f3}{offset}});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00234}00234                 \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00235}00235         \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00236}00236         \textcolor{keywordflow}{return} head;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00237}00237 \textcolor{preprocessor}{\#undef match}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00238}00238 \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00239}00239 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00240}00240 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00241}\mbox{\hyperlink{geom__redboot_8c_abb675df83dbb45230e5a7ab05d8eee70}{00241}} \mbox{\hyperlink{geom__redboot_8c_abb675df83dbb45230e5a7ab05d8eee70}{g\_redboot\_taste}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \textcolor{keywordtype}{int} insist)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00242}00242 \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00243}00243         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00244}00244         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00245}00245         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__redboot__softc}{g\_redboot\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00246}00246         \textcolor{keywordtype}{int} error, sectorsize, i;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00247}00247         \textcolor{keyword}{struct }\mbox{\hyperlink{structfis__image__desc}{fis\_image\_desc}} *fd, *head;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00248}00248         uint32\_t offmask;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00249}00249         off\_t blksize;          \textcolor{comment}{/* NB: flash block size stored as stripesize */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00250}00250         u\_char *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00251}00251         off\_t \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00252}00252         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *value;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00253}00253         \textcolor{keywordtype}{char} *op;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00254}00254 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00255}00255         \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} = 0;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00256}00256         \textcolor{keywordflow}{if} (resource\_string\_value(\textcolor{stringliteral}{"{}redboot"{}}, 0, \textcolor{stringliteral}{"{}fisoffset"{}}, \&value) == 0) \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00257}00257                 \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} = strtouq(value, \&op, 0);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00258}00258                 \textcolor{keywordflow}{if} (*op != \textcolor{charliteral}{'\(\backslash\)0'}) \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00259}00259                         \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} = 0;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00260}00260                 \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00261}00261         \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00262}00262 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00263}00263         \mbox{\hyperlink{geom_8h_a7588d7ea7fbf7180b345df84b8797166}{g\_trace}}(\mbox{\hyperlink{geom_8h_a7f1804ff1a11f763a1ab5bdbd3e1287c}{G\_T\_TOPOLOGY}}, \textcolor{stringliteral}{"{}redboot\_taste(\%s,\%s)"{}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>\mbox{\hyperlink{structg__class_a66bf8381cf0afbf7ccdebfa6b90a4a96}{name}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00264}00264         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00265}00265         \textcolor{keywordflow}{if} (!strcmp(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_afe5c92b8a2a9e4cdf1cab6daa96923c1}{geom}}-\/>\mbox{\hyperlink{structg__geom_a502c2ffb3c41ad9d30d9875c678f5404}{class}}-\/>\mbox{\hyperlink{structg__class_a66bf8381cf0afbf7ccdebfa6b90a4a96}{name}}, \mbox{\hyperlink{geom__redboot_8c_a0c69483bb7ee99a7b6a20210b78caf15}{REDBOOT\_CLASS\_NAME}}))}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00266}00266                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00267}00267         \textcolor{comment}{/* XXX only taste flash providers */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00268}00268         \textcolor{keywordflow}{if} (strncmp(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \textcolor{stringliteral}{"{}cfi"{}}, 3) \&\& }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00269}00269             strncmp(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \textcolor{stringliteral}{"{}flash/spi"{}}, 9))}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00270}00270                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00271}00271         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{geom__slice_8c_aaf1282e05964a6882971c6eca3e1604b}{g\_slice\_new}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \mbox{\hyperlink{geom__redboot_8c_aeb5d5c3e3801d3a5e21b3386e9bf4f4d}{REDBOOT\_MAXSLICE}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \&\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \&sc, \textcolor{keyword}{sizeof}(*sc),}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00272}00272             \mbox{\hyperlink{geom__redboot_8c_a461918e3ebbee56f6f379b43a1b94101}{g\_redboot\_start}});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00273}00273         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} == NULL)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00274}00274                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00275}00275         \textcolor{comment}{/* interpose our access method */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00276}00276         sc-\/>\mbox{\hyperlink{structg__redboot__softc_a5add234e363bbe61b25e62d29257bf8a}{parent\_access}} = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aea05083928dcabdb4d343c6b9ee71cbd}{access}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00277}00277         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aea05083928dcabdb4d343c6b9ee71cbd}{access}} = \mbox{\hyperlink{geom__redboot_8c_a231f568a2181fb212bfcc2aff2b32c09}{g\_redboot\_access}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00278}00278 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00279}00279         sectorsize = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00280}00280         blksize = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a0ae62d15d2436a80825accbdb3cd6149}{stripesize}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00281}00281         \textcolor{keywordflow}{if} (powerof2(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}}))}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00282}00282                 offmask = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}}-\/1;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00283}00283         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00284}00284                 offmask = 0xffffffff;           \textcolor{comment}{/* XXX */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00285}00285         \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00286}00286                 printf(\textcolor{stringliteral}{"{}\%s: mediasize \%ld secsize \%d blksize \%ju offmask 0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00287}00287                     \_\_func\_\_, (\textcolor{keywordtype}{long}) \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}}, sectorsize,}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00288}00288                     (uintmax\_t)blksize, offmask);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00289}00289         \textcolor{keywordflow}{if} (sectorsize < \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structfis__image__desc}{fis\_image\_desc}}) ||}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00290}00290             (sectorsize \% \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structfis__image__desc}{fis\_image\_desc}})))}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00291}00291                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00292}00292         \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00293}00293         head = NULL;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00294}00294         \textcolor{keywordflow}{if}(\mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} == 0)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00295}00295                 \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} -\/ blksize;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00296}00296 again:}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00297}00297         \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} = \mbox{\hyperlink{geom_8h_a550c2071f79908eea3d1ccbf821c4e4f}{g\_read\_data}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}}, blksize, NULL);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00298}00298         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} != NULL)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00299}00299                 head = \mbox{\hyperlink{geom__redboot_8c_ab0872d4f7cd65c8141fe01ac0f35669e}{parse\_fis\_directory}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, blksize, \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}}, offmask);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00300}00300         \textcolor{keywordflow}{if} (head == NULL \&\& \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} != 0) \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00301}00301                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} != NULL)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00302}00302                         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00303}00303                 \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} = 0;                       \textcolor{comment}{/* check the front */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00304}00304                 \textcolor{keywordflow}{goto} again;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00305}00305         \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00306}00306         \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00307}00307         \textcolor{keywordflow}{if} (head == NULL) \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00308}00308                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} != NULL)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00309}00309                         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00310}00310                 \textcolor{keywordflow}{return} NULL;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00311}00311         \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00312}00312         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00313}00313 \textcolor{comment}{         * Craft a slice for each entry.}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00314}00314 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00315}00315         \textcolor{keywordflow}{for} (fd = head, i = 0; fd != NULL; fd = fd-\/>\mbox{\hyperlink{structfis__image__desc_a90f0fa6b46bde21d13b6dc18635e9b05}{next}}) \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00316}00316                 \textcolor{keywordflow}{if} (fd-\/>\mbox{\hyperlink{structfis__image__desc_a2670ab5df06a38ae2f9c0d1d82100acd}{name}}[0] == \textcolor{charliteral}{'\(\backslash\)0'})}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00317}00317                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00318}00318                 error = \mbox{\hyperlink{geom__slice_8c_aca4428bf16e4be4644b9aeab957f13bc}{g\_slice\_config}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, i, \mbox{\hyperlink{geom__slice_8h_a980d4bd1e3d3a711057dd4419b0c9ad9}{G\_SLICE\_CONFIG\_SET}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00319}00319                     fd-\/>\mbox{\hyperlink{structfis__image__desc_a5b8f3fce46a57fbceca2787641dfd3f3}{offset}}, fd-\/>\mbox{\hyperlink{structfis__image__desc_aa8405b14c80d0c481605597a124ea665}{size}}, sectorsize, \textcolor{stringliteral}{"{}redboot/\%s"{}}, fd-\/>\mbox{\hyperlink{structfis__image__desc_a2670ab5df06a38ae2f9c0d1d82100acd}{name}});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00320}00320                 \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00321}00321                         printf(\textcolor{stringliteral}{"{}\%s: g\_slice\_config returns \%d for \(\backslash\)"{}\%s\(\backslash\)"{}\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00322}00322                             \_\_func\_\_, error, fd-\/>\mbox{\hyperlink{structfis__image__desc_a2670ab5df06a38ae2f9c0d1d82100acd}{name}});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00323}00323                 sc-\/>\mbox{\hyperlink{structg__redboot__softc_aabf8dc1900763df12d35cb7db4989a41}{entry}}[i] = fd-\/>\mbox{\hyperlink{structfis__image__desc_aa3e77277c3f1775d04339697f4160af3}{entry}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00324}00324                 sc-\/>\mbox{\hyperlink{structg__redboot__softc_a0a804efce8e462349c70f7f0e17bb04b}{dsize}}[i] = fd-\/>\mbox{\hyperlink{structfis__image__desc_aa8b784277ff009cc6d4f57105f5c3bf4}{dsize}};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00325}00325                 \textcolor{comment}{/* disallow writing hard-\/to-\/recover entries */}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00326}00326                 sc-\/>\mbox{\hyperlink{structg__redboot__softc_affaefc54be50853febda18bb7673fc15}{readonly}}[i] = (strcmp(fd-\/>\mbox{\hyperlink{structfis__image__desc_a2670ab5df06a38ae2f9c0d1d82100acd}{name}}, \mbox{\hyperlink{geom__redboot_8c_a380fd79de8746ac5b88a8a808e6933f4}{FISDIR\_NAME}}) == 0) ||}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00327}00327                                   (strcmp(fd-\/>\mbox{\hyperlink{structfis__image__desc_a2670ab5df06a38ae2f9c0d1d82100acd}{name}}, \mbox{\hyperlink{geom__redboot_8c_a14ea5aad3984fb3cc86f4bcb5568af82}{REDBOOT\_NAME}}) == 0);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00328}00328                 i++;}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00329}00329         \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00330}00330         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00331}00331         \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, -\/1, 0, 0);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00332}00332         \textcolor{keywordflow}{if} (LIST\_EMPTY(\&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>provider)) \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00333}00333                 \mbox{\hyperlink{geom__slice_8c_a59485c0befa87323ae0134fdfade9359}{g\_slice\_spoiled}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00334}00334                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00335}00335         \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00336}00336         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00337}00337 \}}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00338}00338 }
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00339}\mbox{\hyperlink{geom__redboot_8c_ae95d4161bc5a6ae091062c32ee14b220}{00339}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__class}{g\_class}} \mbox{\hyperlink{geom__redboot_8c_ae95d4161bc5a6ae091062c32ee14b220}{g\_redboot\_class}}     = \{}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00340}00340         .\mbox{\hyperlink{structg__class_a66bf8381cf0afbf7ccdebfa6b90a4a96}{name}}               = \mbox{\hyperlink{geom__redboot_8c_a0c69483bb7ee99a7b6a20210b78caf15}{REDBOOT\_CLASS\_NAME}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00341}00341         .version        = \mbox{\hyperlink{geom_8h_a33025dbc893de9dc049ba2f30283bc5a}{G\_VERSION}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00342}00342         .taste          = \mbox{\hyperlink{geom__redboot_8c_abb675df83dbb45230e5a7ab05d8eee70}{g\_redboot\_taste}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00343}00343         .\mbox{\hyperlink{structg__geom_a5944d44b6aba36f1a37c67f020b5588b}{dumpconf}}       = \mbox{\hyperlink{geom__redboot_8c_afef12e578a7e1da0d2411eb4f75c7bef}{g\_redboot\_dumpconf}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00344}00344         .ioctl          = \mbox{\hyperlink{geom__redboot_8c_ad3494508005921f2956f8b99199203aa}{g\_redboot\_ioctl}},}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00345}00345 \};}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00346}\mbox{\hyperlink{geom__redboot_8c_a0e9a525b1060e41f35b3e2e40d80e21e}{00346}} \mbox{\hyperlink{geom__redboot_8c_a0e9a525b1060e41f35b3e2e40d80e21e}{DECLARE\_GEOM\_CLASS}}(\mbox{\hyperlink{geom__redboot_8c_ae95d4161bc5a6ae091062c32ee14b220}{g\_redboot\_class}}, g\_redboot);}
\DoxyCodeLine{\Hypertarget{geom__redboot_8c_source_l00347}\mbox{\hyperlink{geom__redboot_8c_a202456ea572833e3c1f4904aa8a26cd5}{00347}} \mbox{\hyperlink{geom__redboot_8c_a202456ea572833e3c1f4904aa8a26cd5}{MODULE\_VERSION}}(geom\_redboot, 0);}

\end{DoxyCode}
