\hypertarget{g__part__bsd_8c_source}{}\doxysection{g\+\_\+part\+\_\+bsd.\+c}
\label{g__part__bsd_8c_source}\index{geom/part/g\_part\_bsd.c@{geom/part/g\_part\_bsd.c}}
\mbox{\hyperlink{g__part__bsd_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2007 Marcel Moolenaar}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00010}00010 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00011}00011 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00012}00012 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00013}00013 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00014}00014 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00015}00015 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00016}00016 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00017}00017 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00019}00019 \textcolor{comment}{ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00020}00020 \textcolor{comment}{ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00021}00021 \textcolor{comment}{ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00022}00022 \textcolor{comment}{ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00023}00023 \textcolor{comment}{ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00024}00024 \textcolor{comment}{ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00025}00025 \textcolor{comment}{ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00026}00026 \textcolor{comment}{ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00029}00029 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00030}\mbox{\hyperlink{g__part__bsd_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00030}} \mbox{\hyperlink{g__part__bsd_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/bio.h>}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/disklabel.h>}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/endian.h>}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/kobj.h>}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/limits.h>}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/sbuf.h>}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom_8h}{geom/geom.h}}>}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{g__part_8h}{geom/part/g\_part.h}}>}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00048}00048 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00049}00049 \textcolor{preprocessor}{\#include "{}g\_part\_if.h"{}}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00050}00050 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00051}\mbox{\hyperlink{g__part__bsd_8c_a4a416e5d827340947fdf53d970888527}{00051}} \textcolor{preprocessor}{\#define BOOT1\_SIZE      512}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00052}\mbox{\hyperlink{g__part__bsd_8c_acd040791772dfe1d7ee535fcffbde41e}{00052}} \textcolor{preprocessor}{\#define LABEL\_SIZE      512}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00053}\mbox{\hyperlink{g__part__bsd_8c_a930f03b183a3fe11c1b25ae6008374b0}{00053}} \textcolor{preprocessor}{\#define BOOT2\_OFF       (BOOT1\_SIZE + LABEL\_SIZE)}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00054}\mbox{\hyperlink{g__part__bsd_8c_a387a1991a37f6eadd05135b23efbc199}{00054}} \textcolor{preprocessor}{\#define BOOT2\_SIZE      (BBSIZE -\/ BOOT2\_OFF)}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00056}\mbox{\hyperlink{g__part__bsd_8c_a0bb3f528684239c4a7849f9b45ebfe71}{00056}} \mbox{\hyperlink{g__part__bsd_8c_a0bb3f528684239c4a7849f9b45ebfe71}{FEATURE}}(geom\_part\_bsd, \textcolor{stringliteral}{"{}GEOM partitioning class for BSD disklabels"{}});}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00057}00057 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00058}\mbox{\hyperlink{structg__part__bsd__table}{00058}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__table}{g\_part\_bsd\_table}} \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00059}\mbox{\hyperlink{structg__part__bsd__table_af99538e51bc71dcc94f960173db5c97d}{00059}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__table}{g\_part\_table}} \mbox{\hyperlink{structg__part__bsd__table_af99538e51bc71dcc94f960173db5c97d}{base}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00060}\mbox{\hyperlink{structg__part__bsd__table_afc041c4d07f5831ce43910ab557f71c2}{00060}}         u\_char                  *\mbox{\hyperlink{structg__part__bsd__table_afc041c4d07f5831ce43910ab557f71c2}{bbarea}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00061}\mbox{\hyperlink{structg__part__bsd__table_a2e66cec5e1e6363442d78f0ac2eccfc8}{00061}}         uint32\_t                \mbox{\hyperlink{structg__part__bsd__table_a2e66cec5e1e6363442d78f0ac2eccfc8}{offset}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00062}00062 \};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00063}00063 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00064}\mbox{\hyperlink{structg__part__bsd__entry}{00064}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00065}\mbox{\hyperlink{structg__part__bsd__entry_a34397d4bd661e5cd9ee959b32e902377}{00065}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} \mbox{\hyperlink{structg__part__bsd__entry_a34397d4bd661e5cd9ee959b32e902377}{base}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00066}\mbox{\hyperlink{structg__part__bsd__entry_a713b0f6f6a21eafd67a99e136888eaed}{00066}}         \textcolor{keyword}{struct }partition        \mbox{\hyperlink{structg__part__bsd__entry_a713b0f6f6a21eafd67a99e136888eaed}{part}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00067}00067 \};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00068}00068 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00069}00069 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__bsd_8c_a60abb62be3050adbfc5687267f9cb7dc}{g\_part\_bsd\_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__bsd_8c_source_l00070}00070     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__parms}{g\_part\_parms}} *);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00071}00071 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__bsd_8c_a7724eebc051cdd9e6efa83bd5eb6fdc1}{g\_part\_bsd\_bootcode}}(\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__bsd_8c_source_l00072}00072 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__bsd_8c_aef65a7b3c8264b523cb3a6612f0416a9}{g\_part\_bsd\_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__bsd_8c_source_l00073}00073 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__bsd_8c_aab9d9a6d55509f1a4c14c8ee2de8451c}{g\_part\_bsd\_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__bsd_8c_source_l00074}00074 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__part__bsd_8c_ae039b3c2006a4687d3dec8439adf8b0f}{g\_part\_bsd\_dumpconf}}(\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__bsd_8c_source_l00075}00075     \textcolor{keyword}{struct} sbuf *, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00076}00076 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__bsd_8c_a8bce0b6b931dd4a1ed06bad62878053c}{g\_part\_bsd\_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__bsd_8c_source_l00077}00077 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__bsd_8c_a3b7db01e653adae5d48db9ae4c924064}{g\_part\_bsd\_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__bsd_8c_source_l00078}00078     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__parms}{g\_part\_parms}} *);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00079}00079 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__bsd_8c_ab617f9d7b88a8d19ed9948b6f80161ce}{g\_part\_bsd\_name}}(\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__bsd_8c_source_l00080}00080     \textcolor{keywordtype}{char} *, \textcolor{keywordtype}{size\_t});}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00081}00081 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__bsd_8c_a4c9c2d273ebc3c7b174c7d5a987098bc}{g\_part\_bsd\_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__bsd_8c_source_l00082}00082 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__bsd_8c_a93d4f81f68321fb15ae6644364306462}{g\_part\_bsd\_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__bsd_8c_source_l00083}00083 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__bsd_8c_a167a7fc0e3ddbdb0802d1b9b8ef1d5ca}{g\_part\_bsd\_type}}(\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__bsd_8c_source_l00084}00084     \textcolor{keywordtype}{char} *, \textcolor{keywordtype}{size\_t});}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00085}00085 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__bsd_8c_a84f97867b9bc7260e4d3d7d3a1ec0582}{g\_part\_bsd\_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__bsd_8c_source_l00086}00086 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__part__bsd_8c_a7dde9b6120d35fab082a6b16b48b7019}{g\_part\_bsd\_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__bsd_8c_source_l00087}00087     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__parms}{g\_part\_parms}} *);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00089}\mbox{\hyperlink{g__part__bsd_8c_a315c5988d5abe47cc390c134eefc7f35}{00089}} \textcolor{keyword}{static} kobj\_method\_t \mbox{\hyperlink{g__part__bsd_8c_a315c5988d5abe47cc390c134eefc7f35}{g\_part\_bsd\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00090}00090         KOBJMETHOD(g\_part\_add,          \mbox{\hyperlink{g__part__bsd_8c_a60abb62be3050adbfc5687267f9cb7dc}{g\_part\_bsd\_add}}),}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00091}00091         KOBJMETHOD(g\_part\_bootcode,     \mbox{\hyperlink{g__part__bsd_8c_a7724eebc051cdd9e6efa83bd5eb6fdc1}{g\_part\_bsd\_bootcode}}),}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00092}00092         KOBJMETHOD(g\_part\_create,       \mbox{\hyperlink{g__part__bsd_8c_aef65a7b3c8264b523cb3a6612f0416a9}{g\_part\_bsd\_create}}),}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00093}00093         KOBJMETHOD(g\_part\_destroy,      \mbox{\hyperlink{g__part__bsd_8c_aab9d9a6d55509f1a4c14c8ee2de8451c}{g\_part\_bsd\_destroy}}),}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00094}00094         KOBJMETHOD(\mbox{\hyperlink{g__part_8c_ab34acccc61d4eaae892030944206e9c2}{g\_part\_dumpconf}},      \mbox{\hyperlink{g__part__bsd_8c_ae039b3c2006a4687d3dec8439adf8b0f}{g\_part\_bsd\_dumpconf}}),}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00095}00095         KOBJMETHOD(g\_part\_dumpto,       \mbox{\hyperlink{g__part__bsd_8c_a8bce0b6b931dd4a1ed06bad62878053c}{g\_part\_bsd\_dumpto}}),}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00096}00096         KOBJMETHOD(g\_part\_modify,       \mbox{\hyperlink{g__part__bsd_8c_a3b7db01e653adae5d48db9ae4c924064}{g\_part\_bsd\_modify}}),}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00097}00097         KOBJMETHOD(\mbox{\hyperlink{g__part_8c_a8a5b9fa2481c947e1fa2486f11c77f17}{g\_part\_resize}},  \mbox{\hyperlink{g__part__bsd_8c_a7dde9b6120d35fab082a6b16b48b7019}{g\_part\_bsd\_resize}}),}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00098}00098         KOBJMETHOD(g\_part\_name,         \mbox{\hyperlink{g__part__bsd_8c_ab617f9d7b88a8d19ed9948b6f80161ce}{g\_part\_bsd\_name}}),}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00099}00099         KOBJMETHOD(\mbox{\hyperlink{g__part_8c_af9edeef8af7e4a9bbe5604ef2bcd1266}{g\_part\_probe}},    \mbox{\hyperlink{g__part__bsd_8c_a4c9c2d273ebc3c7b174c7d5a987098bc}{g\_part\_bsd\_probe}}),}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00100}00100         KOBJMETHOD(g\_part\_read,         \mbox{\hyperlink{g__part__bsd_8c_a93d4f81f68321fb15ae6644364306462}{g\_part\_bsd\_read}}),}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00101}00101         KOBJMETHOD(g\_part\_type,         \mbox{\hyperlink{g__part__bsd_8c_a167a7fc0e3ddbdb0802d1b9b8ef1d5ca}{g\_part\_bsd\_type}}),}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00102}00102         KOBJMETHOD(g\_part\_write,        \mbox{\hyperlink{g__part__bsd_8c_a84f97867b9bc7260e4d3d7d3a1ec0582}{g\_part\_bsd\_write}}),}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00103}00103         \{ 0, 0 \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00104}00104 \};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00105}00105 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00106}\mbox{\hyperlink{g__part__bsd_8c_a69356d5bb5291c251bffdc5ffd48936d}{00106}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__scheme}{g\_part\_scheme}} \mbox{\hyperlink{g__part__bsd_8c_a69356d5bb5291c251bffdc5ffd48936d}{g\_part\_bsd\_scheme}} = \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00107}00107         \textcolor{stringliteral}{"{}BSD"{}},}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00108}00108         \mbox{\hyperlink{g__part__bsd_8c_a315c5988d5abe47cc390c134eefc7f35}{g\_part\_bsd\_methods}},}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00109}00109         \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__table}{g\_part\_bsd\_table}}),}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00110}00110         .gps\_entrysz = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}}),}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00111}00111         .gps\_minent = 8,}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00112}00112         .gps\_maxent = 20,       \textcolor{comment}{/* Only 22 entries fit in 512 byte sectors */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00113}00113         .gps\_bootcodesz = BBSIZE,}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00114}00114 \};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00115}\mbox{\hyperlink{g__part__bsd_8c_a8a7bd5c4b92ac8984faf03d450039931}{00115}} \mbox{\hyperlink{g__part__bsd_8c_a8a7bd5c4b92ac8984faf03d450039931}{G\_PART\_SCHEME\_DECLARE}}(g\_part\_bsd);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00116}\mbox{\hyperlink{g__part__bsd_8c_accdfcc08f5959fa406f5aafca089db3c}{00116}} \mbox{\hyperlink{g__part__bsd_8c_accdfcc08f5959fa406f5aafca089db3c}{MODULE\_VERSION}}(geom\_part\_bsd, 0);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00117}00117 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00118}\mbox{\hyperlink{structg__part__bsd__alias}{00118}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__alias}{g\_part\_bsd\_alias}} \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00119}\mbox{\hyperlink{structg__part__bsd__alias_a6a9cb4256d6756be137f36b45f938822}{00119}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structg__part__bsd__alias_a6a9cb4256d6756be137f36b45f938822}{type}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00120}\mbox{\hyperlink{structg__part__bsd__alias_a9b7cbfcf023f877fce447b3ae2cb57de}{00120}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structg__part__bsd__alias_a9b7cbfcf023f877fce447b3ae2cb57de}{alias}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00121}00121 \} \mbox{\hyperlink{g__part__bsd_8c_a34b69a950f3f1f30fe320928252cfe32}{bsd\_alias\_match}}[] = \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00122}00122         \{ FS\_BSDFFS,    \mbox{\hyperlink{g__part_8h_a19b7e9a64cde5cffbdf337cc286615fbad13ec1baa4a93569a10970d2d4e2322f}{G\_PART\_ALIAS\_FREEBSD\_UFS}} \},}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00123}00123         \{ FS\_SWAP,      \mbox{\hyperlink{g__part_8h_a19b7e9a64cde5cffbdf337cc286615fba85b766f7be4fb08c7c8e8beeb5ca8ac6}{G\_PART\_ALIAS\_FREEBSD\_SWAP}} \},}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00124}00124         \{ FS\_ZFS,       \mbox{\hyperlink{g__part_8h_a19b7e9a64cde5cffbdf337cc286615fbaea1794ef53ca052eb2a0d423aa99278c}{G\_PART\_ALIAS\_FREEBSD\_ZFS}} \},}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00125}00125         \{ FS\_VINUM,     \mbox{\hyperlink{g__part_8h_a19b7e9a64cde5cffbdf337cc286615fbaf5371975d479c62f48e2703a43ccc2ad}{G\_PART\_ALIAS\_FREEBSD\_VINUM}} \},}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00126}00126         \{ FS\_NANDFS,    \mbox{\hyperlink{g__part_8h_a19b7e9a64cde5cffbdf337cc286615fba8a6adc68aa1d4e885d9d7f6c7a95b229}{G\_PART\_ALIAS\_FREEBSD\_NANDFS}} \},}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00127}00127         \{ FS\_HAMMER,    \mbox{\hyperlink{g__part_8h_a19b7e9a64cde5cffbdf337cc286615fba77f969ec7bd3617c3ff4268feb53f9fb}{G\_PART\_ALIAS\_DFBSD\_HAMMER}} \},}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00128}00128         \{ FS\_HAMMER2,   \mbox{\hyperlink{g__part_8h_a19b7e9a64cde5cffbdf337cc286615fba5ea3420c7d66c6e4d86d2d8d32320280}{G\_PART\_ALIAS\_DFBSD\_HAMMER2}} \},}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00129}\mbox{\hyperlink{g__part__bsd_8c_a34b69a950f3f1f30fe320928252cfe32}{00129}} \};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00130}00130 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00131}00131 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00132}\mbox{\hyperlink{g__part__bsd_8c_a0919ea5039a5825421ad45ea113ceea3}{00132}} \mbox{\hyperlink{g__part__bsd_8c_a0919ea5039a5825421ad45ea113ceea3}{bsd\_parse\_type}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}}, \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}} *fstype)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00133}00133 \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00134}00134         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *alias;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00135}00135         \textcolor{keywordtype}{char} *endp;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00136}00136         \textcolor{keywordtype}{long} lt;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00137}00137         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00138}00138 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00139}00139         \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}}[0] == \textcolor{charliteral}{'!'}) \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00140}00140                 lt = strtol(\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}} + 1, \&endp, 0);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00141}00141                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}}[1] == \textcolor{charliteral}{'\(\backslash\)0'} || *endp != \textcolor{charliteral}{'\(\backslash\)0'} || lt <= 0 || lt >= 256)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00142}00142                         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00143}00143                 *fstype = (u\_int)lt;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00144}00144                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00145}00145         \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00146}00146         \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{g__part__bsd_8c_a34b69a950f3f1f30fe320928252cfe32}{bsd\_alias\_match}}); i++) \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00147}00147                 alias = \mbox{\hyperlink{g__part_8c_a458397c9a8faf94592039e34134837dc}{g\_part\_alias\_name}}(\mbox{\hyperlink{g__part__bsd_8c_a34b69a950f3f1f30fe320928252cfe32}{bsd\_alias\_match}}[i].alias);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00148}00148                 \textcolor{keywordflow}{if} (strcasecmp(\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}}, alias) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00149}00149                         *fstype = \mbox{\hyperlink{g__part__bsd_8c_a34b69a950f3f1f30fe320928252cfe32}{bsd\_alias\_match}}[i].\mbox{\hyperlink{structg__part__bsd__alias_a6a9cb4256d6756be137f36b45f938822}{type}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00150}00150                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00151}00151                 \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00152}00152         \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00153}00153         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00154}00154 \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00155}00155 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00156}00156 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00157}\mbox{\hyperlink{g__part__bsd_8c_a60abb62be3050adbfc5687267f9cb7dc}{00157}} \mbox{\hyperlink{g__part__bsd_8c_a60abb62be3050adbfc5687267f9cb7dc}{g\_part\_bsd\_add}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *basetable, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *baseentry,}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00158}00158     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__parms}{g\_part\_parms}} *\mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}})}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00159}00159 \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00160}00160         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00161}00161         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__table}{g\_part\_bsd\_table}} *table;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00162}00162 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00163}00163         \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__bsd_8c_source_l00164}00164                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00165}00165 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00166}00166         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *)baseentry;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00167}00167         table = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__table}{g\_part\_bsd\_table}} *)basetable;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00168}00168 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00169}00169         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_size = \mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_a73f7831f174a1aa7c6c6b291b37b565d}{gpp\_size}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00170}00170         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_offset = \mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_a0dafde1b8f8959235573b0479434e2cc}{gpp\_start}} + table-\/>\mbox{\hyperlink{structg__part__bsd__table_a2e66cec5e1e6363442d78f0ac2eccfc8}{offset}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00171}00171         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_fsize = 0;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00172}00172         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_frag = 0;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00173}00173         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_cpg = 0;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00174}00174         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part__bsd_8c_a0919ea5039a5825421ad45ea113ceea3}{bsd\_parse\_type}}(\mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_a01eada6a88b8471f77555e6805d2644a}{gpp\_type}}, \&\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_fstype));}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00175}00175 \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00176}00176 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00177}00177 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00178}\mbox{\hyperlink{g__part__bsd_8c_a7724eebc051cdd9e6efa83bd5eb6fdc1}{00178}} \mbox{\hyperlink{g__part__bsd_8c_a7724eebc051cdd9e6efa83bd5eb6fdc1}{g\_part\_bsd\_bootcode}}(\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__bsd_8c_source_l00179}00179 \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00180}00180         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__table}{g\_part\_bsd\_table}} *table;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00181}00181         \textcolor{keyword}{const} u\_char *codeptr;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00182}00182 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00183}00183         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_acc3de4e9f86b75313ab6fda982809815}{gpp\_codesize}} != \mbox{\hyperlink{g__part__bsd_8c_a4a416e5d827340947fdf53d970888527}{BOOT1\_SIZE}} \&\& \mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_acc3de4e9f86b75313ab6fda982809815}{gpp\_codesize}} != BBSIZE)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00184}00184                 \textcolor{keywordflow}{return} (ENODEV);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00185}00185 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00186}00186         table = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__table}{g\_part\_bsd\_table}} *)basetable;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00187}00187         codeptr = \mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_a3f4c4c99d5414901515b39156ac2f3d5}{gpp\_codeptr}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00188}00188         bcopy(codeptr, table-\/>\mbox{\hyperlink{structg__part__bsd__table_afc041c4d07f5831ce43910ab557f71c2}{bbarea}}, \mbox{\hyperlink{g__part__bsd_8c_a4a416e5d827340947fdf53d970888527}{BOOT1\_SIZE}});}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00189}00189         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_acc3de4e9f86b75313ab6fda982809815}{gpp\_codesize}} == BBSIZE)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00190}00190                 bcopy(codeptr + \mbox{\hyperlink{g__part__bsd_8c_a930f03b183a3fe11c1b25ae6008374b0}{BOOT2\_OFF}}, table-\/>\mbox{\hyperlink{structg__part__bsd__table_afc041c4d07f5831ce43910ab557f71c2}{bbarea}} + \mbox{\hyperlink{g__part__bsd_8c_a930f03b183a3fe11c1b25ae6008374b0}{BOOT2\_OFF}},}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00191}00191                     \mbox{\hyperlink{g__part__bsd_8c_a387a1991a37f6eadd05135b23efbc199}{BOOT2\_SIZE}});}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00192}00192         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00193}00193 \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00194}00194 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00195}00195 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00196}\mbox{\hyperlink{g__part__bsd_8c_aef65a7b3c8264b523cb3a6612f0416a9}{00196}} \mbox{\hyperlink{g__part__bsd_8c_aef65a7b3c8264b523cb3a6612f0416a9}{g\_part\_bsd\_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__bsd_8c_source_l00197}00197 \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00198}00198         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00199}00199         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *baseentry;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00200}00200         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00201}00201         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__table}{g\_part\_bsd\_table}} *table;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00202}00202         u\_char *ptr;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00203}00203         uint32\_t msize, ncyls, secpercyl;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00204}00204 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00205}00205         \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__bsd_8c_source_l00206}00206 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00207}00207         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} < \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} disklabel))}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00208}00208                 \textcolor{keywordflow}{return} (ENOSPC);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00209}00209         \textcolor{keywordflow}{if} (BBSIZE \% \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}})}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00210}00210                 \textcolor{keywordflow}{return} (ENOTBLK);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00211}00211 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00212}00212         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__bsd_8c_source_l00213}00213         secpercyl = basetable-\/>\mbox{\hyperlink{structg__part__table_a5472d6d927a4be105b3ef51f296b4b72}{gpt\_sectors}} * basetable-\/>\mbox{\hyperlink{structg__part__table_a37be862f028201612aaa673c1e501d9b}{gpt\_heads}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00214}00214         ncyls = msize / secpercyl;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00215}00215 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00216}00216         table = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__table}{g\_part\_bsd\_table}} *)basetable;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00217}00217         table-\/>\mbox{\hyperlink{structg__part__bsd__table_afc041c4d07f5831ce43910ab557f71c2}{bbarea}} = \mbox{\hyperlink{geom_8h_a0f190247baa73dc863a79fea9d5f6b4f}{g\_malloc}}(BBSIZE, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00218}00218         ptr = table-\/>\mbox{\hyperlink{structg__part__bsd__table_afc041c4d07f5831ce43910ab557f71c2}{bbarea}} + \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00219}00219 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00220}00220         le32enc(ptr + 0, DISKMAGIC);                    \textcolor{comment}{/* d\_magic */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00221}00221         le32enc(ptr + 40, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});          \textcolor{comment}{/* d\_secsize */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00222}00222         le32enc(ptr + 44, basetable-\/>\mbox{\hyperlink{structg__part__table_a5472d6d927a4be105b3ef51f296b4b72}{gpt\_sectors}});   \textcolor{comment}{/* d\_nsectors */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00223}00223         le32enc(ptr + 48, basetable-\/>\mbox{\hyperlink{structg__part__table_a37be862f028201612aaa673c1e501d9b}{gpt\_heads}});       \textcolor{comment}{/* d\_ntracks */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00224}00224         le32enc(ptr + 52, ncyls);                       \textcolor{comment}{/* d\_ncylinders */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00225}00225         le32enc(ptr + 56, secpercyl);                   \textcolor{comment}{/* d\_secpercyl */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00226}00226         le32enc(ptr + 60, msize);                       \textcolor{comment}{/* d\_secperunit */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00227}00227         le16enc(ptr + 72, 3600);                        \textcolor{comment}{/* d\_rpm */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00228}00228         le32enc(ptr + 132, DISKMAGIC);                  \textcolor{comment}{/* d\_magic2 */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00229}00229         le16enc(ptr + 138, basetable-\/>\mbox{\hyperlink{structg__part__table_a593162aef033d63adcfe51eabd071f7b}{gpt\_entries}});  \textcolor{comment}{/* d\_npartitions */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00230}00230         le32enc(ptr + 140, BBSIZE);                     \textcolor{comment}{/* d\_bbsize */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00231}00231 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00232}00232         basetable-\/>\mbox{\hyperlink{structg__part__table_a20e1ef23449d8669abc2d1737bd04eb7}{gpt\_first}} = 0;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00233}00233         basetable-\/>\mbox{\hyperlink{structg__part__table_aed05f4ae3f70841485bb573fbb21e458}{gpt\_last}} = msize -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00234}00234         basetable-\/>\mbox{\hyperlink{structg__part__table_a9a2e36211034cfeba117148818235994}{gpt\_isleaf}} = 1;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00235}00235 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00236}00236         baseentry = \mbox{\hyperlink{g__part_8c_a010bc380adf72e4e075c5339c3b10f4e}{g\_part\_new\_entry}}(basetable, RAW\_PART + 1,}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00237}00237             basetable-\/>\mbox{\hyperlink{structg__part__table_a20e1ef23449d8669abc2d1737bd04eb7}{gpt\_first}}, basetable-\/>\mbox{\hyperlink{structg__part__table_aed05f4ae3f70841485bb573fbb21e458}{gpt\_last}});}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00238}00238         baseentry-\/>\mbox{\hyperlink{structg__part__entry_a86b17c79d155694f025280d9623e6fbb}{gpe\_internal}} = 1;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00239}00239         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *)baseentry;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00240}00240         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_size = basetable-\/>\mbox{\hyperlink{structg__part__table_aed05f4ae3f70841485bb573fbb21e458}{gpt\_last}} + 1;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00241}00241         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_offset = table-\/>\mbox{\hyperlink{structg__part__bsd__table_a2e66cec5e1e6363442d78f0ac2eccfc8}{offset}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00242}00242 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00243}00243         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00244}00244 \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00245}00245 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00246}00246 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00247}\mbox{\hyperlink{g__part__bsd_8c_aab9d9a6d55509f1a4c14c8ee2de8451c}{00247}} \mbox{\hyperlink{g__part__bsd_8c_aab9d9a6d55509f1a4c14c8ee2de8451c}{g\_part\_bsd\_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__bsd_8c_source_l00248}00248 \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00249}00249         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__table}{g\_part\_bsd\_table}} *table;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00250}00250 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00251}00251         table = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__table}{g\_part\_bsd\_table}} *)basetable;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00252}00252         \textcolor{keywordflow}{if} (table-\/>\mbox{\hyperlink{structg__part__bsd__table_afc041c4d07f5831ce43910ab557f71c2}{bbarea}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00253}00253                 \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(table-\/>\mbox{\hyperlink{structg__part__bsd__table_afc041c4d07f5831ce43910ab557f71c2}{bbarea}});}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00254}00254         table-\/>\mbox{\hyperlink{structg__part__bsd__table_afc041c4d07f5831ce43910ab557f71c2}{bbarea}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00255}00255 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00256}00256         \textcolor{comment}{/* Wipe the second sector to clear the partitioning. */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00257}00257         basetable-\/>\mbox{\hyperlink{structg__part__table_a9e646bdafec74517607d5cbbea17f0d6}{gpt\_smhead}} |= 2;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00258}00258         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00259}00259 \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00260}00260 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00261}00261 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00262}\mbox{\hyperlink{g__part__bsd_8c_ae039b3c2006a4687d3dec8439adf8b0f}{00262}} \mbox{\hyperlink{g__part__bsd_8c_ae039b3c2006a4687d3dec8439adf8b0f}{g\_part\_bsd\_dumpconf}}(\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__bsd_8c_source_l00263}00263     \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__bsd_8c_source_l00264}00264 \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00265}00265         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00266}00266 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00267}00267         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *)baseentry;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00268}00268         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9a0d9ba518bc8db9a623d0a6ab81f81c}{indent}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00269}00269                 \textcolor{comment}{/* conftxt: libdisk compatibility */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00270}00270                 sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{} xs BSD xt \%u"{}}, \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_fstype);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00271}00271         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00272}00272                 \textcolor{comment}{/* confxml: partition entry information */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00273}00273                 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__bsd_8c_source_l00274}00274                     \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_fstype);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00275}00275         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00276}00276                 \textcolor{comment}{/* confxml: scheme information */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00277}00277         \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00278}00278 \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00279}00279 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00280}00280 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00281}\mbox{\hyperlink{g__part__bsd_8c_a8bce0b6b931dd4a1ed06bad62878053c}{00281}} \mbox{\hyperlink{g__part__bsd_8c_a8bce0b6b931dd4a1ed06bad62878053c}{g\_part\_bsd\_dumpto}}(\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__bsd_8c_source_l00282}00282 \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00283}00283         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00284}00284 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00285}00285         \textcolor{comment}{/* Allow dumping to a swap partition or an unused partition. */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00286}00286         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *)baseentry;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00287}00287         \textcolor{keywordflow}{return} ((\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_fstype == FS\_UNUSED ||}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00288}00288             \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_fstype == FS\_SWAP) ? 1 : 0);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00289}00289 \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00290}00290 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00291}00291 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00292}\mbox{\hyperlink{g__part__bsd_8c_a3b7db01e653adae5d48db9ae4c924064}{00292}} \mbox{\hyperlink{g__part__bsd_8c_a3b7db01e653adae5d48db9ae4c924064}{g\_part\_bsd\_modify}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *basetable,}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00293}00293     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *baseentry, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__parms}{g\_part\_parms}} *\mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}})}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00294}00294 \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00295}00295         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00296}00296 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00297}00297         \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__bsd_8c_source_l00298}00298                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00299}00299 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00300}00300         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *)baseentry;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00301}00301         \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__bsd_8c_source_l00302}00302                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part__bsd_8c_a0919ea5039a5825421ad45ea113ceea3}{bsd\_parse\_type}}(\mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_a01eada6a88b8471f77555e6805d2644a}{gpp\_type}}, \&\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_fstype));}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00303}00303         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00304}00304 \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00305}00305 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00306}00306 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00307}\mbox{\hyperlink{g__part__bsd_8c_a1b4f8a097dc5c71c0395f97f5bf930a8}{00307}} \mbox{\hyperlink{g__part__bsd_8c_a1b4f8a097dc5c71c0395f97f5bf930a8}{bsd\_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__bsd_8c_source_l00308}00308 \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00309}00309         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__table}{g\_part\_bsd\_table}} *table;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00310}00310         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00311}00311         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *baseentry;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00312}00312         uint32\_t msize;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00313}00313 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00314}00314         table = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__table}{g\_part\_bsd\_table}} *)basetable;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00315}00315         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__bsd_8c_source_l00316}00316         le32enc(table-\/>\mbox{\hyperlink{structg__part__bsd__table_afc041c4d07f5831ce43910ab557f71c2}{bbarea}} + \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} + 60, msize); \textcolor{comment}{/* d\_secperunit */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00317}00317         basetable-\/>\mbox{\hyperlink{structg__part__table_aed05f4ae3f70841485bb573fbb21e458}{gpt\_last}} = msize -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00318}00318         LIST\_FOREACH(baseentry, \&basetable-\/>gpt\_entry, gpe\_entry) \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00319}00319                 \textcolor{keywordflow}{if} (baseentry-\/>\mbox{\hyperlink{structg__part__entry_a908a1a135d9ed557c57c79d5fd866a02}{gpe\_index}} != RAW\_PART + 1)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00320}00320                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00321}00321                 baseentry-\/>\mbox{\hyperlink{structg__part__entry_ab7641d98c0e79484e0652c795f1123ab}{gpe\_end}} = basetable-\/>\mbox{\hyperlink{structg__part__table_aed05f4ae3f70841485bb573fbb21e458}{gpt\_last}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00322}00322                 \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *)baseentry;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00323}00323                 \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_size = msize;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00324}00324                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00325}00325         \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00326}00326 \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00327}00327 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00328}00328 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00329}\mbox{\hyperlink{g__part__bsd_8c_a7dde9b6120d35fab082a6b16b48b7019}{00329}} \mbox{\hyperlink{g__part__bsd_8c_a7dde9b6120d35fab082a6b16b48b7019}{g\_part\_bsd\_resize}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *basetable,}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00330}00330     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *baseentry, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__parms}{g\_part\_parms}} *\mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}})}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00331}00331 \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00332}00332         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00333}00333         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00334}00334 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00335}00335         \textcolor{keywordflow}{if} (baseentry == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00336}00336                 \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__bsd_8c_source_l00337}00337                 \mbox{\hyperlink{g__part__bsd_8c_a1b4f8a097dc5c71c0395f97f5bf930a8}{bsd\_set\_rawsize}}(basetable, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}});}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00338}00338                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00339}00339         \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00340}00340         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *)baseentry;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00341}00341         baseentry-\/>\mbox{\hyperlink{structg__part__entry_ab7641d98c0e79484e0652c795f1123ab}{gpe\_end}} = baseentry-\/>\mbox{\hyperlink{structg__part__entry_a65789808f851b8e6a71d10511fdcd986}{gpe\_start}} + \mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_a73f7831f174a1aa7c6c6b291b37b565d}{gpp\_size}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00342}00342         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_size = \mbox{\hyperlink{g__part__if_8m_ad13d1d1e03609f599a8c4ea0a6801bf0}{gpp}}-\/>\mbox{\hyperlink{structg__part__parms_a73f7831f174a1aa7c6c6b291b37b565d}{gpp\_size}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00343}00343 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00344}00344         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00345}00345 \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00346}00346 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00347}00347 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00348}\mbox{\hyperlink{g__part__bsd_8c_ab617f9d7b88a8d19ed9948b6f80161ce}{00348}} \mbox{\hyperlink{g__part__bsd_8c_ab617f9d7b88a8d19ed9948b6f80161ce}{g\_part\_bsd\_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__bsd_8c_source_l00349}00349     \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__bsd_8c_source_l00350}00350 \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00351}00351 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00352}00352         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__bsd_8c_source_l00353}00353         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00354}00354 \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00355}00355 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00356}00356 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00357}\mbox{\hyperlink{g__part__bsd_8c_a4c9c2d273ebc3c7b174c7d5a987098bc}{00357}} \mbox{\hyperlink{g__part__bsd_8c_a4c9c2d273ebc3c7b174c7d5a987098bc}{g\_part\_bsd\_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__bsd_8c_source_l00358}00358 \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00359}00359         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00360}00360         u\_char *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00361}00361         uint32\_t magic1, magic2;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00362}00362         \textcolor{keywordtype}{int} \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00363}00363 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00364}00364         \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__bsd_8c_source_l00365}00365 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00366}00366         \textcolor{comment}{/* Sanity-\/check the provider. */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00367}00367         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} < \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} disklabel) ||}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00368}00368             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} < BBSIZE)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00369}00369                 \textcolor{keywordflow}{return} (ENOSPC);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00370}00370         \textcolor{keywordflow}{if} (BBSIZE \% \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}})}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00371}00371                 \textcolor{keywordflow}{return} (ENOTBLK);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00372}00372 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00373}00373         \textcolor{comment}{/* Check that there's a disklabel. */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00374}00374         \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} = \mbox{\hyperlink{geom_8h_a550c2071f79908eea3d1ccbf821c4e4f}{g\_read\_data}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, \&\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00375}00375         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00376}00376                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00377}00377         magic1 = le32dec(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} + 0);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00378}00378         magic2 = le32dec(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} + 132);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00379}00379         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00380}00380         \textcolor{keywordflow}{return} ((magic1 == DISKMAGIC \&\& magic2 == DISKMAGIC)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00381}00381             ? \mbox{\hyperlink{g__part_8h_aea3c4c826b0fc6a7cca61f75fce79a86}{G\_PART\_PROBE\_PRI\_HIGH}} : ENXIO);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00382}00382 \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00383}00383 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00384}00384 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00385}\mbox{\hyperlink{g__part__bsd_8c_a93d4f81f68321fb15ae6644364306462}{00385}} \mbox{\hyperlink{g__part__bsd_8c_a93d4f81f68321fb15ae6644364306462}{g\_part\_bsd\_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__bsd_8c_source_l00386}00386 \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00387}00387         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00388}00388         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__table}{g\_part\_bsd\_table}} *table;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00389}00389         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *baseentry;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00390}00390         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00391}00391         \textcolor{keyword}{struct }partition part;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00392}00392         u\_char *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, *p;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00393}00393         off\_t chs, msize;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00394}00394         u\_int sectors, heads;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00395}00395         \textcolor{keywordtype}{int} error, index;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00396}00396 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00397}00397         \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__bsd_8c_source_l00398}00398         table = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__table}{g\_part\_bsd\_table}} *)basetable;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00399}00399         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__bsd_8c_source_l00400}00400 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00401}00401         table-\/>\mbox{\hyperlink{structg__part__bsd__table_afc041c4d07f5831ce43910ab557f71c2}{bbarea}} = \mbox{\hyperlink{geom_8h_a550c2071f79908eea3d1ccbf821c4e4f}{g\_read\_data}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, 0, BBSIZE, \&error);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00402}00402         \textcolor{keywordflow}{if} (table-\/>\mbox{\hyperlink{structg__part__bsd__table_afc041c4d07f5831ce43910ab557f71c2}{bbarea}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00403}00403                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00404}00404 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00405}00405         \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} = table-\/>\mbox{\hyperlink{structg__part__bsd__table_afc041c4d07f5831ce43910ab557f71c2}{bbarea}} + \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00406}00406 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00407}00407         \textcolor{keywordflow}{if} (le32dec(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} + 40) != \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}})}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00408}00408                 \textcolor{keywordflow}{goto} invalid\_label;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00409}00409         sectors = le32dec(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} + 44);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00410}00410         \textcolor{keywordflow}{if} (sectors < 1 || sectors > 255)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00411}00411                 \textcolor{keywordflow}{goto} invalid\_label;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00412}00412         \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__bsd_8c_source_l00413}00413                 \mbox{\hyperlink{g__part_8c_a107b24cbd5a66afc40731be7ec41c4bb}{g\_part\_geometry\_heads}}(msize, sectors, \&chs, \&heads);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00414}00414                 \textcolor{keywordflow}{if} (chs != 0) \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00415}00415                         basetable-\/>\mbox{\hyperlink{structg__part__table_a5472d6d927a4be105b3ef51f296b4b72}{gpt\_sectors}} = sectors;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00416}00416                         basetable-\/>\mbox{\hyperlink{structg__part__table_a37be862f028201612aaa673c1e501d9b}{gpt\_heads}} = heads;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00417}00417                 \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00418}00418         \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00419}00419         heads = le32dec(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} + 48);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00420}00420         \textcolor{keywordflow}{if} (heads < 1 || heads > 255)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00421}00421                 \textcolor{keywordflow}{goto} invalid\_label;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00422}00422         \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__bsd_8c_source_l00423}00423                 basetable-\/>\mbox{\hyperlink{structg__part__table_a37be862f028201612aaa673c1e501d9b}{gpt\_heads}} = heads;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00424}00424 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00425}00425         chs = le32dec(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} + 60);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00426}00426         \textcolor{keywordflow}{if} (chs < 1)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00427}00427                 \textcolor{keywordflow}{goto} invalid\_label;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00428}00428         \textcolor{comment}{/* Fix-\/up a sysinstall bug. */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00429}00429         \textcolor{keywordflow}{if} (chs > msize) \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00430}00430                 chs = msize;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00431}00431                 le32enc(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} + 60, msize);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00432}00432         \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00433}00433 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00434}00434         basetable-\/>\mbox{\hyperlink{structg__part__table_a20e1ef23449d8669abc2d1737bd04eb7}{gpt\_first}} = 0;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00435}00435         basetable-\/>\mbox{\hyperlink{structg__part__table_aed05f4ae3f70841485bb573fbb21e458}{gpt\_last}} = msize -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00436}00436         basetable-\/>\mbox{\hyperlink{structg__part__table_a9a2e36211034cfeba117148818235994}{gpt\_isleaf}} = 1;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00437}00437 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00438}00438         basetable-\/>\mbox{\hyperlink{structg__part__table_a593162aef033d63adcfe51eabd071f7b}{gpt\_entries}} = le16dec(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} + 138);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00439}00439         \textcolor{keywordflow}{if} (basetable-\/>\mbox{\hyperlink{structg__part__table_a593162aef033d63adcfe51eabd071f7b}{gpt\_entries}} < \mbox{\hyperlink{g__part__bsd_8c_a69356d5bb5291c251bffdc5ffd48936d}{g\_part\_bsd\_scheme}}.\mbox{\hyperlink{structg__part__scheme_af04d6b8ba2feeef7f3220e5ac951b13a}{gps\_minent}} ||}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00440}00440             basetable-\/>\mbox{\hyperlink{structg__part__table_a593162aef033d63adcfe51eabd071f7b}{gpt\_entries}} > \mbox{\hyperlink{g__part__bsd_8c_a69356d5bb5291c251bffdc5ffd48936d}{g\_part\_bsd\_scheme}}.\mbox{\hyperlink{structg__part__scheme_ae5fe6c9fb2a0d11174280e1cf270ec8c}{gps\_maxent}})}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00441}00441                 \textcolor{keywordflow}{goto} invalid\_label;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00442}00442 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00443}00443         table-\/>\mbox{\hyperlink{structg__part__bsd__table_a2e66cec5e1e6363442d78f0ac2eccfc8}{offset}} = le32dec(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} + 148 + RAW\_PART * 16 + 4);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00444}00444         \textcolor{keywordflow}{for} (index = basetable-\/>\mbox{\hyperlink{structg__part__table_a593162aef033d63adcfe51eabd071f7b}{gpt\_entries}} -\/ 1; index >= 0; index-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00445}00445                 p = \mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} + 148 + index * 16;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00446}00446                 part.p\_size = le32dec(p + 0);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00447}00447                 part.p\_offset = le32dec(p + 4);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00448}00448                 part.p\_fsize = le32dec(p + 8);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00449}00449                 part.p\_fstype = p[12];}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00450}00450                 part.p\_frag = p[13];}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00451}00451                 part.p\_cpg = le16dec(p + 14);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00452}00452                 \textcolor{keywordflow}{if} (part.p\_size == 0)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00453}00453                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00454}00454                 \textcolor{keywordflow}{if} (part.p\_offset < table-\/>\mbox{\hyperlink{structg__part__bsd__table_a2e66cec5e1e6363442d78f0ac2eccfc8}{offset}})}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00455}00455                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00456}00456                 \textcolor{keywordflow}{if} (part.p\_offset -\/ table-\/>\mbox{\hyperlink{structg__part__bsd__table_a2e66cec5e1e6363442d78f0ac2eccfc8}{offset}} > basetable-\/>\mbox{\hyperlink{structg__part__table_aed05f4ae3f70841485bb573fbb21e458}{gpt\_last}})}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00457}00457                         \textcolor{keywordflow}{goto} invalid\_label;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00458}00458                 baseentry = \mbox{\hyperlink{g__part_8c_a010bc380adf72e4e075c5339c3b10f4e}{g\_part\_new\_entry}}(basetable, index + 1,}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00459}00459                     part.p\_offset -\/ table-\/>\mbox{\hyperlink{structg__part__bsd__table_a2e66cec5e1e6363442d78f0ac2eccfc8}{offset}},}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00460}00460                     part.p\_offset -\/ table-\/>\mbox{\hyperlink{structg__part__bsd__table_a2e66cec5e1e6363442d78f0ac2eccfc8}{offset}} + part.p\_size -\/ 1);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00461}00461                 \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *)baseentry;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00462}00462                 \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part = \mbox{\hyperlink{structg__part__bsd__entry_a713b0f6f6a21eafd67a99e136888eaed}{part}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00463}00463                 \textcolor{keywordflow}{if} (index == RAW\_PART)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00464}00464                         baseentry-\/>\mbox{\hyperlink{structg__part__entry_a86b17c79d155694f025280d9623e6fbb}{gpe\_internal}} = 1;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00465}00465         \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00466}00466 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00467}00467         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00468}00468 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00469}00469  invalid\_label:}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00470}00470         printf(\textcolor{stringliteral}{"{}GEOM: \%s: invalid disklabel.\(\backslash\)n"{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00471}00471         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(table-\/>\mbox{\hyperlink{structg__part__bsd__table_afc041c4d07f5831ce43910ab557f71c2}{bbarea}});}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00472}00472         table-\/>\mbox{\hyperlink{structg__part__bsd__table_afc041c4d07f5831ce43910ab557f71c2}{bbarea}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00473}00473         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00474}00474 \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00475}00475 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00476}00476 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00477}\mbox{\hyperlink{g__part__bsd_8c_a167a7fc0e3ddbdb0802d1b9b8ef1d5ca}{00477}} \mbox{\hyperlink{g__part__bsd_8c_a167a7fc0e3ddbdb0802d1b9b8ef1d5ca}{g\_part\_bsd\_type}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__table}{g\_part\_table}} *basetable, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *baseentry,}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00478}00478     \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__bsd_8c_source_l00479}00479 \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00480}00480         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00481}00481         \textcolor{keywordtype}{int} \mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00482}00482 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00483}00483         \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *)baseentry;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00484}00484         \mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}} = \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_fstype;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00485}00485         \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}} == FS\_NANDFS)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00486}00486                 \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__bsd_8c_source_l00487}00487         \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}} == FS\_SWAP)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00488}00488                 \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__bsd_8c_source_l00489}00489         \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}} == FS\_BSDFFS)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00490}00490                 \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__bsd_8c_source_l00491}00491         \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}} == FS\_VINUM)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00492}00492                 \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__bsd_8c_source_l00493}00493         \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}} == FS\_ZFS)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00494}00494                 \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__bsd_8c_source_l00495}00495         snprintf(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \mbox{\hyperlink{g__part__if_8m_a2a0790e716bccb2471387f8758962a1b}{bufsz}}, \textcolor{stringliteral}{"{}!\%d"{}}, \mbox{\hyperlink{geom__flashmap_8c_a763fd8db6bba8fbbbc113ca0d61c47c2}{type}});}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00496}00496         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00497}00497 \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00498}00498 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00499}00499 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00500}\mbox{\hyperlink{g__part__bsd_8c_a84f97867b9bc7260e4d3d7d3a1ec0582}{00500}} \mbox{\hyperlink{g__part__bsd_8c_a84f97867b9bc7260e4d3d7d3a1ec0582}{g\_part\_bsd\_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__bsd_8c_source_l00501}00501 \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00502}00502         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00503}00503         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__entry}{g\_part\_entry}} *baseentry;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00504}00504         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00505}00505         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__table}{g\_part\_bsd\_table}} *table;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00506}00506         uint16\_t sum;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00507}00507         u\_char *label, *p, *pe;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00508}00508         \textcolor{keywordtype}{int} error, index;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00509}00509 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00510}00510         \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__bsd_8c_source_l00511}00511         table = (\textcolor{keyword}{struct }\mbox{\hyperlink{structg__part__bsd__table}{g\_part\_bsd\_table}} *)basetable;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00512}00512         baseentry = LIST\_FIRST(\&basetable-\/>gpt\_entry);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00513}00513         label = table-\/>\mbox{\hyperlink{structg__part__bsd__table_afc041c4d07f5831ce43910ab557f71c2}{bbarea}} + \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00514}00514         \textcolor{keywordflow}{for} (index = 1; index <= basetable-\/>\mbox{\hyperlink{structg__part__table_a593162aef033d63adcfe51eabd071f7b}{gpt\_entries}}; index++) \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00515}00515                 p = label + 148 + (index -\/ 1) * 16;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00516}00516                 \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} = (baseentry != NULL \&\& index == baseentry-\/>\mbox{\hyperlink{structg__part__entry_a908a1a135d9ed557c57c79d5fd866a02}{gpe\_index}})}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00517}00517                     ? (\textcolor{keyword}{struct} \mbox{\hyperlink{structg__part__bsd__entry}{g\_part\_bsd\_entry}} *)baseentry : NULL;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00518}00518                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} != NULL \&\& !baseentry-\/>\mbox{\hyperlink{structg__part__entry_a4c7748c49b831d481c9fd5c26f2aaf0b}{gpe\_deleted}}) \{}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00519}00519                         le32enc(p + 0, \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_size);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00520}00520                         le32enc(p + 4, \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_offset);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00521}00521                         le32enc(p + 8, \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_fsize);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00522}00522                         p[12] = \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_fstype;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00523}00523                         p[13] = \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_frag;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00524}00524                         le16enc(p + 14, \mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}}-\/>part.p\_cpg);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00525}00525                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00526}00526                         bzero(p, 16);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00527}00527 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00528}00528                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a2c2a1eba20a891e9a733abad308a3bbc}{entry}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00529}00529                         baseentry = LIST\_NEXT(baseentry, gpe\_entry);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00530}00530         \}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00531}00531 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00532}00532         \textcolor{comment}{/* Calculate checksum. */}}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00533}00533         le16enc(label + 136, 0);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00534}00534         pe = label + 148 + basetable-\/>\mbox{\hyperlink{structg__part__table_a593162aef033d63adcfe51eabd071f7b}{gpt\_entries}} * 16;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00535}00535         sum = 0;}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00536}00536         \textcolor{keywordflow}{for} (p = label; p < pe; p += 2)}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00537}00537                 sum \string^= le16dec(p);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00538}00538         le16enc(label + 136, sum);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00539}00539 }
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00540}00540         error = \mbox{\hyperlink{geom_8h_a9b87ecbd812c109546b077da483baada}{g\_write\_data}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, 0, table-\/>\mbox{\hyperlink{structg__part__bsd__table_afc041c4d07f5831ce43910ab557f71c2}{bbarea}}, BBSIZE);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00541}00541         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__part__bsd_8c_source_l00542}00542 \}}

\end{DoxyCode}
