\hypertarget{g__label_8c_source}{}\doxysection{g\+\_\+label.\+c}
\label{g__label_8c_source}\index{geom/label/g\_label.c@{geom/label/g\_label.c}}
\mbox{\hyperlink{g__label_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2004-\/2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00029}00029 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00030}\mbox{\hyperlink{g__label_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00030}} \mbox{\hyperlink{g__label_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00032}00032 \textcolor{preprocessor}{\#include "{}opt\_geom.h"{}}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00033}00033 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/bio.h>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/ctype.h>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/libkern.h>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/sbuf.h>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/stddef.h>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom_8h}{geom/geom.h}}>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom__dbg_8h}{geom/geom\_dbg.h}}>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom__slice_8h}{geom/geom\_slice.h}}>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{g__label_8h}{geom/label/g\_label.h}}>}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00051}00051 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00052}\mbox{\hyperlink{g__label_8c_aa47ede8cbb64053ce6c7f61ff5070f88}{00052}} \mbox{\hyperlink{g__label_8c_aa47ede8cbb64053ce6c7f61ff5070f88}{FEATURE}}(geom\_label, \textcolor{stringliteral}{"{}GEOM labeling support"{}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00053}00053 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00054}\mbox{\hyperlink{g__label_8c_a1e69eaa2ef6048550eaeebcf775a3d0f}{00054}} \mbox{\hyperlink{g__label_8c_a1e69eaa2ef6048550eaeebcf775a3d0f}{SYSCTL\_DECL}}(\_kern\_geom);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00055}\mbox{\hyperlink{g__label_8c_a70f1bb2bb9ac4368c5a83c356a2d9ba4}{00055}} \mbox{\hyperlink{g__label_8c_a70f1bb2bb9ac4368c5a83c356a2d9ba4}{SYSCTL\_NODE}}(\_kern\_geom, OID\_AUTO, label, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00056}00056     \textcolor{stringliteral}{"{}GEOM\_LABEL stuff"{}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00057}\mbox{\hyperlink{g__label_8c_a4258a1255f69b3561a1875a8669895ca}{00057}} u\_int \mbox{\hyperlink{g__label_8c_a4258a1255f69b3561a1875a8669895ca}{g\_label\_debug}} = 0;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00058}\mbox{\hyperlink{g__label_8c_a8fdf63938164724bcc42edf6a47ba9f3}{00058}} \mbox{\hyperlink{g__label_8c_a8fdf63938164724bcc42edf6a47ba9f3}{SYSCTL\_UINT}}(\_kern\_geom\_label, OID\_AUTO, debug, CTLFLAG\_RWTUN, \&\mbox{\hyperlink{g__label_8c_a4258a1255f69b3561a1875a8669895ca}{g\_label\_debug}}, 0,}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00059}00059     \textcolor{stringliteral}{"{}Debug level"{}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00060}00060 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00061}\mbox{\hyperlink{g__label_8c_a1162e78ff1cf57f724306f97d92606f3}{00061}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__label_8c_a1162e78ff1cf57f724306f97d92606f3}{g\_label\_destroy\_geom}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00062}00062     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00063}00063 \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__label_8c_a1aede8b144f76c3077735fe167c49da9}{g\_label\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, boolean\_t force);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00064}00064 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__label_8c_a48339b8a35715fd9a5f1403839842831}{g\_label\_taste}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00065}00065     \textcolor{keywordtype}{int} \mbox{\hyperlink{structg__geom_afa218bd6b4ead71e6238ecd0577e1cc9}{flags}} \_\_unused);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00066}00066 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__label_8c_a213793c354c58afceff9b8fe23a5e469}{g\_label\_generic\_taste}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *, \textcolor{keywordtype}{char} *, \textcolor{keywordtype}{size\_t});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00067}00067 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__label_8c_a8d9ea560be826867934db6b77b1d1e3c}{g\_label\_config}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00068}00068     \textcolor{keyword}{const} \textcolor{keywordtype}{char} *verb);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00070}\mbox{\hyperlink{g__label_8c_a519047e6653e46222c2a0e084a270ae4}{00070}} \textcolor{preprocessor}{\#define G\_LABEL\_DIRPREFIX       "{}label/"{}}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00071}00071 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00072}\mbox{\hyperlink{g__label_8c_a57f2edbb9aa4321b9b70fa10354c3711}{00072}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__class}{g\_class}} \mbox{\hyperlink{g__label_8c_a57f2edbb9aa4321b9b70fa10354c3711}{g\_label\_class}} = \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00073}00073         .\mbox{\hyperlink{structg__class_a66bf8381cf0afbf7ccdebfa6b90a4a96}{name}} = \mbox{\hyperlink{g__label_8h_a23e3c9bcc5e68da160f248e8e319e2c2}{G\_LABEL\_CLASS\_NAME}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00074}00074         .version = \mbox{\hyperlink{geom_8h_a33025dbc893de9dc049ba2f30283bc5a}{G\_VERSION}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00075}00075         .ctlreq = \mbox{\hyperlink{g__label_8c_a8d9ea560be826867934db6b77b1d1e3c}{g\_label\_config}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00076}00076         .taste = \mbox{\hyperlink{g__label_8c_a48339b8a35715fd9a5f1403839842831}{g\_label\_taste}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00077}00077         .destroy\_geom = \mbox{\hyperlink{g__label_8c_a1162e78ff1cf57f724306f97d92606f3}{g\_label\_destroy\_geom}}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00078}00078 \};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00079}00079 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00080}\mbox{\hyperlink{g__label_8c_a8f880e15f71187abb9b4843f495d1ac1}{00080}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__label__desc}{g\_label\_desc}} \mbox{\hyperlink{g__label_8c_a8f880e15f71187abb9b4843f495d1ac1}{g\_label\_generic}} = \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00081}00081         .\mbox{\hyperlink{structg__label__desc_a5c38840bd2d369860b22fb12362fb4de}{ld\_taste}} = \mbox{\hyperlink{g__label_8c_a213793c354c58afceff9b8fe23a5e469}{g\_label\_generic\_taste}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00082}00082         .ld\_dirprefix = \mbox{\hyperlink{g__label_8c_a519047e6653e46222c2a0e084a270ae4}{G\_LABEL\_DIRPREFIX}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00083}00083         .ld\_enabled = 1}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00084}00084 \};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00085}00085 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00086}00086 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00087}00087 \textcolor{comment}{ * To add a new file system where you want to look for volume labels,}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00088}00088 \textcolor{comment}{ * you have to:}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00089}00089 \textcolor{comment}{ * 1. Add a file g\_label\_<file system>.c which implements labels recognition.}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00090}00090 \textcolor{comment}{ * 2. Add an 'extern const struct g\_label\_desc g\_label\_<file system>;' into}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00091}00091 \textcolor{comment}{ *    g\_label.h file.}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00092}00092 \textcolor{comment}{ * 3. Add an element to the table below '\&g\_label\_<file system>,'.}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00093}00093 \textcolor{comment}{ * 4. Add your file to sys/conf/files.}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00094}00094 \textcolor{comment}{ * 5. Add your file to sys/modules/geom/geom\_label/Makefile.}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00095}00095 \textcolor{comment}{ * 6. Add your file system to manual page sbin/geom/class/label/glabel.8.}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00096}00096 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00097}\mbox{\hyperlink{g__label_8c_a71fc9bf444b0550cf626b52efdc38359}{00097}} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__label__desc}{g\_label\_desc}} *\mbox{\hyperlink{g__label_8c_a71fc9bf444b0550cf626b52efdc38359}{g\_labels}}[] = \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00098}00098         \&\mbox{\hyperlink{g__label_8h_aa77227c8bfbb3b94cfa29d12c43ec1d3}{g\_label\_gpt}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00099}00099         \&\mbox{\hyperlink{g__label_8h_a6283a3f2ecad6bf8fa82755dc2b94be6}{g\_label\_gpt\_uuid}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00100}00100 \textcolor{preprocessor}{\#ifdef GEOM\_LABEL}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00101}00101         \&\mbox{\hyperlink{g__label_8h_a67e7d756f50cf40bfc473448b74e707c}{g\_label\_ufs\_id}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00102}00102         \&\mbox{\hyperlink{g__label_8h_a7247329b243853a756bf77c93874e97e}{g\_label\_ufs\_volume}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00103}00103         \&\mbox{\hyperlink{g__label_8h_a3caa72f2a1975576ab1cf6013843daad}{g\_label\_iso9660}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00104}00104         \&\mbox{\hyperlink{g__label_8h_a77907707b2dd9e45f38247e8453e623e}{g\_label\_msdosfs}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00105}00105         \&\mbox{\hyperlink{g__label_8h_aee5029dd26174bb2637b4818f3397fe2}{g\_label\_ext2fs}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00106}00106         \&\mbox{\hyperlink{g__label_8h_a95bc37d8e8ceeb45cf96a5011674426f}{g\_label\_reiserfs}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00107}00107         \&\mbox{\hyperlink{g__label_8h_aa16b0837cf9d07aaf79b69b0eb9d7b4e}{g\_label\_ntfs}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00108}00108         \&\mbox{\hyperlink{g__label_8h_a0314b7a0dd527ba2cacc12f1d49e003d}{g\_label\_disk\_ident}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00109}00109         \&\mbox{\hyperlink{g__label_8h_aaf7e79ca6e8cf12d525a741e780ff281}{g\_label\_flashmap}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00110}00110 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00111}00111         \&\mbox{\hyperlink{g__label_8c_a8f880e15f71187abb9b4843f495d1ac1}{g\_label\_generic}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00112}00112         NULL}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00113}00113 \};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00114}00114 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00115}00115 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00116}\mbox{\hyperlink{g__label_8c_a6d378a52093aa49195b15e436640289f}{00116}} \mbox{\hyperlink{g__label_8c_a6d378a52093aa49195b15e436640289f}{g\_label\_rtrim}}(\textcolor{keywordtype}{char} *label, \textcolor{keywordtype}{size\_t} size)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00117}00117 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00118}00118         ptrdiff\_t i;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00119}00119 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00120}00120         \textcolor{keywordflow}{for} (i = size -\/ 1; i >= 0; i-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00121}00121                 \textcolor{keywordflow}{if} (label[i] == \textcolor{charliteral}{'\(\backslash\)0'})}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00122}00122                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00123}00123                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (label[i] == \textcolor{charliteral}{' '})}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00124}00124                         label[i] = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00125}00125                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00126}00126                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00127}00127         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00128}00128 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00129}00129 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00130}00130 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00131}\mbox{\hyperlink{g__label_8c_a08873061e55ad1fcf64c69cefded3de4}{00131}} \mbox{\hyperlink{g__label_8c_a1162e78ff1cf57f724306f97d92606f3}{g\_label\_destroy\_geom}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}} \_\_unused, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00132}00132     \textcolor{keyword}{struct} \mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} \_\_unused)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00133}00133 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00134}00134 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00135}00135         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00136}00136 \textcolor{comment}{         * XXX: Unloading a class which is using geom\_slice:1.56 is currently}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00137}00137 \textcolor{comment}{         * XXX: broken, so we deny unloading when we have geoms.}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00138}00138 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00139}00139         \textcolor{keywordflow}{return} (EOPNOTSUPP);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00140}00140 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00141}00141 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00142}00142 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00143}\mbox{\hyperlink{g__label_8c_ade29454c7605b84ee2e47b6e90cbb19e}{00143}} \mbox{\hyperlink{g__label_8c_ade29454c7605b84ee2e47b6e90cbb19e}{g\_label\_orphan}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00144}00144 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00146}00146         \mbox{\hyperlink{g__label_8h_ab435bceb519dfa97ee448bc0f18e200f}{G\_LABEL\_DEBUG}}(1, \textcolor{stringliteral}{"{}Label \%s removed."{}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00147}00147             LIST\_FIRST(\&\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a75734fc8cd22ffc4209c36cc0a459cba}{geom}}-\/>provider)-\/>name);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00148}00148         \mbox{\hyperlink{geom__slice_8c_a4027c1bceba6cea24ab56fb0564276f2}{g\_slice\_orphan}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00149}00149 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00150}00150 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00151}00151 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00152}\mbox{\hyperlink{g__label_8c_af6edd9eb4be78f38012a6a159b903b5f}{00152}} \mbox{\hyperlink{g__label_8c_af6edd9eb4be78f38012a6a159b903b5f}{g\_label\_spoiled}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00153}00153 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00154}00154 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00155}00155         \mbox{\hyperlink{g__label_8h_ab435bceb519dfa97ee448bc0f18e200f}{G\_LABEL\_DEBUG}}(1, \textcolor{stringliteral}{"{}Label \%s removed."{}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00156}00156             LIST\_FIRST(\&\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a75734fc8cd22ffc4209c36cc0a459cba}{geom}}-\/>provider)-\/>name);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00157}00157         \mbox{\hyperlink{geom__slice_8c_a59485c0befa87323ae0134fdfade9359}{g\_slice\_spoiled}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00158}00158 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00159}00159 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00160}00160 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00161}\mbox{\hyperlink{g__label_8c_aead581f812170b0d8079b51204520b42}{00161}} \mbox{\hyperlink{g__label_8c_aead581f812170b0d8079b51204520b42}{g\_label\_resize}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}})}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00162}00162 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00163}00163 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00164}00164         \mbox{\hyperlink{g__label_8h_ab435bceb519dfa97ee448bc0f18e200f}{G\_LABEL\_DEBUG}}(1, \textcolor{stringliteral}{"{}Label \%s resized."{}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00165}00165             LIST\_FIRST(\&\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a75734fc8cd22ffc4209c36cc0a459cba}{geom}}-\/>provider)-\/>name);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00166}00166 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00167}00167         \mbox{\hyperlink{geom__slice_8c_aca4428bf16e4be4644b9aeab957f13bc}{g\_slice\_config}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a75734fc8cd22ffc4209c36cc0a459cba}{geom}}, 0, \mbox{\hyperlink{geom__slice_8h_ab1b2c519df001a93387a5d1e9de00029}{G\_SLICE\_CONFIG\_FORCE}}, (off\_t)0,}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00168}00168             \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}}, \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, \textcolor{stringliteral}{"{}notused"{}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00169}00169 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00170}00170 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00171}00171 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00172}\mbox{\hyperlink{g__label_8c_a0f253f1394f7b5c9304605e586e2f9db}{00172}} \mbox{\hyperlink{g__label_8c_a0f253f1394f7b5c9304605e586e2f9db}{g\_label\_is\_name\_ok}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *label)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00173}00173 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00174}00174         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *s;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00175}00175 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00176}00176         \textcolor{comment}{/* Check if the label starts from ../ */}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00177}00177         \textcolor{keywordflow}{if} (strncmp(label, \textcolor{stringliteral}{"{}../"{}}, 3) == 0)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00178}00178                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00179}00179         \textcolor{comment}{/* Check if the label contains /../ */}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00180}00180         \textcolor{keywordflow}{if} (strstr(label, \textcolor{stringliteral}{"{}/../"{}}) != NULL)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00181}00181                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00182}00182         \textcolor{comment}{/* Check if the label ends at ../ */}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00183}00183         \textcolor{keywordflow}{if} ((s = strstr(label, \textcolor{stringliteral}{"{}/.."{}})) != NULL \&\& s[3] == \textcolor{charliteral}{'\(\backslash\)0'})}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00184}00184                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00185}00185         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00186}00186 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00187}00187 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00188}00188 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00189}\mbox{\hyperlink{g__label_8c_add433f8a022ebcecae97931f17004700}{00189}} \mbox{\hyperlink{g__label_8c_add433f8a022ebcecae97931f17004700}{g\_label\_mangle\_name}}(\textcolor{keywordtype}{char} *label, \textcolor{keywordtype}{size\_t} size)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00190}00190 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00191}00191         \textcolor{keyword}{struct }sbuf *\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00192}00192         \textcolor{keyword}{const} u\_char *c;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00193}00193         \textcolor{keywordtype}{size\_t} len, i;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00194}00194 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00195}00195         \textcolor{comment}{/* Trim trailing whitespace. */}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00196}00196         len = strlen(label);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00197}00197         \textcolor{keywordflow}{for} (i = len; i > 0; i-\/-\/) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00198}00198                 \textcolor{keywordflow}{if} (isspace(label[i -\/ 1]))}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00199}00199                         label[i -\/ 1] = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00200}00200                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00201}00201                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00202}00202         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00203}00203         \textcolor{keywordflow}{if} (*label == \textcolor{charliteral}{'\(\backslash\)0'})}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00204}00204                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00205}00205 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00206}00206         \mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}} = sbuf\_new(NULL, NULL, size, SBUF\_FIXEDLEN);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00207}00207         \textcolor{keywordflow}{for} (c = label; *c != \textcolor{charliteral}{'\(\backslash\)0'}; c++) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00208}00208                 \textcolor{comment}{/* Trim leading whitespace. */}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00209}00209                 \textcolor{keywordflow}{if} (isspace(*c) \&\& sbuf\_len(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00210}00210                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00211}00211                 \textcolor{keywordflow}{if} (!isprint(*c) || isspace(*c) || *c ==\textcolor{charliteral}{'"{}'} || *c == \textcolor{charliteral}{'\%'})}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00212}00212                         sbuf\_printf(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, \textcolor{stringliteral}{"{}\%\%\%02X"{}}, *c);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00213}00213                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00214}00214                         sbuf\_putc(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}, *c);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00215}00215         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00216}00216         \textcolor{keywordflow}{if} (sbuf\_finish(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00217}00217                 label[0] = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00218}00218         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00219}00219                 strlcpy(label, sbuf\_data(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}}), size);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00220}00220         sbuf\_delete(\mbox{\hyperlink{g__part__if_8m_a4c23eb4bab5aa5d69bd84384b94d1f79}{sb}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00221}00221 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00222}00222 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00223}00223 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00224}\mbox{\hyperlink{g__label_8c_a4f714c382afa9e1f3d66e7382fdabd62}{00224}} \mbox{\hyperlink{g__label_8c_a4f714c382afa9e1f3d66e7382fdabd62}{g\_label\_create}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00225}00225     \textcolor{keyword}{const} \textcolor{keywordtype}{char} *label, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *dirprefix, off\_t mediasize)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00226}00226 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00227}00227         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00228}00228         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *pp2;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00229}00229         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00230}00230         \textcolor{keywordtype}{char} \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}[64];}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00231}00231 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00232}00232         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00233}00233 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00234}00234         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{g__label_8c_a0f253f1394f7b5c9304605e586e2f9db}{g\_label\_is\_name\_ok}}(label)) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00235}00235                 \mbox{\hyperlink{g__label_8h_ab435bceb519dfa97ee448bc0f18e200f}{G\_LABEL\_DEBUG}}(0, \textcolor{stringliteral}{"{}\%s contains suspicious label, skipping."{}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00236}00236                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00237}00237                 \mbox{\hyperlink{g__label_8h_ab435bceb519dfa97ee448bc0f18e200f}{G\_LABEL\_DEBUG}}(1, \textcolor{stringliteral}{"{}\%s suspicious label is: \%s"{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, label);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00238}00238                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00239}00239                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Label name \%s is invalid."{}}, label);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00240}00240                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00241}00241         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00242}00242         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00243}00243         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = NULL;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00244}00244         \textcolor{keywordflow}{if} (snprintf(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}), \textcolor{stringliteral}{"{}\%s\%s"{}}, dirprefix, label) >= \textcolor{keyword}{sizeof}(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}})) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00245}00245                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00246}00246                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Label name \%s is too long."{}}, label);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00247}00247                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00248}00248         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00249}00249         LIST\_FOREACH(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \&\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>geom, \mbox{\hyperlink{structg__consumer_a75734fc8cd22ffc4209c36cc0a459cba}{geom}}) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00250}00250                 pp2 = LIST\_FIRST(\&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>provider);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00251}00251                 \textcolor{keywordflow}{if} (pp2 == NULL)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00252}00252                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00253}00253                 \textcolor{keywordflow}{if} ((pp2-\/>\mbox{\hyperlink{structg__provider_a2d2060ee918007b601780f93a39c30de}{flags}} \& \mbox{\hyperlink{geom_8h_a91dc9e9d833286af1245a508852db3aa}{G\_PF\_ORPHAN}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00254}00254                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00255}00255                 \textcolor{keywordflow}{if} (strcmp(pp2-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00256}00256                         \mbox{\hyperlink{g__label_8h_ab435bceb519dfa97ee448bc0f18e200f}{G\_LABEL\_DEBUG}}(1, \textcolor{stringliteral}{"{}Label \%s(\%s) already exists (\%s)."{}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00257}00257                             label, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00258}00258                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00259}00259                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Provider \%s already exists."{}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00260}00260                                     \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00261}00261                         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00262}00262                         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00263}00263                 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00264}00264         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00265}00265         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{geom__slice_8c_aaf1282e05964a6882971c6eca3e1604b}{g\_slice\_new}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, 1, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \&\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, NULL, 0, NULL);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00266}00266         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00267}00267                 \mbox{\hyperlink{g__label_8h_ab435bceb519dfa97ee448bc0f18e200f}{G\_LABEL\_DEBUG}}(0, \textcolor{stringliteral}{"{}Cannot create slice \%s."{}}, label);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00268}00268                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00269}00269                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Cannot create slice \%s."{}}, label);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00270}00270                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00271}00271         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00272}00272         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a67386b3b9a49233eca9f73d28bc70325}{orphan}} = \mbox{\hyperlink{g__label_8c_ade29454c7605b84ee2e47b6e90cbb19e}{g\_label\_orphan}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00273}00273         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a0a74cfab0860e32fcfd20a3846b401a7}{spoiled}} = \mbox{\hyperlink{g__label_8c_af6edd9eb4be78f38012a6a159b903b5f}{g\_label\_spoiled}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00274}00274         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a409b63ae6b13027cd858840933685987}{resize}} = \mbox{\hyperlink{g__label_8c_aead581f812170b0d8079b51204520b42}{g\_label\_resize}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00275}00275         \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, -\/1, 0, 0);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00276}00276         \mbox{\hyperlink{geom__slice_8c_aca4428bf16e4be4644b9aeab957f13bc}{g\_slice\_config}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, 0, \mbox{\hyperlink{geom__slice_8h_a980d4bd1e3d3a711057dd4419b0c9ad9}{G\_SLICE\_CONFIG\_SET}}, (off\_t)0, mediasize,}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00277}00277             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, \textcolor{stringliteral}{"{}\%s"{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00278}00278         \mbox{\hyperlink{g__label_8h_ab435bceb519dfa97ee448bc0f18e200f}{G\_LABEL\_DEBUG}}(1, \textcolor{stringliteral}{"{}Label for provider \%s is \%s."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00279}00279         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00280}00280 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00281}00281 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00282}00282 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00283}\mbox{\hyperlink{g__label_8c_a1aede8b144f76c3077735fe167c49da9}{00283}} \mbox{\hyperlink{g__label_8c_a1aede8b144f76c3077735fe167c49da9}{g\_label\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, boolean\_t force)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00284}00284 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00285}00285         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00286}00286 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00287}00287         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00288}00288         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = LIST\_FIRST(\&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>provider);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00289}00289         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} != NULL \&\& (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a62d7db6055318331bae725b44d58c140}{acr}} != 0 || \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_abc6824f999ce8b17107d833c908c83e6}{acw}} != 0 || \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_ae46b0f6e935dcb33a2a06556dbcbeb4c}{ace}} != 0)) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00290}00290                 \textcolor{keywordflow}{if} (force) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00291}00291                         \mbox{\hyperlink{g__label_8h_ab435bceb519dfa97ee448bc0f18e200f}{G\_LABEL\_DEBUG}}(0, \textcolor{stringliteral}{"{}Provider \%s is still open, so it "{}}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00292}00292                             \textcolor{stringliteral}{"{}can't be definitely removed."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00293}00293                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00294}00294                         \mbox{\hyperlink{g__label_8h_ab435bceb519dfa97ee448bc0f18e200f}{G\_LABEL\_DEBUG}}(1,}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00295}00295                             \textcolor{stringliteral}{"{}Provider \%s is still open (r\%dw\%de\%d)."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00296}00296                             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a62d7db6055318331bae725b44d58c140}{acr}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_abc6824f999ce8b17107d833c908c83e6}{acw}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_ae46b0f6e935dcb33a2a06556dbcbeb4c}{ace}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00297}00297                         \textcolor{keywordflow}{return} (EBUSY);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00298}00298                 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00299}00299         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} != NULL)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00300}00300                 \mbox{\hyperlink{g__label_8h_ab435bceb519dfa97ee448bc0f18e200f}{G\_LABEL\_DEBUG}}(1, \textcolor{stringliteral}{"{}Label \%s removed."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00301}00301         \mbox{\hyperlink{geom__slice_8c_a59485c0befa87323ae0134fdfade9359}{g\_slice\_spoiled}}(LIST\_FIRST(\&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>consumer));}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00302}00302         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00303}00303 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00304}00304 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00305}00305 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00306}\mbox{\hyperlink{g__label_8c_a306085ef5a99682dee682f3084d7f035}{00306}} \mbox{\hyperlink{g__label_8c_a306085ef5a99682dee682f3084d7f035}{g\_label\_read\_metadata}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__label__metadata}{g\_label\_metadata}} *md)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00307}00307 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00308}00308         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00309}00309         u\_char *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00310}00310         \textcolor{keywordtype}{int} \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00311}00311 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00312}00312         \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__label_8c_source_l00313}00313         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} < \textcolor{keyword}{sizeof}(*md))}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00314}00314                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00315}00315         \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_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}} -\/ \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}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00316}00316             \&\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00317}00317         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00318}00318                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00319}00319         \textcolor{comment}{/* Decode metadata. */}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00320}00320         \mbox{\hyperlink{g__label_8h_a1d805d86ae119e9b7771a977c82dfd11}{label\_metadata\_decode}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, md);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00321}00321         \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00322}00322 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00323}00323         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00324}00324 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00325}00325 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00326}00326 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00327}\mbox{\hyperlink{g__label_8c_a882a234d10ef22addd5871f188a1cb90}{00327}} \mbox{\hyperlink{g__label_8c_a882a234d10ef22addd5871f188a1cb90}{g\_label\_orphan\_taste}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} \_\_unused)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00328}00328 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00329}00329 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00330}00330         KASSERT(1 == 0, (\textcolor{stringliteral}{"{}\%s called?"{}}, \_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00331}00331 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00332}00332 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00333}00333 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00334}\mbox{\hyperlink{g__label_8c_a503c4538e2592558aab4bc8357e0a175}{00334}} \mbox{\hyperlink{g__label_8c_a503c4538e2592558aab4bc8357e0a175}{g\_label\_start\_taste}}(\textcolor{keyword}{struct} bio *\mbox{\hyperlink{g__part__if_8m_a3786db8db96c32f69df9f7cd325a7507}{bp}} \_\_unused)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00335}00335 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00336}00336 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00337}00337         KASSERT(1 == 0, (\textcolor{stringliteral}{"{}\%s called?"{}}, \_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00338}00338 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00339}00339 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00340}00340 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00341}\mbox{\hyperlink{g__label_8c_a375277e970f5b842b5085d0086c40c00}{00341}} \mbox{\hyperlink{g__label_8c_a375277e970f5b842b5085d0086c40c00}{g\_label\_access\_taste}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} \_\_unused, \textcolor{keywordtype}{int} dr \_\_unused,}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00342}00342     \textcolor{keywordtype}{int} dw \_\_unused, \textcolor{keywordtype}{int} de \_\_unused)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00343}00343 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00344}00344 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00345}00345         KASSERT(1 == 0, (\textcolor{stringliteral}{"{}\%s called"{}}, \_\_func\_\_));}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00346}00346         \textcolor{keywordflow}{return} (EOPNOTSUPP);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00347}00347 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00348}00348 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00349}00349 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00350}\mbox{\hyperlink{g__label_8c_a213793c354c58afceff9b8fe23a5e469}{00350}} \mbox{\hyperlink{g__label_8c_a213793c354c58afceff9b8fe23a5e469}{g\_label\_generic\_taste}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \textcolor{keywordtype}{char} *label, \textcolor{keywordtype}{size\_t} size)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00351}00351 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00352}00352         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00353}00353         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__label__metadata}{g\_label\_metadata}} md;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00354}00354 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00355}00355         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00356}00356         label[0] = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00357}00357         \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__label_8c_source_l00358}00358 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00359}00359         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__label_8c_a306085ef5a99682dee682f3084d7f035}{g\_label\_read\_metadata}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \&md) != 0)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00360}00360                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00361}00361 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00362}00362         \textcolor{keywordflow}{if} (strcmp(md.\mbox{\hyperlink{structg__label__metadata_a9f476a4eb495d45dafa67b3242bf39cd}{md\_magic}}, \mbox{\hyperlink{g__label_8h_a244bd2435c78d24a74abbfcad8c04e7f}{G\_LABEL\_MAGIC}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00363}00363                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00364}00364 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00365}00365         \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__label__metadata_aacc6a11c2d28151adc251478503ec90c}{md\_version}} > \mbox{\hyperlink{g__label_8h_a9f3431e7db88595165cbef8de9d47e3e}{G\_LABEL\_VERSION}}) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00366}00366                 printf(\textcolor{stringliteral}{"{}geom\_label.ko module is too old to handle \%s.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00367}00367                         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00368}00368                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00369}00369         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00370}00370         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00371}00371 \textcolor{comment}{         * Backward compatibility: there was no md\_provsize field in}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00372}00372 \textcolor{comment}{         * earlier versions of metadata, so only check if we have it.}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00373}00373 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00374}00374         \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__label__metadata_aacc6a11c2d28151adc251478503ec90c}{md\_version}} >= 2 \&\& md.\mbox{\hyperlink{structg__label__metadata_a06d0ff73a944695863b2b92e632cc436}{md\_provsize}} != \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}})}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00375}00375                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00376}00376 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00377}00377         strlcpy(label, md.\mbox{\hyperlink{structg__label__metadata_a4035c75cd10451fcc0493b985d3dc255}{md\_label}}, size);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00378}00378 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00379}00379 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00380}00380 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00381}\mbox{\hyperlink{g__label_8c_a48339b8a35715fd9a5f1403839842831}{00381}} \mbox{\hyperlink{g__label_8c_a48339b8a35715fd9a5f1403839842831}{g\_label\_taste}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \textcolor{keywordtype}{int} \mbox{\hyperlink{structg__geom_afa218bd6b4ead71e6238ecd0577e1cc9}{flags}} \_\_unused)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00382}00382 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00383}00383         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00384}00384         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00385}00385         off\_t mediasize;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00386}00386         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00387}00387 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00388}00388         \mbox{\hyperlink{geom_8h_a7588d7ea7fbf7180b345df84b8797166}{g\_trace}}(\mbox{\hyperlink{geom_8h_a7f1804ff1a11f763a1ab5bdbd3e1287c}{G\_T\_TOPOLOGY}}, \textcolor{stringliteral}{"{}\%s(\%s, \%s)"{}}, \_\_func\_\_, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>\mbox{\hyperlink{structg__class_a66bf8381cf0afbf7ccdebfa6b90a4a96}{name}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00389}00389         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00390}00390 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00391}00391         \mbox{\hyperlink{g__label_8h_ab435bceb519dfa97ee448bc0f18e200f}{G\_LABEL\_DEBUG}}(2, \textcolor{stringliteral}{"{}Tasting \%s."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00392}00392 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00393}00393         \textcolor{comment}{/* Skip providers that are already open for writing. */}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00394}00394         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_abc6824f999ce8b17107d833c908c83e6}{acw}} > 0)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00395}00395                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00396}00396 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00397}00397         \textcolor{keywordflow}{if} (strcmp(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_afe5c92b8a2a9e4cdf1cab6daa96923c1}{geom}}-\/>\mbox{\hyperlink{structg__geom_a502c2ffb3c41ad9d30d9875c678f5404}{class}}-\/>\mbox{\hyperlink{structg__class_a66bf8381cf0afbf7ccdebfa6b90a4a96}{name}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>\mbox{\hyperlink{structg__class_a66bf8381cf0afbf7ccdebfa6b90a4a96}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00398}00398                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00399}00399 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00400}00400         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{geom_8h_a4000befe2ff4b405b8333ccc5b0fdb41}{g\_new\_geomf}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{stringliteral}{"{}label:taste"{}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00401}00401         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a160a0c74f128936d97064e56052dc2ef}{start}} = \mbox{\hyperlink{g__label_8c_a503c4538e2592558aab4bc8357e0a175}{g\_label\_start\_taste}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00402}00402         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aea05083928dcabdb4d343c6b9ee71cbd}{access}} = \mbox{\hyperlink{g__label_8c_a375277e970f5b842b5085d0086c40c00}{g\_label\_access\_taste}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00403}00403         \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_a67386b3b9a49233eca9f73d28bc70325}{orphan}} = \mbox{\hyperlink{g__label_8c_a882a234d10ef22addd5871f188a1cb90}{g\_label\_orphan\_taste}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00404}00404         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = \mbox{\hyperlink{geom_8h_aef9ca3f0eecc1b245c3c9cd0bac1cdc4}{g\_new\_consumer}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00405}00405         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_acf792357913c0445233b71f8259764d9}{flags}} |= \mbox{\hyperlink{geom_8h_a712586d00e1fe2a8069adfc048fee210}{G\_CF\_DIRECT\_SEND}} | \mbox{\hyperlink{geom_8h_a2184f2512ddb7a67ddbb71409cdd953f}{G\_CF\_DIRECT\_RECEIVE}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00406}00406         \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom_8h_a7f6ee69db47bae6ff5284f6a9cfceb91}{g\_attach}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}) != 0)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00407}00407                 \textcolor{keywordflow}{goto} end2;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00408}00408         \textcolor{keywordflow}{if} (\mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, 1, 0, 0) != 0)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00409}00409                 \textcolor{keywordflow}{goto} end;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00410}00410         \textcolor{keywordflow}{for} (i = 0; \mbox{\hyperlink{g__label_8c_a71fc9bf444b0550cf626b52efdc38359}{g\_labels}}[i] != NULL; i++) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00411}00411                 \textcolor{keywordtype}{char} label[128];}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00412}00412 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00413}00413                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__label_8c_a71fc9bf444b0550cf626b52efdc38359}{g\_labels}}[i]-\/>ld\_enabled == 0)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00414}00414                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00415}00415                 \mbox{\hyperlink{geom_8h_a4628d4de49ba84e7a6126cc30d23b83a}{g\_topology\_unlock}}();}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00416}00416                 \mbox{\hyperlink{g__label_8c_a71fc9bf444b0550cf626b52efdc38359}{g\_labels}}[i]-\/>\mbox{\hyperlink{structg__label__desc_a5c38840bd2d369860b22fb12362fb4de}{ld\_taste}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, label, \textcolor{keyword}{sizeof}(label));}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00417}00417                 \mbox{\hyperlink{g__label_8c_add433f8a022ebcecae97931f17004700}{g\_label\_mangle\_name}}(label, \textcolor{keyword}{sizeof}(label));}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00418}00418                 \mbox{\hyperlink{geom_8h_a232419d2cfa06ff3f4ff7551041aed31}{g\_topology\_lock}}();}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00419}00419                 \textcolor{keywordflow}{if} (label[0] == \textcolor{charliteral}{'\(\backslash\)0'})}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00420}00420                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00421}00421                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__label_8c_a71fc9bf444b0550cf626b52efdc38359}{g\_labels}}[i] != \&\mbox{\hyperlink{g__label_8c_a8f880e15f71187abb9b4843f495d1ac1}{g\_label\_generic}}) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00422}00422                         mediasize = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00423}00423                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00424}00424                         mediasize = \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}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00425}00425                 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00426}00426                 \mbox{\hyperlink{g__label_8c_a4f714c382afa9e1f3d66e7382fdabd62}{g\_label\_create}}(NULL, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, label,}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00427}00427                     \mbox{\hyperlink{g__label_8c_a71fc9bf444b0550cf626b52efdc38359}{g\_labels}}[i]-\/>ld\_dirprefix, mediasize);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00428}00428         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00429}00429         \mbox{\hyperlink{geom_8h_a27b7c72cc3bc5a4d07ce5976e1aa1b58}{g\_access}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, -\/1, 0, 0);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00430}00430 end:}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00431}00431         \mbox{\hyperlink{geom_8h_a037802c2ec5d43fcf1222215f9f8a735}{g\_detach}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00432}00432 end2:}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00433}00433         \mbox{\hyperlink{geom_8h_a9f53f6118c5e44ca2bcbd7ae548597b9}{g\_destroy\_consumer}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00434}00434         \mbox{\hyperlink{geom_8h_ac8307c99785f672632d3cf33134211ea}{g\_destroy\_geom}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00435}00435         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00436}00436 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00437}00437 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00438}00438 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00439}\mbox{\hyperlink{g__label_8c_a0f99e2e2bdeef4a052c94bcfd3f46092}{00439}} \mbox{\hyperlink{g__label_8c_a0f99e2e2bdeef4a052c94bcfd3f46092}{g\_label\_ctl\_create}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}})}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00440}00440 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00441}00441         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00442}00442         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00443}00443         \textcolor{keywordtype}{int} *nargs;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00444}00444 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00445}00445         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00446}00446 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00447}00447         nargs = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}nargs"{}}, \textcolor{keyword}{sizeof}(*nargs));}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00448}00448         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00449}00449                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument"{}}, \textcolor{stringliteral}{"{}nargs"{}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00450}00450                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00451}00451         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00452}00452         \textcolor{keywordflow}{if} (*nargs != 2) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00453}00453                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid number of arguments."{}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00454}00454                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00455}00455         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00456}00456         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00457}00457 \textcolor{comment}{         * arg1 is the name of provider.}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00458}00458 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00459}00459         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{geom_8h_a02d62eea445edba7982f681b41c6c307}{gctl\_get\_provider}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}arg1"{}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00460}00460         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00461}00461                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00462}00462         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00463}00463 \textcolor{comment}{         * arg0 is the label.}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00464}00464 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00465}00465         \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}arg0"{}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00466}00466         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00467}00467                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No 'arg\%d' argument"{}}, 0);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00468}00468                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00469}00469         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00470}00470         \mbox{\hyperlink{g__label_8c_a4f714c382afa9e1f3d66e7382fdabd62}{g\_label\_create}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, \mbox{\hyperlink{g__label_8c_a519047e6653e46222c2a0e084a270ae4}{G\_LABEL\_DIRPREFIX}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a8f47c464c78aa91fa4ca5143ed3cd15e}{mediasize}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00471}00471 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00472}00472 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00473}00473 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00474}\mbox{\hyperlink{g__label_8c_ae4812cf5d56baa31bc21eb4f3a3800b7}{00474}} \mbox{\hyperlink{g__label_8c_ae4812cf5d56baa31bc21eb4f3a3800b7}{g\_label\_skip\_dir}}(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}})}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00475}00475 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00476}00476         u\_int i;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00477}00477 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00478}00478         \textcolor{keywordflow}{if} (strncmp(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, \mbox{\hyperlink{geom_8h_a9e429780e6e3bb32284b54630bc60a0d}{\_PATH\_DEV}}, strlen(\mbox{\hyperlink{geom_8h_a9e429780e6e3bb32284b54630bc60a0d}{\_PATH\_DEV}})) == 0)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00479}00479                 \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} += strlen(\mbox{\hyperlink{geom_8h_a9e429780e6e3bb32284b54630bc60a0d}{\_PATH\_DEV}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00480}00480         \textcolor{keywordflow}{for} (i = 0; \mbox{\hyperlink{g__label_8c_a71fc9bf444b0550cf626b52efdc38359}{g\_labels}}[i] != NULL; i++) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00481}00481                 \textcolor{keywordflow}{if} (strncmp(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, \mbox{\hyperlink{g__label_8c_a71fc9bf444b0550cf626b52efdc38359}{g\_labels}}[i]-\/>ld\_dirprefix,}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00482}00482                     strlen(\mbox{\hyperlink{g__label_8c_a71fc9bf444b0550cf626b52efdc38359}{g\_labels}}[i]-\/>ld\_dirprefix)) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00483}00483                         \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} += strlen(\mbox{\hyperlink{g__label_8c_a71fc9bf444b0550cf626b52efdc38359}{g\_labels}}[i]-\/>ld\_dirprefix);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00484}00484                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00485}00485                 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00486}00486         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00487}00487         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00488}00488 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00489}00489 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00490}00490 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00491}\mbox{\hyperlink{g__label_8c_ac05ba29127eb43e5566b2cbf7f035562}{00491}} \mbox{\hyperlink{g__label_8c_ac05ba29127eb43e5566b2cbf7f035562}{g\_label\_find\_geom}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}})}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00492}00492 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00493}00493         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00494}00494         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00495}00495         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *pname;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00496}00496 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00497}00497         \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} = \mbox{\hyperlink{g__label_8c_ae4812cf5d56baa31bc21eb4f3a3800b7}{g\_label\_skip\_dir}}(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00498}00498         LIST\_FOREACH(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \&\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>geom, \mbox{\hyperlink{structg__provider_afe5c92b8a2a9e4cdf1cab6daa96923c1}{geom}}) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00499}00499                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = LIST\_FIRST(\&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>provider);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00500}00500                 pname = \mbox{\hyperlink{g__label_8c_ae4812cf5d56baa31bc21eb4f3a3800b7}{g\_label\_skip\_dir}}(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00501}00501                 \textcolor{keywordflow}{if} (strcmp(pname, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00502}00502                         \textcolor{keywordflow}{return} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00503}00503         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00504}00504         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00505}00505 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00506}00506 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00507}00507 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00508}\mbox{\hyperlink{g__label_8c_a2c589f57c763b528ee137aec7d39fe45}{00508}} \mbox{\hyperlink{g__label_8c_a2c589f57c763b528ee137aec7d39fe45}{g\_label\_ctl\_destroy}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}})}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00509}00509 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00510}00510         \textcolor{keywordtype}{int} *nargs, *force, \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}}, i;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00511}00511         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00512}00512         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00513}00513         \textcolor{keywordtype}{char} param[16];}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00514}00514 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00515}00515         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00516}00516 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00517}00517         nargs = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}nargs"{}}, \textcolor{keyword}{sizeof}(*nargs));}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00518}00518         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00519}00519                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument"{}}, \textcolor{stringliteral}{"{}nargs"{}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00520}00520                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00521}00521         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00522}00522         \textcolor{keywordflow}{if} (*nargs <= 0) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00523}00523                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Missing device(s)."{}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00524}00524                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00525}00525         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00526}00526         force = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}force"{}}, \textcolor{keyword}{sizeof}(*force));}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00527}00527         \textcolor{keywordflow}{if} (force == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00528}00528                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No 'force' argument"{}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00529}00529                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00530}00530         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00531}00531 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00532}00532         \textcolor{keywordflow}{for} (i = 0; i < *nargs; i++) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00533}00533                 snprintf(param, \textcolor{keyword}{sizeof}(param), \textcolor{stringliteral}{"{}arg\%d"{}}, i);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00534}00534                 \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, param);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00535}00535                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00536}00536                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No 'arg\%d' argument"{}}, i);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00537}00537                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00538}00538                 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00539}00539                 \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} = \mbox{\hyperlink{g__label_8c_ac05ba29127eb43e5566b2cbf7f035562}{g\_label\_find\_geom}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00540}00540                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00541}00541                         \mbox{\hyperlink{g__label_8h_ab435bceb519dfa97ee448bc0f18e200f}{G\_LABEL\_DEBUG}}(1, \textcolor{stringliteral}{"{}Label \%s is invalid."{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00542}00542                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Label \%s is invalid."{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00543}00543                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00544}00544                 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00545}00545                 error = \mbox{\hyperlink{g__label_8c_a1aede8b144f76c3077735fe167c49da9}{g\_label\_destroy}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, *force);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00546}00546                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00547}00547                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Cannot destroy label \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00548}00548                             LIST\_FIRST(\&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>provider)-\/>name, error);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00549}00549                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00550}00550                 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00551}00551         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00552}00552 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00553}00553 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00554}00554 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00555}\mbox{\hyperlink{g__label_8c_a8d9ea560be826867934db6b77b1d1e3c}{00555}} \mbox{\hyperlink{g__label_8c_a8d9ea560be826867934db6b77b1d1e3c}{g\_label\_config}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *verb)}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00556}00556 \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00557}00557         uint32\_t *version;}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00558}00558 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00559}00559         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00560}00560 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00561}00561         version = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}version"{}}, \textcolor{keyword}{sizeof}(*version));}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00562}00562         \textcolor{keywordflow}{if} (version == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00563}00563                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}version"{}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00564}00564                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00565}00565         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00566}00566         \textcolor{keywordflow}{if} (*version != \mbox{\hyperlink{g__label_8h_a9f3431e7db88595165cbef8de9d47e3e}{G\_LABEL\_VERSION}}) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00567}00567                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Userland and kernel parts are out of sync."{}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00568}00568                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00569}00569         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00570}00570 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00571}00571         \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}create"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00572}00572                 \mbox{\hyperlink{g__label_8c_a0f99e2e2bdeef4a052c94bcfd3f46092}{g\_label\_ctl\_create}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00573}00573                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00574}00574         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}destroy"{}}) == 0 ||}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00575}00575             strcmp(verb, \textcolor{stringliteral}{"{}stop"{}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00576}00576                 \mbox{\hyperlink{g__label_8c_a2c589f57c763b528ee137aec7d39fe45}{g\_label\_ctl\_destroy}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00577}00577                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00578}00578         \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00579}00579 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00580}00580         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Unknown verb."{}});}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00581}00581 \}}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00582}00582 }
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00583}\mbox{\hyperlink{g__label_8c_ac5c7c2aff69bf9e8b6f25bd7fce95709}{00583}} \mbox{\hyperlink{g__label_8c_ac5c7c2aff69bf9e8b6f25bd7fce95709}{DECLARE\_GEOM\_CLASS}}(\mbox{\hyperlink{g__label_8c_a57f2edbb9aa4321b9b70fa10354c3711}{g\_label\_class}}, g\_label);}
\DoxyCodeLine{\Hypertarget{g__label_8c_source_l00584}\mbox{\hyperlink{g__label_8c_ad111442ed69ed86a007e5d7917a55fe0}{00584}} \mbox{\hyperlink{g__label_8c_ad111442ed69ed86a007e5d7917a55fe0}{MODULE\_VERSION}}(geom\_label, 0);}

\end{DoxyCode}
