\hypertarget{g__part__vtoc8_8c_source}{}\doxysection{g\+\_\+part\+\_\+vtoc8.\+c}
\label{g__part__vtoc8_8c_source}\index{geom/part/g\_part\_vtoc8.c@{geom/part/g\_part\_vtoc8.c}}
\mbox{\hyperlink{g__part__vtoc8_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2008 Marcel Moolenaar}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00010}00010 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00011}00011 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00012}00012 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00013}00013 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00014}00014 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00015}00015 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00016}00016 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00017}00017 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00019}00019 \textcolor{comment}{ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00020}00020 \textcolor{comment}{ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00021}00021 \textcolor{comment}{ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00022}00022 \textcolor{comment}{ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00023}00023 \textcolor{comment}{ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00024}00024 \textcolor{comment}{ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00025}00025 \textcolor{comment}{ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00026}00026 \textcolor{comment}{ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00029}00029 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00030}\mbox{\hyperlink{g__part__vtoc8_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00030}} \mbox{\hyperlink{g__part__vtoc8_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/bio.h>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/endian.h>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/kobj.h>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/limits.h>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/sbuf.h>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/vtoc.h>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom_8h}{geom/geom.h}}>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom__int_8h}{geom/geom\_int.h}}>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{g__part_8h}{geom/part/g\_part.h}}>}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00050}00050 \textcolor{preprocessor}{\#include "{}g\_part\_if.h"{}}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00051}00051 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00052}\mbox{\hyperlink{g__part__vtoc8_8c_afcc45d9a368692ab1b12ea097a8fb40c}{00052}} \mbox{\hyperlink{g__part__vtoc8_8c_afcc45d9a368692ab1b12ea097a8fb40c}{FEATURE}}(geom\_part\_vtoc8, \textcolor{stringliteral}{"{}GEOM partitioning class for SMI VTOC8 disk labels"{}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00053}00053 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00054}\mbox{\hyperlink{structg__part__vtoc8__table}{00054}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00055}\mbox{\hyperlink{structg__part__vtoc8__table_a1281bd3448cda7d55ddcf7774cff60bb}{00055}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__table}{g\_part\_table}} \mbox{\hyperlink{structg__part__vtoc8__table_a1281bd3448cda7d55ddcf7774cff60bb}{base}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00056}\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{00056}}         \textcolor{keyword}{struct }vtoc8            \mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00057}\mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{00057}}         uint32\_t                \mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{secpercyl}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00058}00058 \};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00059}00059 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00060}00060 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__vtoc8_8c_ade4e6fe7e4ad3c2e2933386271e5adb0}{g\_part\_vtoc8\_add}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *,}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00061}00061     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__parms}{g\_part\_parms}} *);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00062}00062 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__vtoc8_8c_a3b491beb56d14653b93a18781a9078ef}{g\_part\_vtoc8\_create}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__parms}{g\_part\_parms}} *);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00063}00063 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__vtoc8_8c_aa0ced0ce20fd18dcea39bbaa7836107d}{g\_part\_vtoc8\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__parms}{g\_part\_parms}} *);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00064}00064 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__part__vtoc8_8c_af836527936c1c13084c9d9122efd8a9a}{g\_part\_vtoc8\_dumpconf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *,}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00065}00065     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *, \textcolor{keyword}{struct} sbuf *, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00066}00066 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__vtoc8_8c_ad90c15adb2f3f0ddd19eb0904b1f199a}{g\_part\_vtoc8\_dumpto}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00067}00067 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__vtoc8_8c_a5b421e9d165ed55fdc54a4ec8df47f69}{g\_part\_vtoc8\_modify}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *,}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00068}00068     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__parms}{g\_part\_parms}} *);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00069}00069 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__vtoc8_8c_ae9d2035fde0f65986ec97c47e3a9644a}{g\_part\_vtoc8\_name}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *,}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00070}00070     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *, \textcolor{keywordtype}{char} *, \textcolor{keywordtype}{size\_t});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00071}00071 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__vtoc8_8c_a2087d75d1031d53d6060df4639ef03b5}{g\_part\_vtoc8\_probe}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00072}00072 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__vtoc8_8c_a3d13ea0b3dda7119048ad8a362c09b47}{g\_part\_vtoc8\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00073}00073 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__vtoc8_8c_aa6519150a4db2938a9ba2abacfb74b84}{g\_part\_vtoc8\_type}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *,}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00074}00074     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *, \textcolor{keywordtype}{char} *, \textcolor{keywordtype}{size\_t});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00075}00075 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__vtoc8_8c_a91502ce896d1b4b2ea90ad6186b9d439}{g\_part\_vtoc8\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00076}00076 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__vtoc8_8c_a5b37ea71da1bdddb5df9ca693c8e8013}{g\_part\_vtoc8\_resize}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *,}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00077}00077     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__parms}{g\_part\_parms}} *);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00078}00078 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00079}\mbox{\hyperlink{g__part__vtoc8_8c_acadd3f3cb10eeb4e8267185e46ec8960}{00079}} \textcolor{keyword}{static} kobj\_method\_t \mbox{\hyperlink{g__part__vtoc8_8c_acadd3f3cb10eeb4e8267185e46ec8960}{g\_part\_vtoc8\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00080}00080         KOBJMETHOD(g\_part\_add,          \mbox{\hyperlink{g__part__vtoc8_8c_ade4e6fe7e4ad3c2e2933386271e5adb0}{g\_part\_vtoc8\_add}}),}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00081}00081         KOBJMETHOD(g\_part\_create,       \mbox{\hyperlink{g__part__vtoc8_8c_a3b491beb56d14653b93a18781a9078ef}{g\_part\_vtoc8\_create}}),}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00082}00082         KOBJMETHOD(g\_part\_destroy,      \mbox{\hyperlink{g__part__vtoc8_8c_aa0ced0ce20fd18dcea39bbaa7836107d}{g\_part\_vtoc8\_destroy}}),}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00083}00083         KOBJMETHOD(\mbox{\hyperlink{g__part_8c_ab34acccc61d4eaae892030944206e9c2}{g\_part\_dumpconf}},      \mbox{\hyperlink{g__part__vtoc8_8c_af836527936c1c13084c9d9122efd8a9a}{g\_part\_vtoc8\_dumpconf}}),}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00084}00084         KOBJMETHOD(g\_part\_dumpto,       \mbox{\hyperlink{g__part__vtoc8_8c_ad90c15adb2f3f0ddd19eb0904b1f199a}{g\_part\_vtoc8\_dumpto}}),}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00085}00085         KOBJMETHOD(g\_part\_modify,       \mbox{\hyperlink{g__part__vtoc8_8c_a5b421e9d165ed55fdc54a4ec8df47f69}{g\_part\_vtoc8\_modify}}),}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00086}00086         KOBJMETHOD(\mbox{\hyperlink{g__part_8c_a8a5b9fa2481c947e1fa2486f11c77f17}{g\_part\_resize}},  \mbox{\hyperlink{g__part__vtoc8_8c_a5b37ea71da1bdddb5df9ca693c8e8013}{g\_part\_vtoc8\_resize}}),}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00087}00087         KOBJMETHOD(g\_part\_name,         \mbox{\hyperlink{g__part__vtoc8_8c_ae9d2035fde0f65986ec97c47e3a9644a}{g\_part\_vtoc8\_name}}),}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00088}00088         KOBJMETHOD(\mbox{\hyperlink{g__part_8c_af9edeef8af7e4a9bbe5604ef2bcd1266}{g\_part\_probe}},    \mbox{\hyperlink{g__part__vtoc8_8c_a2087d75d1031d53d6060df4639ef03b5}{g\_part\_vtoc8\_probe}}),}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00089}00089         KOBJMETHOD(g\_part\_read,         \mbox{\hyperlink{g__part__vtoc8_8c_a3d13ea0b3dda7119048ad8a362c09b47}{g\_part\_vtoc8\_read}}),}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00090}00090         KOBJMETHOD(g\_part\_type,         \mbox{\hyperlink{g__part__vtoc8_8c_aa6519150a4db2938a9ba2abacfb74b84}{g\_part\_vtoc8\_type}}),}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00091}00091         KOBJMETHOD(g\_part\_write,        \mbox{\hyperlink{g__part__vtoc8_8c_a91502ce896d1b4b2ea90ad6186b9d439}{g\_part\_vtoc8\_write}}),}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00092}00092         \{ 0, 0 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00093}00093 \};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00094}00094 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00095}\mbox{\hyperlink{g__part__vtoc8_8c_a397afd05e04a00bff6057e8f95514aff}{00095}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__scheme}{g\_part\_scheme}} \mbox{\hyperlink{g__part__vtoc8_8c_a397afd05e04a00bff6057e8f95514aff}{g\_part\_vtoc8\_scheme}} = \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00096}00096         \textcolor{stringliteral}{"{}VTOC8"{}},}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00097}00097         \mbox{\hyperlink{g__part__vtoc8_8c_acadd3f3cb10eeb4e8267185e46ec8960}{g\_part\_vtoc8\_methods}},}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00098}00098         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}}),}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00099}00099         .gps\_entrysz = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__entry}{g\_part\_entry}}),}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00100}00100         .gps\_minent = VTOC8\_NPARTS,}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00101}00101         .gps\_maxent = VTOC8\_NPARTS,}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00102}00102 \};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00103}\mbox{\hyperlink{g__part__vtoc8_8c_a40d7b79f8212ec9cdd288e4ddb415898}{00103}} \mbox{\hyperlink{g__part__vtoc8_8c_a40d7b79f8212ec9cdd288e4ddb415898}{G\_PART\_SCHEME\_DECLARE}}(g\_part\_vtoc8);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00104}\mbox{\hyperlink{g__part__vtoc8_8c_ab09298e982cc67992a195a42ae435981}{00104}} \mbox{\hyperlink{g__part__vtoc8_8c_ab09298e982cc67992a195a42ae435981}{MODULE\_VERSION}}(geom\_part\_vtoc8, 0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00105}00105 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00106}00106 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00107}\mbox{\hyperlink{g__part__vtoc8_8c_a1c3b50a58ec1874965604592700e4065}{00107}} \mbox{\hyperlink{g__part__vtoc8_8c_a1c3b50a58ec1874965604592700e4065}{vtoc8\_parse\_type}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}}, uint16\_t *tag)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00108}00108 \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00109}00109         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *alias;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00110}00110         \textcolor{keywordtype}{char} *endp;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00111}00111         \textcolor{keywordtype}{long} lt;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00112}00112 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00113}00113         \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}}[0] == \textcolor{charliteral}{'!'}) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00114}00114                 lt = strtol(\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}} + 1, \&endp, 0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00115}00115                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}}[1] == \textcolor{charliteral}{'\(\backslash\)0'} || *endp != \textcolor{charliteral}{'\(\backslash\)0'} || lt <= 0 ||}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00116}00116                     lt >= 65536)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00117}00117                         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00118}00118                 *tag = (uint16\_t)lt;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00119}00119                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00120}00120         \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00121}00121         alias = \mbox{\hyperlink{g__part_8c_a458397c9a8faf94592039e34134837dc}{g\_part\_alias\_name}}(\mbox{\hyperlink{g__part_8h_a19b7e9a64cde5cffbdf337cc286615fba8a6adc68aa1d4e885d9d7f6c7a95b229}{G\_PART\_ALIAS\_FREEBSD\_NANDFS}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00122}00122         \textcolor{keywordflow}{if} (!strcasecmp(\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}}, alias)) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00123}00123                 *tag = VTOC\_TAG\_FREEBSD\_NANDFS;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00124}00124                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00125}00125         \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00126}00126         alias = \mbox{\hyperlink{g__part_8c_a458397c9a8faf94592039e34134837dc}{g\_part\_alias\_name}}(\mbox{\hyperlink{g__part_8h_a19b7e9a64cde5cffbdf337cc286615fba85b766f7be4fb08c7c8e8beeb5ca8ac6}{G\_PART\_ALIAS\_FREEBSD\_SWAP}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00127}00127         \textcolor{keywordflow}{if} (!strcasecmp(\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}}, alias)) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00128}00128                 *tag = VTOC\_TAG\_FREEBSD\_SWAP;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00129}00129                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00130}00130         \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00131}00131         alias = \mbox{\hyperlink{g__part_8c_a458397c9a8faf94592039e34134837dc}{g\_part\_alias\_name}}(\mbox{\hyperlink{g__part_8h_a19b7e9a64cde5cffbdf337cc286615fbad13ec1baa4a93569a10970d2d4e2322f}{G\_PART\_ALIAS\_FREEBSD\_UFS}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00132}00132         \textcolor{keywordflow}{if} (!strcasecmp(\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}}, alias)) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00133}00133                 *tag = VTOC\_TAG\_FREEBSD\_UFS;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00134}00134                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00135}00135         \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00136}00136         alias = \mbox{\hyperlink{g__part_8c_a458397c9a8faf94592039e34134837dc}{g\_part\_alias\_name}}(\mbox{\hyperlink{g__part_8h_a19b7e9a64cde5cffbdf337cc286615fbaf5371975d479c62f48e2703a43ccc2ad}{G\_PART\_ALIAS\_FREEBSD\_VINUM}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00137}00137         \textcolor{keywordflow}{if} (!strcasecmp(\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}}, alias)) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00138}00138                 *tag = VTOC\_TAG\_FREEBSD\_VINUM;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00139}00139                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00140}00140         \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00141}00141         alias = \mbox{\hyperlink{g__part_8c_a458397c9a8faf94592039e34134837dc}{g\_part\_alias\_name}}(\mbox{\hyperlink{g__part_8h_a19b7e9a64cde5cffbdf337cc286615fbaea1794ef53ca052eb2a0d423aa99278c}{G\_PART\_ALIAS\_FREEBSD\_ZFS}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00142}00142         \textcolor{keywordflow}{if} (!strcasecmp(\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}}, alias)) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00143}00143                 *tag = VTOC\_TAG\_FREEBSD\_ZFS;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00144}00144                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00145}00145         \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00146}00146         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00147}00147 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00148}00148 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00149}00149 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00150}\mbox{\hyperlink{g__part__vtoc8_8c_adbbc4b35943f76286abbb4f13f47edaf}{00150}} \mbox{\hyperlink{g__part__vtoc8_8c_adbbc4b35943f76286abbb4f13f47edaf}{vtoc8\_align}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *table, uint64\_t *\mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}}, uint64\_t *size)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00151}00151 \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00152}00152 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00153}00153         \textcolor{keywordflow}{if} (*size < table-\/>secpercyl)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00154}00154                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00155}00155         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} != NULL \&\& (*\mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} \% table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{secpercyl}})) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00156}00156                 *size += (*\mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} \% table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{secpercyl}}) -\/ table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{secpercyl}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00157}00157                 *\mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} -\/= (*\mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} \% table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{secpercyl}}) -\/ table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{secpercyl}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00158}00158         \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00159}00159         \textcolor{keywordflow}{if} (*size \% table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{secpercyl}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00160}00160                 *size -\/= (*size \% table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{secpercyl}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00161}00161         \textcolor{keywordflow}{if} (*size < table-\/>secpercyl)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00162}00162                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00163}00163         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00164}00164 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00165}00165 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00166}00166 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00167}\mbox{\hyperlink{g__part__vtoc8_8c_ade4e6fe7e4ad3c2e2933386271e5adb0}{00167}} \mbox{\hyperlink{g__part__vtoc8_8c_ade4e6fe7e4ad3c2e2933386271e5adb0}{g\_part\_vtoc8\_add}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *basetable, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}},}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00168}00168     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__parms}{g\_part\_parms}} *\mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00169}00169 \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00170}00170         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *table;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00171}00171         \textcolor{keywordtype}{int} error, index;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00172}00172         uint64\_t \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}}, size;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00173}00173         uint16\_t tag;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00174}00174 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00175}00175         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_aac8d6125fbcedb1791170d0cc791648a}{gpp\_parms}} \& \mbox{\hyperlink{g__part_8h_ac1f9e00d1a0a9fc01363d4d49541f42d}{G\_PART\_PARM\_LABEL}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00176}00176                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00177}00177 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00178}00178         error = \mbox{\hyperlink{g__part__vtoc8_8c_a1c3b50a58ec1874965604592700e4065}{vtoc8\_parse\_type}}(\mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_a01eada6a88b8471f77555e6805d2644a}{gpp\_type}}, \&tag);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00179}00179         \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00180}00180                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00181}00181 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00182}00182         table = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *)basetable;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00183}00183         index = \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>\mbox{\hyperlink{structg__part__entry_a908a1a135d9ed557c57c79d5fd866a02}{gpe\_index}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00184}00184         \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} = \mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_a0dafde1b8f8959235573b0479434e2cc}{gpp\_start}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00185}00185         size = \mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_a73f7831f174a1aa7c6c6b291b37b565d}{gpp\_size}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00186}00186         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__vtoc8_8c_adbbc4b35943f76286abbb4f13f47edaf}{vtoc8\_align}}(table, \&\mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}}, \&size) != 0)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00187}00187                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00188}00188 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00189}00189         KASSERT(\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>\mbox{\hyperlink{structg__part__entry_a65789808f851b8e6a71d10511fdcd986}{gpe\_start}} <= \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}}, (\_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00190}00190         KASSERT(\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>\mbox{\hyperlink{structg__part__entry_ab7641d98c0e79484e0652c795f1123ab}{gpe\_end}} >= \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} + size -\/ 1, (\_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00191}00191         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>\mbox{\hyperlink{structg__part__entry_a65789808f851b8e6a71d10511fdcd986}{gpe\_start}} = \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00192}00192         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>\mbox{\hyperlink{structg__part__entry_ab7641d98c0e79484e0652c795f1123ab}{gpe\_end}} = \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} + size -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00194}00194         be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.part[index].tag, tag);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00195}00195         be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.part[index].flag, 0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00196}00196         be32enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.timestamp[index], 0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00197}00197         be32enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.map[index].cyl, \mbox{\hyperlink{g__raid__tr__if_8m_a17b9425cc13d593841ed2c2054a14e26}{start}} / table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{secpercyl}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00198}00198         be32enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.map[index].nblks, size);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00199}00199         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00200}00200 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00201}00201 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00202}00202 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00203}\mbox{\hyperlink{g__part__vtoc8_8c_a3b491beb56d14653b93a18781a9078ef}{00203}} \mbox{\hyperlink{g__part__vtoc8_8c_a3b491beb56d14653b93a18781a9078ef}{g\_part\_vtoc8\_create}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *basetable, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__parms}{g\_part\_parms}} *\mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00204}00204 \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00205}00205         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00206}00206         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00207}00207         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *table;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00208}00208         uint64\_t msize;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00209}00209         uint32\_t acyls, ncyls, pcyls;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00211}00211         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_a0167e72bae7184b18a4180134cc0c021}{gpp\_provider}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00212}00212 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00213}00213         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} < \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} vtoc8))}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00214}00214                 \textcolor{keywordflow}{return} (ENOSPC);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00215}00215         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} > \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} vtoc8))}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00216}00216                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00217}00217 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00218}00218         table = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *)basetable;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00219}00219 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00220}00220         msize = MIN(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} / \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, UINT32\_MAX);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00221}00221         table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{secpercyl}} = basetable-\/>\mbox{\hyperlink{structg__part__table_a5472d6d927a4be105b3ef51f296b4b72}{gpt\_sectors}} * basetable-\/>\mbox{\hyperlink{structg__part__table_a37be862f028201612aaa673c1e501d9b}{gpt\_heads}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00222}00222         pcyls = msize / table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{secpercyl}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00223}00223         acyls = 2;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00224}00224         ncyls = pcyls -\/ acyls;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00225}00225         msize = ncyls * table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{secpercyl}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00227}00227         snprintf(table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.ascii, \textcolor{keyword}{sizeof}(table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.ascii),}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00228}00228             \textcolor{stringliteral}{"{}FreeBSD\%lldM cyl \%u alt \%u hd \%u sec \%u"{}},}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00229}00229             (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})(msize / 2048), ncyls, acyls, basetable-\/>\mbox{\hyperlink{structg__part__table_a37be862f028201612aaa673c1e501d9b}{gpt\_heads}},}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00230}00230             basetable-\/>\mbox{\hyperlink{structg__part__table_a5472d6d927a4be105b3ef51f296b4b72}{gpt\_sectors}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00231}00231         be32enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.version, VTOC\_VERSION);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00232}00232         be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.nparts, VTOC8\_NPARTS);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00233}00233         be32enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.sanity, VTOC\_SANITY);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00234}00234         be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.rpm, 3600);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00235}00235         be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.physcyls, pcyls);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00236}00236         be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.ncyls, ncyls);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00237}00237         be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.altcyls, acyls);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00238}00238         be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.nheads, basetable-\/>\mbox{\hyperlink{structg__part__table_a37be862f028201612aaa673c1e501d9b}{gpt\_heads}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00239}00239         be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.nsecs, basetable-\/>\mbox{\hyperlink{structg__part__table_a5472d6d927a4be105b3ef51f296b4b72}{gpt\_sectors}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00240}00240         be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.magic, VTOC\_MAGIC);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00241}00241 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00242}00242         basetable-\/>\mbox{\hyperlink{structg__part__table_a20e1ef23449d8669abc2d1737bd04eb7}{gpt\_first}} = 0;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00243}00243         basetable-\/>\mbox{\hyperlink{structg__part__table_aed05f4ae3f70841485bb573fbb21e458}{gpt\_last}} = msize -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00244}00244         basetable-\/>\mbox{\hyperlink{structg__part__table_a9a2e36211034cfeba117148818235994}{gpt\_isleaf}} = 1;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00245}00245 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00246}00246         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} = \mbox{\hyperlink{g__part_8c_a010bc380adf72e4e075c5339c3b10f4e}{g\_part\_new\_entry}}(basetable, VTOC\_RAW\_PART + 1,}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00247}00247             basetable-\/>\mbox{\hyperlink{structg__part__table_a20e1ef23449d8669abc2d1737bd04eb7}{gpt\_first}}, basetable-\/>\mbox{\hyperlink{structg__part__table_aed05f4ae3f70841485bb573fbb21e458}{gpt\_last}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00248}00248         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>\mbox{\hyperlink{structg__part__entry_a86b17c79d155694f025280d9623e6fbb}{gpe\_internal}} = 1;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00249}00249         be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.part[VTOC\_RAW\_PART].tag, VTOC\_TAG\_BACKUP);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00250}00250         be32enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.map[VTOC\_RAW\_PART].nblks, msize);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00251}00251         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00252}00252 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00253}00253 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00254}00254 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00255}\mbox{\hyperlink{g__part__vtoc8_8c_aa0ced0ce20fd18dcea39bbaa7836107d}{00255}} \mbox{\hyperlink{g__part__vtoc8_8c_aa0ced0ce20fd18dcea39bbaa7836107d}{g\_part\_vtoc8\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *basetable, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__parms}{g\_part\_parms}} *\mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00256}00256 \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00257}00257 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00258}00258         \textcolor{comment}{/* Wipe the first sector to clear the partitioning. */}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00259}00259         basetable-\/>\mbox{\hyperlink{structg__part__table_a9e646bdafec74517607d5cbbea17f0d6}{gpt\_smhead}} |= 1;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00260}00260         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00261}00261 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00262}00262 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00263}00263 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00264}\mbox{\hyperlink{g__part__vtoc8_8c_af836527936c1c13084c9d9122efd8a9a}{00264}} \mbox{\hyperlink{g__part__vtoc8_8c_af836527936c1c13084c9d9122efd8a9a}{g\_part\_vtoc8\_dumpconf}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *basetable,}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00265}00265     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}, \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}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00266}00266 \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00267}00267         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *table;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00268}00268 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00269}00269         table = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *)basetable;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00270}00270         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00271}00271                 \textcolor{comment}{/* conftxt: libdisk compatibility */}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00272}00272                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{} xs SUN sc \%u hd \%u alt \%u"{}},}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00273}00273                     be16dec(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.nsecs), be16dec(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.nheads),}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00274}00274                     be16dec(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.altcyls));}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00275}00275         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00276}00276                 \textcolor{comment}{/* confxml: partition entry information */}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00277}00277                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%s<rawtype>\%u</rawtype>\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}},}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00278}00278                     be16dec(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.part[\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>\mbox{\hyperlink{structg__part__entry_a908a1a135d9ed557c57c79d5fd866a02}{gpe\_index}} -\/ 1].tag));}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00279}00279         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00280}00280                 \textcolor{comment}{/* confxml: scheme information */}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00281}00281         \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00282}00282 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00283}00283 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00284}00284 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00285}\mbox{\hyperlink{g__part__vtoc8_8c_ad90c15adb2f3f0ddd19eb0904b1f199a}{00285}} \mbox{\hyperlink{g__part__vtoc8_8c_ad90c15adb2f3f0ddd19eb0904b1f199a}{g\_part\_vtoc8\_dumpto}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *basetable,}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00286}00286     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00287}00287 \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00288}00288         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *table;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00289}00289         uint16\_t tag;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00290}00290 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00291}00291         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00292}00292 \textcolor{comment}{         * Allow dumping to a swap partition or a partition that}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00293}00293 \textcolor{comment}{         * has no type.}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00294}00294 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00295}00295         table = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *)basetable;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00296}00296         tag = be16dec(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.part[\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>\mbox{\hyperlink{structg__part__entry_a908a1a135d9ed557c57c79d5fd866a02}{gpe\_index}} -\/ 1].tag);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00297}00297         \textcolor{keywordflow}{return} ((tag == 0 || tag == VTOC\_TAG\_FREEBSD\_SWAP ||}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00298}00298             tag == VTOC\_TAG\_SWAP) ? 1 : 0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00299}00299 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00300}00300 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00301}00301 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00302}\mbox{\hyperlink{g__part__vtoc8_8c_a5b421e9d165ed55fdc54a4ec8df47f69}{00302}} \mbox{\hyperlink{g__part__vtoc8_8c_a5b421e9d165ed55fdc54a4ec8df47f69}{g\_part\_vtoc8\_modify}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *basetable,}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00303}00303     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__parms}{g\_part\_parms}} *\mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00304}00304 \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00305}00305         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *table;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00306}00306         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00307}00307         uint16\_t tag;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00308}00308 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00309}00309         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_aac8d6125fbcedb1791170d0cc791648a}{gpp\_parms}} \& \mbox{\hyperlink{g__part_8h_ac1f9e00d1a0a9fc01363d4d49541f42d}{G\_PART\_PARM\_LABEL}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00310}00310                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00311}00311 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00312}00312         table = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *)basetable;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00313}00313         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_aac8d6125fbcedb1791170d0cc791648a}{gpp\_parms}} \& \mbox{\hyperlink{g__part_8h_a2036d1a76dc411e4de5052cdb8c9a138}{G\_PART\_PARM\_TYPE}}) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00314}00314                 error = \mbox{\hyperlink{g__part__vtoc8_8c_a1c3b50a58ec1874965604592700e4065}{vtoc8\_parse\_type}}(\mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_a01eada6a88b8471f77555e6805d2644a}{gpp\_type}}, \&tag);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00315}00315                 \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00316}00316                         \textcolor{keywordflow}{return}(error);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00317}00317 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00318}00318                 be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.part[\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>\mbox{\hyperlink{structg__part__entry_a908a1a135d9ed557c57c79d5fd866a02}{gpe\_index}} -\/ 1].tag, tag);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00319}00319         \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00320}00320         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00321}00321 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00322}00322 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00323}00323 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00324}\mbox{\hyperlink{g__part__vtoc8_8c_a91081a5d553a5e3cd1ed7dc9803f8142}{00324}} \mbox{\hyperlink{g__part__vtoc8_8c_a91081a5d553a5e3cd1ed7dc9803f8142}{vtoc8\_set\_rawsize}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *basetable, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00325}00325 \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00326}00326         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *table;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00327}00327         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *baseentry;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00328}00328         off\_t msize;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00329}00329         uint32\_t acyls, ncyls, pcyls;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00330}00330 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00331}00331         table = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *)basetable;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00332}00332         msize = MIN(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} / \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, UINT32\_MAX);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00333}00333         pcyls = msize / table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{secpercyl}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00334}00334         \textcolor{keywordflow}{if} (pcyls > UINT16\_MAX)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00335}00335                 \textcolor{keywordflow}{return} (ERANGE);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00336}00336         acyls = be16dec(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.altcyls);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00337}00337         ncyls = pcyls -\/ acyls;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00338}00338         msize = ncyls * table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{secpercyl}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00339}00339         basetable-\/>\mbox{\hyperlink{structg__part__table_aed05f4ae3f70841485bb573fbb21e458}{gpt\_last}} = msize -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00340}00340 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00341}00341         bzero(table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.ascii, \textcolor{keyword}{sizeof}(table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.ascii));}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00342}00342         snprintf(table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.ascii, \textcolor{keyword}{sizeof}(table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.ascii),}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00343}00343             \textcolor{stringliteral}{"{}FreeBSD\%lldM cyl \%u alt \%u hd \%u sec \%u"{}},}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00344}00344             (\textcolor{keywordtype}{long} \textcolor{keywordtype}{long})(msize / 2048), ncyls, acyls, basetable-\/>\mbox{\hyperlink{structg__part__table_a37be862f028201612aaa673c1e501d9b}{gpt\_heads}},}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00345}00345             basetable-\/>\mbox{\hyperlink{structg__part__table_a5472d6d927a4be105b3ef51f296b4b72}{gpt\_sectors}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00346}00346         be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.physcyls, pcyls);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00347}00347         be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.ncyls, ncyls);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00348}00348         be32enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.map[VTOC\_RAW\_PART].nblks, msize);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00349}00349         \textcolor{keywordflow}{if} (be32dec(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.sanity) == VTOC\_SANITY)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00350}00350                 be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.part[VTOC\_RAW\_PART].tag, VTOC\_TAG\_BACKUP);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00351}00351         LIST\_FOREACH(baseentry, \&basetable-\/>gpt\_entry, gpe\_entry) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00352}00352                 \textcolor{keywordflow}{if} (baseentry-\/>\mbox{\hyperlink{structg__part__entry_a908a1a135d9ed557c57c79d5fd866a02}{gpe\_index}} == VTOC\_RAW\_PART + 1) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00353}00353                         baseentry-\/>\mbox{\hyperlink{structg__part__entry_ab7641d98c0e79484e0652c795f1123ab}{gpe\_end}} = basetable-\/>\mbox{\hyperlink{structg__part__table_aed05f4ae3f70841485bb573fbb21e458}{gpt\_last}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00354}00354                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00355}00355                 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00356}00356         \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00357}00357         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00358}00358 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00359}00359 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00360}00360 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00361}\mbox{\hyperlink{g__part__vtoc8_8c_a5b37ea71da1bdddb5df9ca693c8e8013}{00361}} \mbox{\hyperlink{g__part__vtoc8_8c_a5b37ea71da1bdddb5df9ca693c8e8013}{g\_part\_vtoc8\_resize}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *basetable,}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00362}00362     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__parms}{g\_part\_parms}} *\mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00363}00363 \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00364}00364         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *table;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00365}00365         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00366}00366         uint64\_t size;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00367}00367 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00368}00368         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00369}00369                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = LIST\_FIRST(\&basetable-\/>\mbox{\hyperlink{structg__part__table_a0dad02eb728a87c70f5100f6c5a704d1}{gpt\_gp}}-\/>consumer)-\/>provider;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00370}00370                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part__vtoc8_8c_a91081a5d553a5e3cd1ed7dc9803f8142}{vtoc8\_set\_rawsize}}(basetable, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}));}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00371}00371         \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00372}00372         table = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *)basetable;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00373}00373         size = \mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_a73f7831f174a1aa7c6c6b291b37b565d}{gpp\_size}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00374}00374         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__vtoc8_8c_adbbc4b35943f76286abbb4f13f47edaf}{vtoc8\_align}}(table, NULL, \&size) != 0)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00375}00375                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00376}00376         \textcolor{comment}{/* XXX: prevent unexpected shrinking. */}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00377}00377         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>\mbox{\hyperlink{structg__part__entry_a66a86cc3331d381350a436c607520492}{gpe\_pp}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00378}00378         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{geom_8h_aca9e9300747035c84977158ea1fe1d38}{g\_debugflags}} \& \mbox{\hyperlink{geom_8h_ac5335e69a9ab03862196e80d4e2c5af8}{G\_F\_FOOTSHOOTING}}) == 0 \&\& size < \mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_a73f7831f174a1aa7c6c6b291b37b565d}{gpp\_size}} \&\&}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00379}00379             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} / \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} > size)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00380}00380                 \textcolor{keywordflow}{return} (EBUSY);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00381}00381         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>\mbox{\hyperlink{structg__part__entry_ab7641d98c0e79484e0652c795f1123ab}{gpe\_end}} = \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>\mbox{\hyperlink{structg__part__entry_a65789808f851b8e6a71d10511fdcd986}{gpe\_start}} + size -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00382}00382         be32enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.map[\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>\mbox{\hyperlink{structg__part__entry_a908a1a135d9ed557c57c79d5fd866a02}{gpe\_index}} -\/ 1].nblks, size);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00383}00383 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00384}00384         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00385}00385 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00386}00386 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00387}00387 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00388}\mbox{\hyperlink{g__part__vtoc8_8c_ae9d2035fde0f65986ec97c47e3a9644a}{00388}} \mbox{\hyperlink{g__part__vtoc8_8c_ae9d2035fde0f65986ec97c47e3a9644a}{g\_part\_vtoc8\_name}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *table, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *baseentry,}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00389}00389     \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{g__part__if_8m_a2a0790e716bccb2471387f8758962a1b}{bufsz}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00390}00390 \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00391}00391 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00392}00392         snprintf(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \mbox{\hyperlink{g__part__if_8m_a2a0790e716bccb2471387f8758962a1b}{bufsz}}, \textcolor{stringliteral}{"{}\%c"{}}, \textcolor{charliteral}{'a'} + baseentry-\/>\mbox{\hyperlink{structg__part__entry_a908a1a135d9ed557c57c79d5fd866a02}{gpe\_index}} -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00393}00393         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00394}00394 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00395}00395 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00396}00396 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00397}\mbox{\hyperlink{g__part__vtoc8_8c_a2087d75d1031d53d6060df4639ef03b5}{00397}} \mbox{\hyperlink{g__part__vtoc8_8c_a2087d75d1031d53d6060df4639ef03b5}{g\_part\_vtoc8\_probe}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *table, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00398}00398 \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00399}00399         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00400}00400         u\_char *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00401}00401         \textcolor{keywordtype}{int} \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}}, ofs, res;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00402}00402         uint16\_t cksum, magic;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00403}00403 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00404}00404         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00405}00405 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00406}00406         \textcolor{comment}{/* Sanity-\/check the provider. */}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00407}00407         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} != \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} vtoc8))}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00408}00408                 \textcolor{keywordflow}{return} (ENOSPC);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00409}00409 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00410}00410         \textcolor{comment}{/* Check that there's a disklabel. */}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00411}00411         \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} = \mbox{\hyperlink{geom_8h_a550c2071f79908eea3d1ccbf821c4e4f}{g\_read\_data}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, 0, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, \&\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00412}00412         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00413}00413                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00414}00414 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00415}00415         res = ENXIO;    \textcolor{comment}{/* Assume mismatch */}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00416}00416 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00417}00417         \textcolor{comment}{/* Check the magic */}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00418}00418         magic = be16dec(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} + offsetof(\textcolor{keyword}{struct} vtoc8, magic));}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00419}00419         \textcolor{keywordflow}{if} (magic != VTOC\_MAGIC)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00420}00420                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00421}00421 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00422}00422         \textcolor{comment}{/* Check the sum */}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00423}00423         cksum = 0;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00424}00424         \textcolor{keywordflow}{for} (ofs = 0; ofs < \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }vtoc8); ofs += 2)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00425}00425                 cksum \string^= be16dec(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} + ofs);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00426}00426         \textcolor{keywordflow}{if} (cksum != 0)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00427}00427                 \textcolor{keywordflow}{goto} out;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00428}00428 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00429}00429         res = \mbox{\hyperlink{g__part_8h_ad9e6d8bedd7ac8ce9839c634537442da}{G\_PART\_PROBE\_PRI\_NORM}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00430}00430 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00431}00431  out:}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00432}00432         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00433}00433         \textcolor{keywordflow}{return} (res);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00434}00434 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00435}00435 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00436}00436 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00437}\mbox{\hyperlink{g__part__vtoc8_8c_a3d13ea0b3dda7119048ad8a362c09b47}{00437}} \mbox{\hyperlink{g__part__vtoc8_8c_a3d13ea0b3dda7119048ad8a362c09b47}{g\_part\_vtoc8\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *basetable, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00438}00438 \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00439}00439         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00440}00440         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *table;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00441}00441         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00442}00442         u\_char *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00443}00443         off\_t chs, msize;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00444}00444         uint64\_t \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}}, size;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00445}00445         u\_int cyls, heads, sectors;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00446}00446         \textcolor{keywordtype}{int} error, index, withtags;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00447}00447         uint16\_t tag;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00448}00448 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00449}00449         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00450}00450         \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} = \mbox{\hyperlink{geom_8h_a550c2071f79908eea3d1ccbf821c4e4f}{g\_read\_data}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, 0, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, \&error);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00451}00451         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00452}00452                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00453}00453 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00454}00454         table = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *)basetable;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00455}00455         bcopy(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}, \textcolor{keyword}{sizeof}(table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}));}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00456}00456         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00457}00457 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00458}00458         msize = MIN(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} / \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, UINT32\_MAX);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00459}00459         sectors = be16dec(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.nsecs);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00460}00460         \textcolor{keywordflow}{if} (sectors < 1)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00461}00461                 \textcolor{keywordflow}{goto} invalid\_label;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00462}00462         \textcolor{keywordflow}{if} (sectors != basetable-\/>\mbox{\hyperlink{structg__part__table_a5472d6d927a4be105b3ef51f296b4b72}{gpt\_sectors}} \&\& !basetable-\/>\mbox{\hyperlink{structg__part__table_a8ceff629d753812441cd14001b2ff4e2}{gpt\_fixgeom}}) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00463}00463                 \mbox{\hyperlink{g__part_8c_a107b24cbd5a66afc40731be7ec41c4bb}{g\_part\_geometry\_heads}}(msize, sectors, \&chs, \&heads);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00464}00464                 \textcolor{keywordflow}{if} (chs != 0) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00465}00465                         basetable-\/>\mbox{\hyperlink{structg__part__table_a5472d6d927a4be105b3ef51f296b4b72}{gpt\_sectors}} = sectors;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00466}00466                         basetable-\/>\mbox{\hyperlink{structg__part__table_a37be862f028201612aaa673c1e501d9b}{gpt\_heads}} = heads;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00467}00467                 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00468}00468         \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00469}00469 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00470}00470         heads = be16dec(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.nheads);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00471}00471         \textcolor{keywordflow}{if} (heads < 1)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00472}00472                 \textcolor{keywordflow}{goto} invalid\_label;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00473}00473         \textcolor{keywordflow}{if} (heads != basetable-\/>\mbox{\hyperlink{structg__part__table_a37be862f028201612aaa673c1e501d9b}{gpt\_heads}} \&\& !basetable-\/>\mbox{\hyperlink{structg__part__table_a8ceff629d753812441cd14001b2ff4e2}{gpt\_fixgeom}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00474}00474                 basetable-\/>\mbox{\hyperlink{structg__part__table_a37be862f028201612aaa673c1e501d9b}{gpt\_heads}} = heads;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00475}00475         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00476}00476 \textcolor{comment}{         * Except for ATA disks > 32GB, Solaris uses the native geometry}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00477}00477 \textcolor{comment}{         * as reported by the target for the labels while da(4) typically}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00478}00478 \textcolor{comment}{         * uses a synthetic one so we don't complain too loudly if these}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00479}00479 \textcolor{comment}{         * geometries don't match.}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00480}00480 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00481}00481         \textcolor{keywordflow}{if} (bootverbose \&\& (sectors != basetable-\/>\mbox{\hyperlink{structg__part__table_a5472d6d927a4be105b3ef51f296b4b72}{gpt\_sectors}} ||}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00482}00482             heads != basetable-\/>\mbox{\hyperlink{structg__part__table_a37be862f028201612aaa673c1e501d9b}{gpt\_heads}}))}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00483}00483                 printf(\textcolor{stringliteral}{"{}GEOM: \%s: geometry does not match VTOC8 label "{}}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00484}00484                     \textcolor{stringliteral}{"{}(label: \%uh,\%us GEOM: \%uh,\%us).\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, heads,}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00485}00485                     sectors, basetable-\/>\mbox{\hyperlink{structg__part__table_a37be862f028201612aaa673c1e501d9b}{gpt\_heads}}, basetable-\/>\mbox{\hyperlink{structg__part__table_a5472d6d927a4be105b3ef51f296b4b72}{gpt\_sectors}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00486}00486 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00487}00487         table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{secpercyl}} = heads * sectors;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00488}00488         cyls = be16dec(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.ncyls);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00489}00489         chs = cyls * table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{secpercyl}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00490}00490         \textcolor{keywordflow}{if} (chs < 1 || chs > msize)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00491}00491                 \textcolor{keywordflow}{goto} invalid\_label;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00492}00492 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00493}00493         basetable-\/>\mbox{\hyperlink{structg__part__table_a20e1ef23449d8669abc2d1737bd04eb7}{gpt\_first}} = 0;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00494}00494         basetable-\/>\mbox{\hyperlink{structg__part__table_aed05f4ae3f70841485bb573fbb21e458}{gpt\_last}} = chs -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00495}00495         basetable-\/>\mbox{\hyperlink{structg__part__table_a9a2e36211034cfeba117148818235994}{gpt\_isleaf}} = 1;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00496}00496 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00497}00497         withtags = (be32dec(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.sanity) == VTOC\_SANITY) ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00498}00498         \textcolor{keywordflow}{if} (!withtags) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00499}00499                 printf(\textcolor{stringliteral}{"{}GEOM: \%s: adding VTOC8 information.\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00500}00500                 be32enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.version, VTOC\_VERSION);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00501}00501                 bzero(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.volume, VTOC\_VOLUME\_LEN);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00502}00502                 be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.nparts, VTOC8\_NPARTS);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00503}00503                 bzero(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.part, \textcolor{keyword}{sizeof}(table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.part));}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00504}00504                 be32enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.sanity, VTOC\_SANITY);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00505}00505         \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00506}00506 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00507}00507         basetable-\/>\mbox{\hyperlink{structg__part__table_a593162aef033d63adcfe51eabd071f7b}{gpt\_entries}} = be16dec(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.nparts);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00508}00508         \textcolor{keywordflow}{if} (basetable-\/>\mbox{\hyperlink{structg__part__table_a593162aef033d63adcfe51eabd071f7b}{gpt\_entries}} < \mbox{\hyperlink{g__part__vtoc8_8c_a397afd05e04a00bff6057e8f95514aff}{g\_part\_vtoc8\_scheme}}.\mbox{\hyperlink{structg__part__scheme_af04d6b8ba2feeef7f3220e5ac951b13a}{gps\_minent}} ||}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00509}00509             basetable-\/>\mbox{\hyperlink{structg__part__table_a593162aef033d63adcfe51eabd071f7b}{gpt\_entries}} > \mbox{\hyperlink{g__part__vtoc8_8c_a397afd05e04a00bff6057e8f95514aff}{g\_part\_vtoc8\_scheme}}.\mbox{\hyperlink{structg__part__scheme_ae5fe6c9fb2a0d11174280e1cf270ec8c}{gps\_maxent}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00510}00510                 \textcolor{keywordflow}{goto} invalid\_label;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00511}00511 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00512}00512         \textcolor{keywordflow}{for} (index = basetable-\/>\mbox{\hyperlink{structg__part__table_a593162aef033d63adcfe51eabd071f7b}{gpt\_entries}} -\/ 1; index >= 0; index-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00513}00513                 \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} = be32dec(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.map[index].cyl) *}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00514}00514                     table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a98726260c98323b04123aaae67f38e81}{secpercyl}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00515}00515                 size = be32dec(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.map[index].nblks);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00516}00516                 \textcolor{keywordflow}{if} (size == 0)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00517}00517                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00518}00518                 \textcolor{keywordflow}{if} (withtags)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00519}00519                         tag = be16dec(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.part[index].tag);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00520}00520                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00521}00521                         tag = (index == VTOC\_RAW\_PART)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00522}00522                             ? VTOC\_TAG\_BACKUP}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00523}00523                             : VTOC\_TAG\_UNASSIGNED;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00524}00524 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00525}00525                 \textcolor{keywordflow}{if} (index == VTOC\_RAW\_PART \&\& tag != VTOC\_TAG\_BACKUP)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00526}00526                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00527}00527                 \textcolor{keywordflow}{if} (index != VTOC\_RAW\_PART \&\& tag == VTOC\_TAG\_BACKUP)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00528}00528                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00529}00529                 \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} = \mbox{\hyperlink{g__part_8c_a010bc380adf72e4e075c5339c3b10f4e}{g\_part\_new\_entry}}(basetable, index + 1, \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}},}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00530}00530                     \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} + size -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00531}00531                 \textcolor{keywordflow}{if} (tag == VTOC\_TAG\_BACKUP)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00532}00532                         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>\mbox{\hyperlink{structg__part__entry_a86b17c79d155694f025280d9623e6fbb}{gpe\_internal}} = 1;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00533}00533 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00534}00534                 \textcolor{keywordflow}{if} (!withtags)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00535}00535                         be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.part[index].tag, tag);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00536}00536         \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00537}00537 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00538}00538         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00539}00539 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00540}00540  invalid\_label:}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00541}00541         printf(\textcolor{stringliteral}{"{}GEOM: \%s: invalid VTOC8 label.\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00542}00542         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00543}00543 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00544}00544 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00545}00545 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00546}\mbox{\hyperlink{g__part__vtoc8_8c_aa6519150a4db2938a9ba2abacfb74b84}{00546}} \mbox{\hyperlink{g__part__vtoc8_8c_aa6519150a4db2938a9ba2abacfb74b84}{g\_part\_vtoc8\_type}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *basetable, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}},}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00547}00547     \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{keywordtype}{size\_t} \mbox{\hyperlink{g__part__if_8m_a2a0790e716bccb2471387f8758962a1b}{bufsz}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00548}00548 \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00549}00549         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *table;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00550}00550         uint16\_t tag;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00551}00551 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00552}00552         table = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *)basetable;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00553}00553         tag = be16dec(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.part[\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>\mbox{\hyperlink{structg__part__entry_a908a1a135d9ed557c57c79d5fd866a02}{gpe\_index}} -\/ 1].tag);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00554}00554         \textcolor{keywordflow}{if} (tag == VTOC\_TAG\_FREEBSD\_NANDFS)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00555}00555                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part_8c_a458397c9a8faf94592039e34134837dc}{g\_part\_alias\_name}}(\mbox{\hyperlink{g__part_8h_a19b7e9a64cde5cffbdf337cc286615fba8a6adc68aa1d4e885d9d7f6c7a95b229}{G\_PART\_ALIAS\_FREEBSD\_NANDFS}}));}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00556}00556         \textcolor{keywordflow}{if} (tag == VTOC\_TAG\_FREEBSD\_SWAP)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00557}00557                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part_8c_a458397c9a8faf94592039e34134837dc}{g\_part\_alias\_name}}(\mbox{\hyperlink{g__part_8h_a19b7e9a64cde5cffbdf337cc286615fba85b766f7be4fb08c7c8e8beeb5ca8ac6}{G\_PART\_ALIAS\_FREEBSD\_SWAP}}));}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00558}00558         \textcolor{keywordflow}{if} (tag == VTOC\_TAG\_FREEBSD\_UFS)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00559}00559                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part_8c_a458397c9a8faf94592039e34134837dc}{g\_part\_alias\_name}}(\mbox{\hyperlink{g__part_8h_a19b7e9a64cde5cffbdf337cc286615fbad13ec1baa4a93569a10970d2d4e2322f}{G\_PART\_ALIAS\_FREEBSD\_UFS}}));}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00560}00560         \textcolor{keywordflow}{if} (tag == VTOC\_TAG\_FREEBSD\_VINUM)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00561}00561                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part_8c_a458397c9a8faf94592039e34134837dc}{g\_part\_alias\_name}}(\mbox{\hyperlink{g__part_8h_a19b7e9a64cde5cffbdf337cc286615fbaf5371975d479c62f48e2703a43ccc2ad}{G\_PART\_ALIAS\_FREEBSD\_VINUM}}));}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00562}00562         \textcolor{keywordflow}{if} (tag == VTOC\_TAG\_FREEBSD\_ZFS)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00563}00563                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part_8c_a458397c9a8faf94592039e34134837dc}{g\_part\_alias\_name}}(\mbox{\hyperlink{g__part_8h_a19b7e9a64cde5cffbdf337cc286615fbaea1794ef53ca052eb2a0d423aa99278c}{G\_PART\_ALIAS\_FREEBSD\_ZFS}}));}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00564}00564         snprintf(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \mbox{\hyperlink{g__part__if_8m_a2a0790e716bccb2471387f8758962a1b}{bufsz}}, \textcolor{stringliteral}{"{}!\%d"{}}, tag);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00565}00565         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00566}00566 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00567}00567 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00568}00568 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00569}\mbox{\hyperlink{g__part__vtoc8_8c_a91502ce896d1b4b2ea90ad6186b9d439}{00569}} \mbox{\hyperlink{g__part__vtoc8_8c_a91502ce896d1b4b2ea90ad6186b9d439}{g\_part\_vtoc8\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *basetable, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00570}00570 \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00571}00571         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00572}00572         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00573}00573         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *table;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00574}00574         uint16\_t sum;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00575}00575         u\_char *p;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00576}00576         \textcolor{keywordtype}{int} error, index, \mbox{\hyperlink{geom__redboot_8c_a124cc6b43c021df44d8f68d4060e27cd}{match}}, \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00577}00577 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00578}00578         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00579}00579         table = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__vtoc8__table}{g\_part\_vtoc8\_table}} *)basetable;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00580}00580         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} = LIST\_FIRST(\&basetable-\/>gpt\_entry);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00581}00581         \textcolor{keywordflow}{for} (index = 0; index < basetable-\/>\mbox{\hyperlink{structg__part__table_a593162aef033d63adcfe51eabd071f7b}{gpt\_entries}}; index++) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00582}00582                 \mbox{\hyperlink{geom__redboot_8c_a124cc6b43c021df44d8f68d4060e27cd}{match}} = (\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} != NULL \&\& index == \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>\mbox{\hyperlink{structg__part__entry_a908a1a135d9ed557c57c79d5fd866a02}{gpe\_index}} -\/ 1)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00583}00583                     ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00584}00584                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom__redboot_8c_a124cc6b43c021df44d8f68d4060e27cd}{match}}) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00585}00585                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>\mbox{\hyperlink{structg__part__entry_a4c7748c49b831d481c9fd5c26f2aaf0b}{gpe\_deleted}}) \{}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00586}00586                                 be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.part[index].tag, 0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00587}00587                                 be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.part[index].flag, 0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00588}00588                                 be32enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.map[index].cyl, 0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00589}00589                                 be32enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.map[index].nblks, 0);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00590}00590                         \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00591}00591                         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} = LIST\_NEXT(\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}, gpe\_entry);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00592}00592                 \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00593}00593         \}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00594}00594 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00595}00595         \textcolor{comment}{/* Calculate checksum. */}}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00596}00596         sum = 0;}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00597}00597         p = (\textcolor{keywordtype}{void} *)\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}};}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00598}00598         for (\mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} = 0; \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} < \textcolor{keyword}{sizeof}(table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}) -\/ 2; \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}} += 2)}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00599}00599                 sum \string^= be16dec(p + \mbox{\hyperlink{g__raid__tr__if_8m_ad5f0842c40c7e46344fd8df70187fa0f}{offset}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00600}00600         be16enc(\&table-\/>\mbox{\hyperlink{structg__part__vtoc8__table_a1078e3b432229447c3168da0af33e917}{vtoc}}.cksum, sum);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00601}00601 }
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00602}00602         error = \mbox{\hyperlink{geom_8h_a9b87ecbd812c109546b077da483baada}{g\_write\_data}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, 0, p, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00603}00603         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__part__vtoc8_8c_source_l00604}00604 \}}

\end{DoxyCode}
