\hypertarget{g__eli__ctl_8c_source}{}\doxysection{g\+\_\+eli\+\_\+ctl.\+c}
\label{g__eli__ctl_8c_source}\index{geom/eli/g\_eli\_ctl.c@{geom/eli/g\_eli\_ctl.c}}
\mbox{\hyperlink{g__eli__ctl_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2005-\/2011 Pawel Jakub Dawidek <pawel@dawidek.net>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00029}00029 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00030}\mbox{\hyperlink{g__eli__ctl_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00030}} \mbox{\hyperlink{g__eli__ctl_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/bio.h>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/kthread.h>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/proc.h>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/sched.h>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/uio.h>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00045}00045 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <vm/uma.h>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom_8h}{geom/geom.h}}>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom__dbg_8h}{geom/geom\_dbg.h}}>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{g__eli_8h}{geom/eli/g\_eli.h}}>}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00051}00051 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00052}\mbox{\hyperlink{g__eli__ctl_8c_a06a072b20b0a62f2ced24ac2600f4a2c}{00052}} \mbox{\hyperlink{g__eli__ctl_8c_a06a072b20b0a62f2ced24ac2600f4a2c}{MALLOC\_DECLARE}}(M\_ELI);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00053}00053 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00054}00054 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00055}\mbox{\hyperlink{g__eli__ctl_8c_a81e8b4c7ee993beaa6b7ebd24d34a3fc}{00055}} \mbox{\hyperlink{g__eli__ctl_8c_a81e8b4c7ee993beaa6b7ebd24d34a3fc}{g\_eli\_ctl\_attach}}(\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__eli__ctl_8c_source_l00056}00056 \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00057}00057         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} md;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00058}00058         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00059}00059         u\_char *key, mkey[\mbox{\hyperlink{g__eli_8h_aee6be3564eb1e7728a07e0a64441d7f5}{G\_ELI\_DATAIVKEYLEN}}];}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00060}00060         \textcolor{keywordtype}{int} *nargs, *detach, *readonly, *dryrunp;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00061}00061         \textcolor{keywordtype}{int} keysize, \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}}, nkey, dryrun, dummy;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00062}00062         intmax\_t *valp;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00063}00063 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00064}00064         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00065}00065 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00066}00066         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__eli__ctl_8c_source_l00067}00067         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00068}00068                 \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__eli__ctl_8c_source_l00069}00069                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00070}00070         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00071}00071         \textcolor{keywordflow}{if} (*nargs != 1) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00072}00072                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid number of arguments."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00073}00073                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00074}00074         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00076}00076         detach = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}detach"{}}, \textcolor{keyword}{sizeof}(*detach));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00077}00077         \textcolor{keywordflow}{if} (detach == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00078}00078                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}detach"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00079}00079                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00080}00080         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00081}00081 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00082}00082         \textcolor{comment}{/* "{}keyno"{} is optional for backward compatibility */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00083}00083         nkey = -\/1;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00084}00084         valp = \mbox{\hyperlink{geom_8h_a3e3d6786258b3336d55a96607f9b8eb8}{gctl\_get\_param}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}keyno"{}}, \&dummy);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00085}00085         \textcolor{keywordflow}{if} (valp != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00086}00086                 valp = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}keyno"{}}, \textcolor{keyword}{sizeof}(*valp));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00087}00087                 \textcolor{keywordflow}{if} (valp != NULL)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00088}00088                         nkey = *valp;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00089}00089         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00090}00090         \textcolor{keywordflow}{if} (nkey < -\/1 || nkey >= \mbox{\hyperlink{g__eli_8h_abb1d3eb1d3c15da2395385de4d58cf81}{G\_ELI\_MAXMKEYS}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00091}00091                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid '\%s' argument."{}}, \textcolor{stringliteral}{"{}keyno"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00092}00092                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00093}00093         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00094}00094 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00095}00095         readonly = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}readonly"{}}, \textcolor{keyword}{sizeof}(*readonly));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00096}00096         \textcolor{keywordflow}{if} (readonly == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00097}00097                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}readonly"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00098}00098                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00099}00099         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00100}00100 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00101}00101         \textcolor{comment}{/* "{}dryrun"{} is optional for backward compatibility */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00102}00102         dryrun = 0;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00103}00103         dryrunp = \mbox{\hyperlink{geom_8h_a3e3d6786258b3336d55a96607f9b8eb8}{gctl\_get\_param}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}dryrun"{}}, \&dummy);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00104}00104         \textcolor{keywordflow}{if} (dryrunp != NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00105}00105                 dryrunp = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}dryrun"{}}, \textcolor{keyword}{sizeof}(*dryrunp));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00106}00106                 \textcolor{keywordflow}{if} (dryrunp != NULL)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00107}00107                         dryrun = *dryrunp;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00108}00108         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00109}00109 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00110}00110         \textcolor{keywordflow}{if} (*detach \&\& *readonly) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00111}00111                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Options -\/d and -\/r are mutually exclusive."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00112}00112                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00113}00113         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00114}00114 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00115}00115         \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}{"{}arg0"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00116}00116         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00117}00117                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00118}00118         \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} = \mbox{\hyperlink{g__eli_8c_a73b39d79b3db8b9eb1a3164c7f522c8c}{g\_eli\_read\_metadata}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \&md);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00119}00119         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} != 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00120}00120                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Cannot read metadata from \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00121}00121                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00122}00122                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00123}00123         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00124}00124         \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}} == 0x00) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00125}00125                 explicit\_bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00126}00126                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No valid keys on \%s."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00127}00127                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00128}00128         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00129}00129         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{g__eli_8h_a04078e89be31a3b62959a18de699447c}{eli\_metadata\_crypto\_supported}}(\&md)) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00130}00130                 explicit\_bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00131}00131                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid or unsupported algorithms."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00132}00132                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00133}00133         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00134}00134 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00135}00135         key = \mbox{\hyperlink{geom_8h_a3e3d6786258b3336d55a96607f9b8eb8}{gctl\_get\_param}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}key"{}}, \&keysize);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00136}00136         \textcolor{keywordflow}{if} (key == NULL || keysize != \mbox{\hyperlink{g__eli_8h_a5b5012c2878a9fc13f28fd837b163c3f}{G\_ELI\_USERKEYLEN}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00137}00137                 explicit\_bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00138}00138                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}key"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00139}00139                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00140}00140         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00141}00141 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00142}00142         \textcolor{keywordflow}{if} (nkey == -\/1)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00143}00143                 \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} = \mbox{\hyperlink{g__eli_8h_aca1880f274b4cf6b2627697cd0588b23}{g\_eli\_mkey\_decrypt\_any}}(\&md, key, mkey, \&nkey);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00144}00144         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00145}00145                 \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} = \mbox{\hyperlink{g__eli_8h_a1278f6f38744543b6cfe4a205c55e65f}{g\_eli\_mkey\_decrypt}}(\&md, key, mkey, nkey);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00146}00146         explicit\_bzero(key, keysize);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00147}00147         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} == -\/1) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00148}00148                 explicit\_bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00149}00149                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Wrong key for \%s."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00150}00150                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00151}00151         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}} > 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00152}00152                 explicit\_bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00153}00153                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Cannot decrypt Master Key for \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00154}00154                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, \mbox{\hyperlink{structg__provider_acacf1ee18cb6edbcfedc185846696e7f}{error}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00155}00155                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00156}00156         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00157}00157         \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(1, \textcolor{stringliteral}{"{}Using Master Key \%u for \%s."{}}, nkey, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00158}00158 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00159}00159         \textcolor{keywordflow}{if} (*detach)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00160}00160                 md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} |= \mbox{\hyperlink{g__eli_8h_a43d5cf6f91862d2a6c2910bd9e722b96}{G\_ELI\_FLAG\_WO\_DETACH}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00161}00161         \textcolor{keywordflow}{if} (*readonly)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00162}00162                 md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} |= \mbox{\hyperlink{g__eli_8h_a6df3f8f55142a6f1ee2be41835adb7bd}{G\_ELI\_FLAG\_RO}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00163}00163         \textcolor{keywordflow}{if} (!dryrun)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00164}00164                 \mbox{\hyperlink{g__eli_8c_a7f89deff3fb496d7302dc96b05f5cee2}{g\_eli\_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}}, \&md, mkey, nkey);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00165}00165         explicit\_bzero(mkey, \textcolor{keyword}{sizeof}(mkey));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00166}00166         explicit\_bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00167}00167 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00168}00168 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00169}00169 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00170}\mbox{\hyperlink{g__eli__ctl_8c_a83004f1cb0627915bc6d1f41d40bde13}{00170}} \mbox{\hyperlink{g__eli__ctl_8c_a83004f1cb0627915bc6d1f41d40bde13}{g\_eli\_find\_device}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__class}{g\_class}} *\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *prov)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00171}00171 \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00172}00172         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00173}00173         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00174}00174         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00175}00175         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00176}00176 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00177}00177         \textcolor{keywordflow}{if} (strncmp(prov, \mbox{\hyperlink{geom_8h_a9e429780e6e3bb32284b54630bc60a0d}{\_PATH\_DEV}}, strlen(\mbox{\hyperlink{geom_8h_a9e429780e6e3bb32284b54630bc60a0d}{\_PATH\_DEV}})) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00178}00178                 prov += strlen(\mbox{\hyperlink{geom_8h_a9e429780e6e3bb32284b54630bc60a0d}{\_PATH\_DEV}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00179}00179         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__eli__ctl_8c_source_l00180}00180                 sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00181}00181                 \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00182}00182                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00183}00183                 \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = LIST\_FIRST(\&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>provider);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00184}00184                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} != NULL \&\& strcmp(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, prov) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00185}00185                         \textcolor{keywordflow}{return} (sc);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00186}00186                 \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = LIST\_FIRST(\&\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>consumer);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00187}00187                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} != NULL \&\& \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}} != NULL \&\&}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00188}00188                     strcmp(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, prov) == 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00189}00189                         \textcolor{keywordflow}{return} (sc);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00190}00190                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00191}00191         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00192}00192         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00193}00193 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00194}00194 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00195}00195 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00196}\mbox{\hyperlink{g__eli__ctl_8c_a9c9515c8ecd783e45f3cd62f767fb494}{00196}} \mbox{\hyperlink{g__eli__ctl_8c_a9c9515c8ecd783e45f3cd62f767fb494}{g\_eli\_ctl\_detach}}(\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__eli__ctl_8c_source_l00197}00197 \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00198}00198         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00199}00199         \textcolor{keywordtype}{int} *force, *last, *nargs, error;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00200}00200         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *prov;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00201}00201         \textcolor{keywordtype}{char} param[16];}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00202}00202         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00203}00203 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00204}00204         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00205}00205 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00206}00206         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__eli__ctl_8c_source_l00207}00207         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00208}00208                 \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__eli__ctl_8c_source_l00209}00209                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00210}00210         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00211}00211         \textcolor{keywordflow}{if} (*nargs <= 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00212}00212                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Missing device(s)."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00213}00213                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00214}00214         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00215}00215         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__eli__ctl_8c_source_l00216}00216         \textcolor{keywordflow}{if} (force == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00217}00217                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}force"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00218}00218                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00219}00219         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00220}00220         last = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}last"{}}, \textcolor{keyword}{sizeof}(*last));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00221}00221         \textcolor{keywordflow}{if} (last == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00222}00222                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}last"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00223}00223                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00224}00224         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00225}00225 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00226}00226         \textcolor{keywordflow}{for} (i = 0; i < *nargs; i++) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00227}00227                 snprintf(param, \textcolor{keyword}{sizeof}(param), \textcolor{stringliteral}{"{}arg\%d"{}}, i);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00228}00228                 prov = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, param);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00229}00229                 \textcolor{keywordflow}{if} (prov == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00230}00230                         \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__eli__ctl_8c_source_l00231}00231                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00232}00232                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00233}00233                 sc = \mbox{\hyperlink{g__eli__ctl_8c_a83004f1cb0627915bc6d1f41d40bde13}{g\_eli\_find\_device}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00234}00234                 \textcolor{keywordflow}{if} (sc == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00235}00235                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No such device: \%s."{}}, prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00236}00236                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00237}00237                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00238}00238                 \textcolor{keywordflow}{if} (*last) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00239}00239                         sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} |= \mbox{\hyperlink{g__eli_8h_a48c237bf1c3ffb624048745c72a8370d}{G\_ELI\_FLAG\_RW\_DETACH}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00240}00240                         sc-\/>\mbox{\hyperlink{structg__eli__softc_a899949202205997147c78c52b32b9843}{sc\_geom}}-\/>\mbox{\hyperlink{structg__geom_aea05083928dcabdb4d343c6b9ee71cbd}{access}} = \mbox{\hyperlink{g__eli_8c_a457eedfe113d30b828b13ee6b608642c}{g\_eli\_access}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00241}00241                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00242}00242                         error = \mbox{\hyperlink{g__eli_8c_a065e40173aeaf62cd0dad0d2b7a71e04}{g\_eli\_destroy}}(sc, *force ? TRUE : FALSE);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00243}00243                         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00244}00244                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00245}00245                                     \textcolor{stringliteral}{"{}Cannot destroy device \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00246}00246                                     sc-\/>sc\_name, error);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00247}00247                                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00248}00248                         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00249}00249                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00250}00250         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00251}00251 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00252}00252 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00253}00253 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00254}\mbox{\hyperlink{g__eli__ctl_8c_a11d2b0d71c00b7552264979099b2a9d7}{00254}} \mbox{\hyperlink{g__eli__ctl_8c_a11d2b0d71c00b7552264979099b2a9d7}{g\_eli\_ctl\_onetime}}(\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__eli__ctl_8c_source_l00255}00255 \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00256}00256         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} md;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00257}00257         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00258}00258         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00259}00259         intmax\_t *keylen, *\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00260}00260         u\_char mkey[\mbox{\hyperlink{g__eli_8h_aee6be3564eb1e7728a07e0a64441d7f5}{G\_ELI\_DATAIVKEYLEN}}];}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00261}00261         \textcolor{keywordtype}{int} *nargs, *detach, *noautoresize, *notrim;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00262}00262 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00263}00263         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00264}00264         bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00265}00265 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00266}00266         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__eli__ctl_8c_source_l00267}00267         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00268}00268                 \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__eli__ctl_8c_source_l00269}00269                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00270}00270         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00271}00271         \textcolor{keywordflow}{if} (*nargs != 1) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00272}00272                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid number of arguments."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00273}00273                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00274}00274         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00275}00275 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00276}00276         strlcpy(md.\mbox{\hyperlink{structg__eli__metadata_aeb6a39d396a7deb9d8b3270313d9dd4f}{md\_magic}}, \mbox{\hyperlink{g__eli_8h_a46bf6203c4467768cb63cbb6117b4294}{G\_ELI\_MAGIC}}, \textcolor{keyword}{sizeof}(md.\mbox{\hyperlink{structg__eli__metadata_aeb6a39d396a7deb9d8b3270313d9dd4f}{md\_magic}}));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00277}00277         md.\mbox{\hyperlink{structg__eli__metadata_ab2df4c07f7d136cfd6d962af2442f833}{md\_version}} = \mbox{\hyperlink{g__eli_8h_ab008623662537df1abcfc6d0c20e93c1}{G\_ELI\_VERSION}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00278}00278         md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} |= \mbox{\hyperlink{g__eli_8h_a50453da3fa0881f2a73d51ec9205d2be}{G\_ELI\_FLAG\_ONETIME}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00279}00279         md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} |= \mbox{\hyperlink{g__eli_8h_acfe6d43486b1b461f1b3e3ed78474603}{G\_ELI\_FLAG\_AUTORESIZE}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00280}00280 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00281}00281         detach = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}detach"{}}, \textcolor{keyword}{sizeof}(*detach));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00282}00282         \textcolor{keywordflow}{if} (detach != NULL \&\& *detach)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00283}00283                 md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} |= \mbox{\hyperlink{g__eli_8h_a43d5cf6f91862d2a6c2910bd9e722b96}{G\_ELI\_FLAG\_WO\_DETACH}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00284}00284         noautoresize = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}noautoresize"{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00285}00285             \textcolor{keyword}{sizeof}(*noautoresize));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00286}00286         \textcolor{keywordflow}{if} (noautoresize != NULL \&\& *noautoresize)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00287}00287                 md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} \&= \string~G\_ELI\_FLAG\_AUTORESIZE;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00288}00288         notrim = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}notrim"{}}, \textcolor{keyword}{sizeof}(*notrim));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00289}00289         \textcolor{keywordflow}{if} (notrim != NULL \&\& *notrim)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00290}00290                 md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} |= \mbox{\hyperlink{g__eli_8h_a00997fef11f4d833ccf9b5598646bb3a}{G\_ELI\_FLAG\_NODELETE}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00291}00291 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00292}00292         md.\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}} = CRYPTO\_ALGORITHM\_MIN -\/ 1;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00293}00293         \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}{"{}aalgo"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00294}00294         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00295}00295                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}aalgo"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00296}00296                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00297}00297         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00298}00298         \textcolor{keywordflow}{if} (*\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} != \textcolor{charliteral}{'\(\backslash\)0'}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00299}00299                 md.\mbox{\hyperlink{structg__eli__metadata_acc0b001372f5cb147d3c1e6348bd2f0d}{md\_aalgo}} = \mbox{\hyperlink{g__eli_8h_a671c2115f8d34a2795a585d6c1d7ca34}{g\_eli\_str2aalgo}}(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00300}00300                 \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__eli__metadata_acc0b001372f5cb147d3c1e6348bd2f0d}{md\_aalgo}} >= CRYPTO\_ALGORITHM\_MIN \&\&}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00301}00301                     md.\mbox{\hyperlink{structg__eli__metadata_acc0b001372f5cb147d3c1e6348bd2f0d}{md\_aalgo}} <= CRYPTO\_ALGORITHM\_MAX) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00302}00302                         md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} |= \mbox{\hyperlink{g__eli_8h_a723b90905e6c7f8485c4723967759d84}{G\_ELI\_FLAG\_AUTH}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00303}00303                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00304}00304                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00305}00305 \textcolor{comment}{                         * For backward compatibility, check if the -\/a option}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00306}00306 \textcolor{comment}{                         * was used to provide encryption algorithm.}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00307}00307 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00308}00308                         md.\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}} = \mbox{\hyperlink{g__eli_8h_a7e010046e4ee6d68b3b47876506eb27f}{g\_eli\_str2ealgo}}(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00309}00309                         \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}} < CRYPTO\_ALGORITHM\_MIN ||}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00310}00310                             md.\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}} > CRYPTO\_ALGORITHM\_MAX) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00311}00311                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00312}00312                                     \textcolor{stringliteral}{"{}Invalid authentication algorithm."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00313}00313                                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00314}00314                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00315}00315                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}warning: The -\/e option, not "{}}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00316}00316                                     \textcolor{stringliteral}{"{}the -\/a option is now used to specify "{}}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00317}00317                                     \textcolor{stringliteral}{"{}encryption algorithm to use."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00318}00318                         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00319}00319                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00320}00320         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00321}00321 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00322}00322         \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}} < CRYPTO\_ALGORITHM\_MIN ||}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00323}00323             md.\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}} > CRYPTO\_ALGORITHM\_MAX) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00324}00324                 \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}{"{}ealgo"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00325}00325                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00326}00326                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}ealgo"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00327}00327                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00328}00328                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00329}00329                 md.\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}} = \mbox{\hyperlink{g__eli_8h_a7e010046e4ee6d68b3b47876506eb27f}{g\_eli\_str2ealgo}}(\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00330}00330                 \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}} < CRYPTO\_ALGORITHM\_MIN ||}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00331}00331                     md.\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}} > CRYPTO\_ALGORITHM\_MAX) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00332}00332                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid encryption algorithm."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00333}00333                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00334}00334                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00335}00335         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00336}00336 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00337}00337         keylen = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}keylen"{}}, \textcolor{keyword}{sizeof}(*keylen));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00338}00338         \textcolor{keywordflow}{if} (keylen == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00339}00339                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}keylen"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00340}00340                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00341}00341         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00342}00342         md.\mbox{\hyperlink{structg__eli__metadata_a5527b37bf36a0f83967c9334a6f8b134}{md\_keylen}} = \mbox{\hyperlink{g__eli_8h_a097f3b30cebdcf99f7423ed4a0a8c8d9}{g\_eli\_keylen}}(md.\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}}, *keylen);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00343}00343         \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__eli__metadata_a5527b37bf36a0f83967c9334a6f8b134}{md\_keylen}} == 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00344}00344                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid '\%s' argument."{}}, \textcolor{stringliteral}{"{}keylen"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00345}00345                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00346}00346         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00347}00347 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00348}00348         \textcolor{comment}{/* Not important here. */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00349}00349         md.\mbox{\hyperlink{structg__eli__metadata_aa0d8828da846afa321340ac78a42ff95}{md\_provsize}} = 0;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00350}00350         \textcolor{comment}{/* Not important here. */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00351}00351         bzero(md.\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}}, \textcolor{keyword}{sizeof}(md.\mbox{\hyperlink{structg__eli__metadata_a46a833a1c54e2d5919f18351f08e5a32}{md\_salt}}));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00352}00352 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00353}00353         md.\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}} = 0x01;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00354}00354         arc4rand(mkey, \textcolor{keyword}{sizeof}(mkey), 0);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00355}00355 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00356}00356         \textcolor{comment}{/* Not important here. */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00357}00357         bzero(md.\mbox{\hyperlink{structg__eli__metadata_ac9ca477629b4c00997d0a5d0b5ad6a6b}{md\_hash}}, \textcolor{keyword}{sizeof}(md.\mbox{\hyperlink{structg__eli__metadata_ac9ca477629b4c00997d0a5d0b5ad6a6b}{md\_hash}}));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00358}00358 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00359}00359         \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}{"{}arg0"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00360}00360         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} == NULL)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00361}00361                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00362}00362 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00363}00363         \mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}sectorsize"{}}, \textcolor{keyword}{sizeof}(*\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00364}00364         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00365}00365                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}sectorsize"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00366}00366                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00367}00367         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00368}00368         \textcolor{keywordflow}{if} (*\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} == 0)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00369}00369                 md.\mbox{\hyperlink{structg__eli__metadata_af7456ba38129bdd91fbfac2660374bcc}{md\_sectorsize}} = \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00370}00370         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00371}00371                 \textcolor{keywordflow}{if} (*\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} < 0 || (*\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} \% \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00372}00372                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid sector size."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00373}00373                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00374}00374                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00375}00375                 \textcolor{keywordflow}{if} (*\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} > PAGE\_SIZE) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00376}00376                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}warning: Using sectorsize bigger than "{}}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00377}00377                             \textcolor{stringliteral}{"{}the page size!"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00378}00378                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00379}00379                 md.\mbox{\hyperlink{structg__eli__metadata_af7456ba38129bdd91fbfac2660374bcc}{md\_sectorsize}} = *\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00380}00380         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00381}00381 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00382}00382         \mbox{\hyperlink{g__eli_8c_a7f89deff3fb496d7302dc96b05f5cee2}{g\_eli\_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}}, \&md, mkey, -\/1);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00383}00383         explicit\_bzero(mkey, \textcolor{keyword}{sizeof}(mkey));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00384}00384         explicit\_bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00385}00385 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00386}00386 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00387}00387 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00388}\mbox{\hyperlink{g__eli__ctl_8c_a114492a330f919db93ccf29ffe3419ec}{00388}} \mbox{\hyperlink{g__eli__ctl_8c_a114492a330f919db93ccf29ffe3419ec}{g\_eli\_ctl\_configure}}(\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__eli__ctl_8c_source_l00389}00389 \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00390}00390         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00391}00391         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} md;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00392}00392         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00393}00393         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00394}00394         \textcolor{keywordtype}{char} param[16];}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00395}00395         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *prov;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00396}00396         u\_char *sector;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00397}00397         \textcolor{keywordtype}{int} *nargs, *boot, *noboot, *trim, *notrim, *geliboot, *nogeliboot;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00398}00398         \textcolor{keywordtype}{int} *displaypass, *nodisplaypass, *autoresize, *noautoresize;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00399}00399         \textcolor{keywordtype}{int} zero, error, changed;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00400}00400         u\_int i;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00401}00401 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00402}00402         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00403}00403 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00404}00404         changed = 0;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00405}00405         zero = 0;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00406}00406 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00407}00407         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__eli__ctl_8c_source_l00408}00408         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00409}00409                 \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__eli__ctl_8c_source_l00410}00410                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00411}00411         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00412}00412         \textcolor{keywordflow}{if} (*nargs <= 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00413}00413                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Missing device(s)."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00414}00414                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00415}00415         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00416}00416 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00417}00417         boot = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}boot"{}}, \textcolor{keyword}{sizeof}(*boot));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00418}00418         \textcolor{keywordflow}{if} (boot == NULL)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00419}00419                 boot = \&zero;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00420}00420         noboot = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}noboot"{}}, \textcolor{keyword}{sizeof}(*noboot));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00421}00421         \textcolor{keywordflow}{if} (noboot == NULL)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00422}00422                 noboot = \&zero;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00423}00423         \textcolor{keywordflow}{if} (*boot \&\& *noboot) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00424}00424                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Options -\/b and -\/B are mutually exclusive."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00425}00425                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00426}00426         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00427}00427         \textcolor{keywordflow}{if} (*boot || *noboot)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00428}00428                 changed = 1;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00429}00429 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00430}00430         trim = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}trim"{}}, \textcolor{keyword}{sizeof}(*trim));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00431}00431         \textcolor{keywordflow}{if} (trim == NULL)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00432}00432                 trim = \&zero;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00433}00433         notrim = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}notrim"{}}, \textcolor{keyword}{sizeof}(*notrim));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00434}00434         \textcolor{keywordflow}{if} (notrim == NULL)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00435}00435                 notrim = \&zero;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00436}00436         \textcolor{keywordflow}{if} (*trim \&\& *notrim) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00437}00437                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Options -\/t and -\/T are mutually exclusive."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00438}00438                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00439}00439         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00440}00440         \textcolor{keywordflow}{if} (*trim || *notrim)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00441}00441                 changed = 1;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00442}00442 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00443}00443         geliboot = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}geliboot"{}}, \textcolor{keyword}{sizeof}(*geliboot));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00444}00444         \textcolor{keywordflow}{if} (geliboot == NULL)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00445}00445                 geliboot = \&zero;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00446}00446         nogeliboot = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}nogeliboot"{}}, \textcolor{keyword}{sizeof}(*nogeliboot));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00447}00447         \textcolor{keywordflow}{if} (nogeliboot == NULL)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00448}00448                 nogeliboot = \&zero;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00449}00449         \textcolor{keywordflow}{if} (*geliboot \&\& *nogeliboot) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00450}00450                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Options -\/g and -\/G are mutually exclusive."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00451}00451                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00452}00452         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00453}00453         \textcolor{keywordflow}{if} (*geliboot || *nogeliboot)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00454}00454                 changed = 1;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00455}00455 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00456}00456         displaypass = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}displaypass"{}}, \textcolor{keyword}{sizeof}(*displaypass));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00457}00457         \textcolor{keywordflow}{if} (displaypass == NULL)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00458}00458                 displaypass = \&zero;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00459}00459         nodisplaypass = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}nodisplaypass"{}}, \textcolor{keyword}{sizeof}(*nodisplaypass));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00460}00460         \textcolor{keywordflow}{if} (nodisplaypass == NULL)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00461}00461                 nodisplaypass = \&zero;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00462}00462         \textcolor{keywordflow}{if} (*displaypass \&\& *nodisplaypass) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00463}00463                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Options -\/d and -\/D are mutually exclusive."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00464}00464                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00465}00465         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00466}00466         \textcolor{keywordflow}{if} (*displaypass || *nodisplaypass)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00467}00467                 changed = 1;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00468}00468 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00469}00469         autoresize = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}autoresize"{}}, \textcolor{keyword}{sizeof}(*autoresize));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00470}00470         \textcolor{keywordflow}{if} (autoresize == NULL)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00471}00471                 autoresize = \&zero;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00472}00472         noautoresize = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}noautoresize"{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00473}00473             \textcolor{keyword}{sizeof}(*noautoresize));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00474}00474         \textcolor{keywordflow}{if} (noautoresize == NULL)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00475}00475                 noautoresize = \&zero;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00476}00476         \textcolor{keywordflow}{if} (*autoresize \&\& *noautoresize) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00477}00477                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Options -\/r and -\/R are mutually exclusive."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00478}00478                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00479}00479         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00480}00480         \textcolor{keywordflow}{if} (*autoresize || *noautoresize)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00481}00481                 changed = 1;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00482}00482 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00483}00483         \textcolor{keywordflow}{if} (!changed) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00484}00484                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No option given."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00485}00485                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00486}00486         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00487}00487 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00488}00488         \textcolor{keywordflow}{for} (i = 0; i < *nargs; i++) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00489}00489                 snprintf(param, \textcolor{keyword}{sizeof}(param), \textcolor{stringliteral}{"{}arg\%d"{}}, i);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00490}00490                 prov = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, param);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00491}00491                 \textcolor{keywordflow}{if} (prov == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00492}00492                         \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__eli__ctl_8c_source_l00493}00493                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00494}00494                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00495}00495                 sc = \mbox{\hyperlink{g__eli__ctl_8c_a83004f1cb0627915bc6d1f41d40bde13}{g\_eli\_find\_device}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00496}00496                 \textcolor{keywordflow}{if} (sc == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00497}00497                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00498}00498 \textcolor{comment}{                         * We ignore not attached providers, userland part will}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00499}00499 \textcolor{comment}{                         * take care of them.}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00500}00500 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00501}00501                         \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(1, \textcolor{stringliteral}{"{}Skipping configuration of not attached "{}}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00502}00502                             \textcolor{stringliteral}{"{}provider \%s."{}}, prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00503}00503                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00504}00504                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00505}00505                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a6df3f8f55142a6f1ee2be41835adb7bd}{G\_ELI\_FLAG\_RO}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00506}00506                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Cannot change configuration of "{}}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00507}00507                             \textcolor{stringliteral}{"{}read-\/only provider \%s."{}}, prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00508}00508                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00509}00509                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00510}00510 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00511}00511                 \textcolor{keywordflow}{if} (*boot \&\& (sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a29772f14391c3c1f5a3a46bfb17bc976}{G\_ELI\_FLAG\_BOOT}})) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00512}00512                         \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(1, \textcolor{stringliteral}{"{}BOOT flag already configured for \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00513}00513                             prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00514}00514                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00515}00515                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (*noboot \&\& !(sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a29772f14391c3c1f5a3a46bfb17bc976}{G\_ELI\_FLAG\_BOOT}})) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00516}00516                         \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(1, \textcolor{stringliteral}{"{}BOOT flag not configured for \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00517}00517                             prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00518}00518                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00519}00519                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00520}00520 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00521}00521                 \textcolor{keywordflow}{if} (*notrim \&\& (sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a00997fef11f4d833ccf9b5598646bb3a}{G\_ELI\_FLAG\_NODELETE}})) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00522}00522                         \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(1, \textcolor{stringliteral}{"{}TRIM disable flag already configured for \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00523}00523                             prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00524}00524                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00525}00525                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (*trim \&\& !(sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a00997fef11f4d833ccf9b5598646bb3a}{G\_ELI\_FLAG\_NODELETE}})) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00526}00526                         \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(1, \textcolor{stringliteral}{"{}TRIM disable flag not configured for \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00527}00527                             prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00528}00528                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00529}00529                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00530}00530 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00531}00531                 \textcolor{keywordflow}{if} (*geliboot \&\& (sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a22218b196828cbf802d45be709b91f86}{G\_ELI\_FLAG\_GELIBOOT}})) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00532}00532                         \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(1, \textcolor{stringliteral}{"{}GELIBOOT flag already configured for \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00533}00533                             prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00534}00534                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00535}00535                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (*nogeliboot \&\& !(sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a22218b196828cbf802d45be709b91f86}{G\_ELI\_FLAG\_GELIBOOT}})) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00536}00536                         \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(1, \textcolor{stringliteral}{"{}GELIBOOT flag not configured for \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00537}00537                             prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00538}00538                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00539}00539                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00540}00540 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00541}00541                 \textcolor{keywordflow}{if} (*displaypass \&\& (sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_aa392f69ce5377918074f573d9fae9623}{G\_ELI\_FLAG\_GELIDISPLAYPASS}})) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00542}00542                         \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(1, \textcolor{stringliteral}{"{}GELIDISPLAYPASS flag already configured for \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00543}00543                             prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00544}00544                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00545}00545                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (*nodisplaypass \&\&}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00546}00546                     !(sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_aa392f69ce5377918074f573d9fae9623}{G\_ELI\_FLAG\_GELIDISPLAYPASS}})) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00547}00547                         \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(1, \textcolor{stringliteral}{"{}GELIDISPLAYPASS flag not configured for \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00548}00548                             prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00549}00549                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00550}00550                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00551}00551 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00552}00552                 \textcolor{keywordflow}{if} (*autoresize \&\& (sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_acfe6d43486b1b461f1b3e3ed78474603}{G\_ELI\_FLAG\_AUTORESIZE}})) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00553}00553                         \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(1, \textcolor{stringliteral}{"{}AUTORESIZE flag already configured for \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00554}00554                             prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00555}00555                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00556}00556                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (*noautoresize \&\&}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00557}00557                     !(sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_acfe6d43486b1b461f1b3e3ed78474603}{G\_ELI\_FLAG\_AUTORESIZE}})) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00558}00558                         \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(1, \textcolor{stringliteral}{"{}AUTORESIZE flag not configured for \%s."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00559}00559                             prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00560}00560                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00561}00561                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00562}00562 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00563}00563                 \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a50453da3fa0881f2a73d51ec9205d2be}{G\_ELI\_FLAG\_ONETIME}})) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00564}00564                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00565}00565 \textcolor{comment}{                         * ONETIME providers don't write metadata to}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00566}00566 \textcolor{comment}{                         * disk, so don't try reading it.  This means}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00567}00567 \textcolor{comment}{                         * we're bit-\/flipping uninitialized memory in md}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00568}00568 \textcolor{comment}{                         * below, but that's OK; we don't do anything}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00569}00569 \textcolor{comment}{                         * with it later.}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00570}00570 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00571}00571                         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = LIST\_FIRST(\&sc-\/>\mbox{\hyperlink{structg__eli__softc_a899949202205997147c78c52b32b9843}{sc\_geom}}-\/>consumer);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00572}00572                         \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__eli__ctl_8c_source_l00573}00573                         error = \mbox{\hyperlink{g__eli_8c_a73b39d79b3db8b9eb1a3164c7f522c8c}{g\_eli\_read\_metadata}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \&md);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00574}00574                         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00575}00575                             \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00576}00576                                 \textcolor{stringliteral}{"{}Cannot read metadata from \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00577}00577                                 prov, error);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00578}00578                             \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00579}00579                         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00580}00580                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00581}00581 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00582}00582                 \textcolor{keywordflow}{if} (*boot) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00583}00583                         md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} |= \mbox{\hyperlink{g__eli_8h_a29772f14391c3c1f5a3a46bfb17bc976}{G\_ELI\_FLAG\_BOOT}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00584}00584                         sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} |= \mbox{\hyperlink{g__eli_8h_a29772f14391c3c1f5a3a46bfb17bc976}{G\_ELI\_FLAG\_BOOT}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00585}00585                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (*noboot) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00586}00586                         md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} \&= \string~G\_ELI\_FLAG\_BOOT;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00587}00587                         sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \&= \string~G\_ELI\_FLAG\_BOOT;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00588}00588                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00589}00589 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00590}00590                 \textcolor{keywordflow}{if} (*notrim) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00591}00591                         md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} |= \mbox{\hyperlink{g__eli_8h_a00997fef11f4d833ccf9b5598646bb3a}{G\_ELI\_FLAG\_NODELETE}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00592}00592                         sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} |= \mbox{\hyperlink{g__eli_8h_a00997fef11f4d833ccf9b5598646bb3a}{G\_ELI\_FLAG\_NODELETE}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00593}00593                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (*trim) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00594}00594                         md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} \&= \string~G\_ELI\_FLAG\_NODELETE;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00595}00595                         sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \&= \string~G\_ELI\_FLAG\_NODELETE;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00596}00596                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00597}00597 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00598}00598                 \textcolor{keywordflow}{if} (*geliboot) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00599}00599                         md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} |= \mbox{\hyperlink{g__eli_8h_a22218b196828cbf802d45be709b91f86}{G\_ELI\_FLAG\_GELIBOOT}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00600}00600                         sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} |= \mbox{\hyperlink{g__eli_8h_a22218b196828cbf802d45be709b91f86}{G\_ELI\_FLAG\_GELIBOOT}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00601}00601                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (*nogeliboot) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00602}00602                         md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} \&= \string~G\_ELI\_FLAG\_GELIBOOT;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00603}00603                         sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \&= \string~G\_ELI\_FLAG\_GELIBOOT;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00604}00604                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00605}00605 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00606}00606                 \textcolor{keywordflow}{if} (*displaypass) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00607}00607                         md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} |= \mbox{\hyperlink{g__eli_8h_aa392f69ce5377918074f573d9fae9623}{G\_ELI\_FLAG\_GELIDISPLAYPASS}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00608}00608                         sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} |= \mbox{\hyperlink{g__eli_8h_aa392f69ce5377918074f573d9fae9623}{G\_ELI\_FLAG\_GELIDISPLAYPASS}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00609}00609                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (*nodisplaypass) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00610}00610                         md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} \&= \string~G\_ELI\_FLAG\_GELIDISPLAYPASS;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00611}00611                         sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \&= \string~G\_ELI\_FLAG\_GELIDISPLAYPASS;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00612}00612                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00613}00613 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00614}00614                 \textcolor{keywordflow}{if} (*autoresize) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00615}00615                         md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} |= \mbox{\hyperlink{g__eli_8h_acfe6d43486b1b461f1b3e3ed78474603}{G\_ELI\_FLAG\_AUTORESIZE}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00616}00616                         sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} |= \mbox{\hyperlink{g__eli_8h_acfe6d43486b1b461f1b3e3ed78474603}{G\_ELI\_FLAG\_AUTORESIZE}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00617}00617                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (*noautoresize) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00618}00618                         md.\mbox{\hyperlink{structg__eli__metadata_a49218b2094d04c2b1519ab966462da94}{md\_flags}} \&= \string~G\_ELI\_FLAG\_AUTORESIZE;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00619}00619                         sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \&= \string~G\_ELI\_FLAG\_AUTORESIZE;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00620}00620                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00621}00621 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00622}00622                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a50453da3fa0881f2a73d51ec9205d2be}{G\_ELI\_FLAG\_ONETIME}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00623}00623                         \textcolor{comment}{/* There's no metadata on disk so we are done here. */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00624}00624                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00625}00625                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00626}00626 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00627}00627                 sector = malloc(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, M\_ELI, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00628}00628                 \mbox{\hyperlink{g__eli_8h_a131c7bef39674fc3a49f19b047cd15d2}{eli\_metadata\_encode}}(\&md, sector);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00629}00629                 error = \mbox{\hyperlink{geom_8h_a9b87ecbd812c109546b077da483baada}{g\_write\_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}}, sector,}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00630}00630                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00631}00631                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00632}00632                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00633}00633                             \textcolor{stringliteral}{"{}Cannot store metadata on \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00634}00634                             prov, error);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00635}00635                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00636}00636                 explicit\_bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00637}00637                 zfree(sector, M\_ELI);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00638}00638         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00639}00639 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00640}00640 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00641}00641 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00642}\mbox{\hyperlink{g__eli__ctl_8c_a8740d023f220a3b6f4da3e169b906139}{00642}} \mbox{\hyperlink{g__eli__ctl_8c_a8740d023f220a3b6f4da3e169b906139}{g\_eli\_ctl\_setkey}}(\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__eli__ctl_8c_source_l00643}00643 \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00644}00644         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00645}00645         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} md;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00646}00646         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00647}00647         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00648}00648         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00649}00649         u\_char *key, *mkeydst, *sector;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00650}00650         intmax\_t *valp;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00651}00651         \textcolor{keywordtype}{int} keysize, nkey, error;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00652}00652 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00653}00653         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00654}00654 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00655}00655         \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__eli__ctl_8c_source_l00656}00656         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00657}00657                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No 'arg\%u' argument."{}}, 0);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00658}00658                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00659}00659         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00660}00660         key = \mbox{\hyperlink{geom_8h_a3e3d6786258b3336d55a96607f9b8eb8}{gctl\_get\_param}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}key"{}}, \&keysize);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00661}00661         \textcolor{keywordflow}{if} (key == NULL || keysize != \mbox{\hyperlink{g__eli_8h_a5b5012c2878a9fc13f28fd837b163c3f}{G\_ELI\_USERKEYLEN}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00662}00662                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}key"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00663}00663                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00664}00664         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00665}00665         sc = \mbox{\hyperlink{g__eli__ctl_8c_a83004f1cb0627915bc6d1f41d40bde13}{g\_eli\_find\_device}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00666}00666         \textcolor{keywordflow}{if} (sc == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00667}00667                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Provider \%s is invalid."{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00668}00668                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00669}00669         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00670}00670         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a6df3f8f55142a6f1ee2be41835adb7bd}{G\_ELI\_FLAG\_RO}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00671}00671                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Cannot change keys for read-\/only provider."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00672}00672                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00673}00673         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00674}00674         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = LIST\_FIRST(\&sc-\/>\mbox{\hyperlink{structg__eli__softc_a899949202205997147c78c52b32b9843}{sc\_geom}}-\/>consumer);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00675}00675         \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__eli__ctl_8c_source_l00676}00676 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00677}00677         error = \mbox{\hyperlink{g__eli_8c_a73b39d79b3db8b9eb1a3164c7f522c8c}{g\_eli\_read\_metadata}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \&md);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00678}00678         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00679}00679                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Cannot read metadata from \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00680}00680                     \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, error);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00681}00681                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00682}00682         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00683}00683 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00684}00684         valp = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}keyno"{}}, \textcolor{keyword}{sizeof}(*valp));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00685}00685         \textcolor{keywordflow}{if} (valp == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00686}00686                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}keyno"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00687}00687                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00688}00688         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00689}00689         \textcolor{keywordflow}{if} (*valp != -\/1)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00690}00690                 nkey = *valp;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00691}00691         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00692}00692                 nkey = sc-\/>\mbox{\hyperlink{structg__eli__softc_aa5916039b76c3ba1a57f6fc3855372b1}{sc\_nkey}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00693}00693         \textcolor{keywordflow}{if} (nkey < 0 || nkey >= \mbox{\hyperlink{g__eli_8h_abb1d3eb1d3c15da2395385de4d58cf81}{G\_ELI\_MAXMKEYS}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00694}00694                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid '\%s' argument."{}}, \textcolor{stringliteral}{"{}keyno"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00695}00695                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00696}00696         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00697}00697 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00698}00698         valp = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}iterations"{}}, \textcolor{keyword}{sizeof}(*valp));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00699}00699         \textcolor{keywordflow}{if} (valp == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00700}00700                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}iterations"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00701}00701                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00702}00702         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00703}00703         \textcolor{comment}{/* Check if iterations number should and can be changed. */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00704}00704         \textcolor{keywordflow}{if} (*valp != -\/1 \&\& md.\mbox{\hyperlink{structg__eli__metadata_ac992d6c682f281f204b4534a13386e7d}{md\_iterations}} == -\/1) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00705}00705                 md.\mbox{\hyperlink{structg__eli__metadata_ac992d6c682f281f204b4534a13386e7d}{md\_iterations}} = *valp;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00706}00706         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (*valp != -\/1 \&\& *valp != md.\mbox{\hyperlink{structg__eli__metadata_ac992d6c682f281f204b4534a13386e7d}{md\_iterations}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00707}00707                 \textcolor{keywordflow}{if} (bitcount32(md.\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}}) != 1) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00708}00708                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}To be able to use '-\/i' option, only "{}}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00709}00709                             \textcolor{stringliteral}{"{}one key can be defined."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00710}00710                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00711}00711                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00712}00712                 \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}} != (1 << nkey)) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00713}00713                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Only already defined key can be "{}}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00714}00714                             \textcolor{stringliteral}{"{}changed when '-\/i' option is used."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00715}00715                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00716}00716                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00717}00717                 md.\mbox{\hyperlink{structg__eli__metadata_ac992d6c682f281f204b4534a13386e7d}{md\_iterations}} = *valp;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00718}00718         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00719}00719 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00720}00720         mkeydst = md.\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}} + nkey * \mbox{\hyperlink{g__eli_8h_a91be18a4ef2a9aa3d1373c347cea7edb}{G\_ELI\_MKEYLEN}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00721}00721         md.\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}} |= (1 << nkey);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00722}00722 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00723}00723         bcopy(sc-\/>\mbox{\hyperlink{structg__eli__softc_a8581b85c073273bcbb556b18d5932b10}{sc\_mkey}}, mkeydst, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structg__eli__softc_a8581b85c073273bcbb556b18d5932b10}{sc\_mkey}}));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00724}00724 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00725}00725         \textcolor{comment}{/* Encrypt Master Key with the new key. */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00726}00726         error = \mbox{\hyperlink{g__eli_8h_a77b2663c4fbbe75572ef203a27a74781}{g\_eli\_mkey\_encrypt}}(md.\mbox{\hyperlink{structg__eli__metadata_ab104ed527e62f73f3d80fba974a38456}{md\_ealgo}}, key, md.\mbox{\hyperlink{structg__eli__metadata_a5527b37bf36a0f83967c9334a6f8b134}{md\_keylen}}, mkeydst);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00727}00727         explicit\_bzero(key, keysize);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00728}00728         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00729}00729                 explicit\_bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00730}00730                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Cannot encrypt Master Key (error=\%d)."{}}, error);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00731}00731                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00732}00732         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00733}00733 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00734}00734         sector = malloc(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, M\_ELI, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00735}00735         \textcolor{comment}{/* Store metadata with fresh key. */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00736}00736         \mbox{\hyperlink{g__eli_8h_a131c7bef39674fc3a49f19b047cd15d2}{eli\_metadata\_encode}}(\&md, sector);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00737}00737         explicit\_bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00738}00738         error = \mbox{\hyperlink{geom_8h_a9b87ecbd812c109546b077da483baada}{g\_write\_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}}, sector,}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00739}00739             \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00740}00740         zfree(sector, M\_ELI);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00741}00741         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00742}00742                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Cannot store metadata on \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00743}00743                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, error);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00744}00744                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00745}00745         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00746}00746         \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(1, \textcolor{stringliteral}{"{}Key \%u changed on \%s."{}}, nkey, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00747}00747 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00748}00748 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00749}00749 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00750}\mbox{\hyperlink{g__eli__ctl_8c_a3e099b94efcf9f98d5f0fdccbcda2205}{00750}} \mbox{\hyperlink{g__eli__ctl_8c_a3e099b94efcf9f98d5f0fdccbcda2205}{g\_eli\_ctl\_delkey}}(\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__eli__ctl_8c_source_l00751}00751 \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00752}00752         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00753}00753         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} md;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00754}00754         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00755}00755         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00756}00756         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00757}00757         u\_char *mkeydst, *sector;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00758}00758         intmax\_t *valp;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00759}00759         \textcolor{keywordtype}{size\_t} keysize;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00760}00760         \textcolor{keywordtype}{int} error, nkey, *all, *force;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00761}00761         u\_int i;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00762}00762 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00763}00763         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00764}00764 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00765}00765         nkey = 0;       \textcolor{comment}{/* fixes causeless gcc warning */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00766}00766 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00767}00767         \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__eli__ctl_8c_source_l00768}00768         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00769}00769                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No 'arg\%u' argument."{}}, 0);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00770}00770                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00771}00771         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00772}00772         sc = \mbox{\hyperlink{g__eli__ctl_8c_a83004f1cb0627915bc6d1f41d40bde13}{g\_eli\_find\_device}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00773}00773         \textcolor{keywordflow}{if} (sc == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00774}00774                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Provider \%s is invalid."{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00775}00775                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00776}00776         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00777}00777         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a6df3f8f55142a6f1ee2be41835adb7bd}{G\_ELI\_FLAG\_RO}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00778}00778                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Cannot delete keys for read-\/only provider."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00779}00779                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00780}00780         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00781}00781         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = LIST\_FIRST(\&sc-\/>\mbox{\hyperlink{structg__eli__softc_a899949202205997147c78c52b32b9843}{sc\_geom}}-\/>consumer);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00782}00782         \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__eli__ctl_8c_source_l00783}00783 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00784}00784         error = \mbox{\hyperlink{g__eli_8c_a73b39d79b3db8b9eb1a3164c7f522c8c}{g\_eli\_read\_metadata}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \&md);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00785}00785         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00786}00786                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Cannot read metadata from \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00787}00787                     \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, error);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00788}00788                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00789}00789         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00790}00790 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00791}00791         all = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}all"{}}, \textcolor{keyword}{sizeof}(*all));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00792}00792         \textcolor{keywordflow}{if} (all == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00793}00793                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}all"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00794}00794                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00795}00795         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00796}00796 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00797}00797         \textcolor{keywordflow}{if} (*all) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00798}00798                 mkeydst = md.\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00799}00799                 keysize = \textcolor{keyword}{sizeof}(md.\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00800}00800         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00801}00801                 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__eli__ctl_8c_source_l00802}00802                 \textcolor{keywordflow}{if} (force == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00803}00803                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}force"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00804}00804                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00805}00805                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00806}00806 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00807}00807                 valp = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}keyno"{}}, \textcolor{keyword}{sizeof}(*valp));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00808}00808                 \textcolor{keywordflow}{if} (valp == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00809}00809                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}keyno"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00810}00810                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00811}00811                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00812}00812                 \textcolor{keywordflow}{if} (*valp != -\/1)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00813}00813                         nkey = *valp;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00814}00814                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00815}00815                         nkey = sc-\/>\mbox{\hyperlink{structg__eli__softc_aa5916039b76c3ba1a57f6fc3855372b1}{sc\_nkey}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00816}00816                 \textcolor{keywordflow}{if} (nkey < 0 || nkey >= \mbox{\hyperlink{g__eli_8h_abb1d3eb1d3c15da2395385de4d58cf81}{G\_ELI\_MAXMKEYS}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00817}00817                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid '\%s' argument."{}}, \textcolor{stringliteral}{"{}keyno"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00818}00818                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00819}00819                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00820}00820                 \textcolor{keywordflow}{if} (!(md.\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}} \& (1 << nkey)) \&\& !*force) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00821}00821                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Master Key \%u is not set."{}}, nkey);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00822}00822                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00823}00823                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00824}00824                 md.\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}} \&= \string~(1 << nkey);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00825}00825                 \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}} == 0 \&\& !*force) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00826}00826                         \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}This is the last Master Key. Use '-\/f' "{}}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00827}00827                             \textcolor{stringliteral}{"{}flag if you really want to remove it."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00828}00828                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00829}00829                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00830}00830                 mkeydst = md.\mbox{\hyperlink{structg__eli__metadata_a3d2880c6ca44524e58cb63ba479f14e9}{md\_mkeys}} + nkey * \mbox{\hyperlink{g__eli_8h_a91be18a4ef2a9aa3d1373c347cea7edb}{G\_ELI\_MKEYLEN}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00831}00831                 keysize = \mbox{\hyperlink{g__eli_8h_a91be18a4ef2a9aa3d1373c347cea7edb}{G\_ELI\_MKEYLEN}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00832}00832         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00833}00833 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00834}00834         sector = malloc(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, M\_ELI, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00835}00835         \textcolor{keywordflow}{for} (i = 0; i <= \mbox{\hyperlink{g__eli_8c_a704e93b0165f740d53c96f3b5be78550}{g\_eli\_overwrites}}; i++) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00836}00836                 \textcolor{keywordflow}{if} (i == \mbox{\hyperlink{g__eli_8c_a704e93b0165f740d53c96f3b5be78550}{g\_eli\_overwrites}})}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00837}00837                         explicit\_bzero(mkeydst, keysize);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00838}00838                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00839}00839                         arc4rand(mkeydst, keysize, 0);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00840}00840                 \textcolor{comment}{/* Store metadata with destroyed key. */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00841}00841                 \mbox{\hyperlink{g__eli_8h_a131c7bef39674fc3a49f19b047cd15d2}{eli\_metadata\_encode}}(\&md, sector);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00842}00842                 error = \mbox{\hyperlink{geom_8h_a9b87ecbd812c109546b077da483baada}{g\_write\_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}}, sector,}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00843}00843                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00844}00844                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00845}00845                         \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(0, \textcolor{stringliteral}{"{}Cannot store metadata on \%s "{}}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00846}00846                             \textcolor{stringliteral}{"{}(error=\%d)."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, error);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00847}00847                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00848}00848                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00849}00849 \textcolor{comment}{                 * Flush write cache so we don't overwrite data N times in cache}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00850}00850 \textcolor{comment}{                 * and only once on disk.}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00851}00851 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00852}00852                 (void)\mbox{\hyperlink{geom_8h_ac6fb73d666033fb395f7beaf2d6caa46}{g\_io\_flush}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00853}00853         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00854}00854         explicit\_bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00855}00855         zfree(sector, M\_ELI);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00856}00856         \textcolor{keywordflow}{if} (*all)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00857}00857                 \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(1, \textcolor{stringliteral}{"{}All keys removed from \%s."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00858}00858         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00859}00859                 \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(1, \textcolor{stringliteral}{"{}Key \%d removed from \%s."{}}, nkey, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00860}00860 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00861}00861 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00862}00862 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00863}\mbox{\hyperlink{g__eli__ctl_8c_aaa7aafe83a3cddd889ef978ff2c427a4}{00863}} \mbox{\hyperlink{g__eli__ctl_8c_aaa7aafe83a3cddd889ef978ff2c427a4}{g\_eli\_suspend\_one}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structgctl__req}{gctl\_req}} *\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}})}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00864}00864 \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00865}00865         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__worker}{g\_eli\_worker}} *wr;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00866}00866 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00867}00867         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00868}00868 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00869}00869         KASSERT(sc != NULL, (\textcolor{stringliteral}{"{}NULL sc"{}}));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00870}00870 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00871}00871         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a50453da3fa0881f2a73d51ec9205d2be}{G\_ELI\_FLAG\_ONETIME}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00872}00872                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00873}00873                     \textcolor{stringliteral}{"{}Device \%s is using one-\/time key, suspend not supported."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00874}00874                     sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00875}00875                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00876}00876         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00877}00877 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00878}00878         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__eli__softc_a972ab3f6da1b3d16ead41a4c2cc5a574}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00879}00879         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a5d55b57a8415e1d89dcde37fe842a9f8}{G\_ELI\_FLAG\_SUSPEND}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00880}00880                 mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__eli__softc_a972ab3f6da1b3d16ead41a4c2cc5a574}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00881}00881                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Device \%s already suspended."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00882}00882                     sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00883}00883                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00884}00884         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00885}00885         sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} |= \mbox{\hyperlink{g__eli_8h_a5d55b57a8415e1d89dcde37fe842a9f8}{G\_ELI\_FLAG\_SUSPEND}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00886}00886         wakeup(sc);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00887}00887         \textcolor{keywordflow}{for} (;;) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00888}00888                 LIST\_FOREACH(wr, \&sc-\/>sc\_workers, w\_next) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00889}00889                         \textcolor{keywordflow}{if} (wr-\/>\mbox{\hyperlink{structg__eli__worker_a33b07dcf1ffd9dd8e62709dad9d7b76a}{w\_active}})}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00890}00890                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00891}00891                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00892}00892                 \textcolor{keywordflow}{if} (wr == NULL)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00893}00893                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00894}00894                 \textcolor{comment}{/* Not all threads suspended. */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00895}00895                 msleep(\&sc-\/>sc\_workers, \&sc-\/>\mbox{\hyperlink{structg__eli__softc_a972ab3f6da1b3d16ead41a4c2cc5a574}{sc\_queue\_mtx}}, PRIBIO,}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00896}00896                     \textcolor{stringliteral}{"{}geli:suspend"{}}, 0);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00897}00897         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00898}00898         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00899}00899 \textcolor{comment}{         * Clear sensitive data on suspend, they will be recovered on resume.}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00900}00900 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00901}00901         explicit\_bzero(sc-\/>\mbox{\hyperlink{structg__eli__softc_a8581b85c073273bcbb556b18d5932b10}{sc\_mkey}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structg__eli__softc_a8581b85c073273bcbb556b18d5932b10}{sc\_mkey}}));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00902}00902         \mbox{\hyperlink{g__eli_8h_abecc31857c0153fd28236eae25d1e8d7}{g\_eli\_key\_destroy}}(sc);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00903}00903         explicit\_bzero(sc-\/>\mbox{\hyperlink{structg__eli__softc_a01aee1422eec5048a657dfab2a70518f}{sc\_akey}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structg__eli__softc_a01aee1422eec5048a657dfab2a70518f}{sc\_akey}}));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00904}00904         explicit\_bzero(\&sc-\/>\mbox{\hyperlink{structg__eli__softc_ae776cdeaee3f3200f063487b5064d7dd}{sc\_akeyctx}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structg__eli__softc_ae776cdeaee3f3200f063487b5064d7dd}{sc\_akeyctx}}));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00905}00905         explicit\_bzero(sc-\/>\mbox{\hyperlink{structg__eli__softc_a35a1d558d42d78a52715771803ee042e}{sc\_ivkey}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structg__eli__softc_a35a1d558d42d78a52715771803ee042e}{sc\_ivkey}}));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00906}00906         explicit\_bzero(\&sc-\/>\mbox{\hyperlink{structg__eli__softc_a7e01f366939fc752d121f7a6bc352675}{sc\_ivctx}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structg__eli__softc_a7e01f366939fc752d121f7a6bc352675}{sc\_ivctx}}));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00907}00907         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__eli__softc_a972ab3f6da1b3d16ead41a4c2cc5a574}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00908}00908         \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(0, \textcolor{stringliteral}{"{}Device \%s has been suspended."{}}, sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00909}00909 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00910}00910 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00911}00911 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00912}\mbox{\hyperlink{g__eli__ctl_8c_a295f052a287f599fd6d5643b82d955de}{00912}} \mbox{\hyperlink{g__eli__ctl_8c_a295f052a287f599fd6d5643b82d955de}{g\_eli\_ctl\_suspend}}(\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__eli__ctl_8c_source_l00913}00913 \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00914}00914         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00915}00915         \textcolor{keywordtype}{int} *all, *nargs;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00916}00916 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00917}00917         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00918}00918 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00919}00919         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__eli__ctl_8c_source_l00920}00920         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00921}00921                 \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__eli__ctl_8c_source_l00922}00922                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00923}00923         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00924}00924         all = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}all"{}}, \textcolor{keyword}{sizeof}(*all));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00925}00925         \textcolor{keywordflow}{if} (all == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00926}00926                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}all"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00927}00927                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00928}00928         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00929}00929         \textcolor{keywordflow}{if} (!*all \&\& *nargs == 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00930}00930                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Too few arguments."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00931}00931                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00932}00932         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00933}00933 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00934}00934         \textcolor{keywordflow}{if} (*all) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00935}00935                 \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, *gp2;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00936}00936 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00937}00937                 LIST\_FOREACH\_SAFE(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \&\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>geom, geom, gp2) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00938}00938                         sc = \mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00939}00939                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a50453da3fa0881f2a73d51ec9205d2be}{G\_ELI\_FLAG\_ONETIME}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00940}00940                                 \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(0,}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00941}00941                                     \textcolor{stringliteral}{"{}Device \%s is using one-\/time key, suspend not supported, skipping."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00942}00942                                     sc-\/>sc\_name);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00943}00943                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00944}00944                         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00945}00945                         \mbox{\hyperlink{g__eli__ctl_8c_aaa7aafe83a3cddd889ef978ff2c427a4}{g\_eli\_suspend\_one}}(sc, \mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00946}00946                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00947}00947         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00948}00948                 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *prov;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00949}00949                 \textcolor{keywordtype}{char} param[16];}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00950}00950                 \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00951}00951 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00952}00952                 \textcolor{keywordflow}{for} (i = 0; i < *nargs; i++) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00953}00953                         snprintf(param, \textcolor{keyword}{sizeof}(param), \textcolor{stringliteral}{"{}arg\%d"{}}, i);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00954}00954                         prov = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, param);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00955}00955                         \textcolor{keywordflow}{if} (prov == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00956}00956                                 \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(0, \textcolor{stringliteral}{"{}No 'arg\%d' argument."{}}, i);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00957}00957                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00958}00958                         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00959}00959 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00960}00960                         sc = \mbox{\hyperlink{g__eli__ctl_8c_a83004f1cb0627915bc6d1f41d40bde13}{g\_eli\_find\_device}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00961}00961                         \textcolor{keywordflow}{if} (sc == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00962}00962                                 \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(0, \textcolor{stringliteral}{"{}No such provider: \%s."{}}, prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00963}00963                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00964}00964                         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00965}00965                         \mbox{\hyperlink{g__eli__ctl_8c_aaa7aafe83a3cddd889ef978ff2c427a4}{g\_eli\_suspend\_one}}(sc, \mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00966}00966                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00967}00967         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00968}00968 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00969}00969 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00970}00970 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00971}\mbox{\hyperlink{g__eli__ctl_8c_a20091cdbff4a53549afa0c7360ee89c3}{00971}} \mbox{\hyperlink{g__eli__ctl_8c_a20091cdbff4a53549afa0c7360ee89c3}{g\_eli\_ctl\_resume}}(\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__eli__ctl_8c_source_l00972}00972 \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00973}00973         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__metadata}{g\_eli\_metadata}} md;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00974}00974         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00975}00975         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00976}00976         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00977}00977         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00978}00978         u\_char *key, mkey[\mbox{\hyperlink{g__eli_8h_aee6be3564eb1e7728a07e0a64441d7f5}{G\_ELI\_DATAIVKEYLEN}}];}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00979}00979         \textcolor{keywordtype}{int} *nargs, keysize, error;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00980}00980         u\_int nkey;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00981}00981 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00982}00982         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00983}00983 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00984}00984         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__eli__ctl_8c_source_l00985}00985         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00986}00986                 \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__eli__ctl_8c_source_l00987}00987                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00988}00988         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00989}00989         \textcolor{keywordflow}{if} (*nargs != 1) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00990}00990                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Invalid number of arguments."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00991}00991                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00992}00992         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00993}00993 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00994}00994         \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__eli__ctl_8c_source_l00995}00995         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00996}00996                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No 'arg\%u' argument."{}}, 0);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00997}00997                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00998}00998         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l00999}00999         key = \mbox{\hyperlink{geom_8h_a3e3d6786258b3336d55a96607f9b8eb8}{gctl\_get\_param}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}key"{}}, \&keysize);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01000}01000         \textcolor{keywordflow}{if} (key == NULL || keysize != \mbox{\hyperlink{g__eli_8h_a5b5012c2878a9fc13f28fd837b163c3f}{G\_ELI\_USERKEYLEN}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01001}01001                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}key"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01002}01002                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01003}01003         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01004}01004         sc = \mbox{\hyperlink{g__eli__ctl_8c_a83004f1cb0627915bc6d1f41d40bde13}{g\_eli\_find\_device}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01005}01005         \textcolor{keywordflow}{if} (sc == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01006}01006                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Provider \%s is invalid."{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01007}01007                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01008}01008         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01009}01009         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = LIST\_FIRST(\&sc-\/>\mbox{\hyperlink{structg__eli__softc_a899949202205997147c78c52b32b9843}{sc\_geom}}-\/>consumer);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01010}01010         \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__eli__ctl_8c_source_l01011}01011         error = \mbox{\hyperlink{g__eli_8c_a73b39d79b3db8b9eb1a3164c7f522c8c}{g\_eli\_read\_metadata}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, \&md);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01012}01012         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01013}01013                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Cannot read metadata from \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01014}01014                     \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}}, error);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01015}01015                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01016}01016         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01017}01017         \textcolor{keywordflow}{if} (md.\mbox{\hyperlink{structg__eli__metadata_a0474a13626f0736ae5406bd253896420}{md\_keys}} == 0x00) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01018}01018                 explicit\_bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01019}01019                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No valid keys on \%s."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01020}01020                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01021}01021         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01022}01022 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01023}01023         error = \mbox{\hyperlink{g__eli_8h_aca1880f274b4cf6b2627697cd0588b23}{g\_eli\_mkey\_decrypt\_any}}(\&md, key, mkey, \&nkey);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01024}01024         explicit\_bzero(key, keysize);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01025}01025         \textcolor{keywordflow}{if} (error == -\/1) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01026}01026                 explicit\_bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01027}01027                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Wrong key for \%s."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01028}01028                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01029}01029         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (error > 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01030}01030                 explicit\_bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01031}01031                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Cannot decrypt Master Key for \%s (error=\%d)."{}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01032}01032                     \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, error);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01033}01033                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01034}01034         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01035}01035         \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(1, \textcolor{stringliteral}{"{}Using Master Key \%u for \%s."{}}, nkey, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01036}01036 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01037}01037         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__eli__softc_a972ab3f6da1b3d16ead41a4c2cc5a574}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01038}01038         \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a5d55b57a8415e1d89dcde37fe842a9f8}{G\_ELI\_FLAG\_SUSPEND}}))}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01039}01039                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Device \%s is not suspended."{}}, \mbox{\hyperlink{g__part__if_8m_aff5d3acc33944ecb11914d04ef06bb54}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01040}01040         \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01041}01041                 \textcolor{comment}{/* Restore sc\_mkey, sc\_ekeys, sc\_akey and sc\_ivkey. */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01042}01042                 \mbox{\hyperlink{g__eli_8h_a43698d99a6e3a6a86c0531e390dde9a9}{g\_eli\_mkey\_propagate}}(sc, mkey);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01043}01043                 sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \&= \string~G\_ELI\_FLAG\_SUSPEND;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01044}01044                 \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(1, \textcolor{stringliteral}{"{}Resumed \%s."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01045}01045                 wakeup(sc);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01046}01046         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01047}01047         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__eli__softc_a972ab3f6da1b3d16ead41a4c2cc5a574}{sc\_queue\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01048}01048         explicit\_bzero(mkey, \textcolor{keyword}{sizeof}(mkey));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01049}01049         explicit\_bzero(\&md, \textcolor{keyword}{sizeof}(md));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01050}01050 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01051}01051 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01052}01052 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01053}\mbox{\hyperlink{g__eli__ctl_8c_a0773d9616d5337dc84cc817c3e5dacd8}{01053}} \mbox{\hyperlink{g__eli__ctl_8c_a0773d9616d5337dc84cc817c3e5dacd8}{g\_eli\_kill\_one}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01054}01054 \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01055}01055         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01056}01056         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01057}01057         \textcolor{keywordtype}{int} error = 0;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01058}01058 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01059}01059         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01060}01060 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01061}01061         \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01062}01062                 \textcolor{keywordflow}{return} (ENOENT);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01063}01063 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01064}01064         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = LIST\_FIRST(\&sc-\/>\mbox{\hyperlink{structg__eli__softc_a899949202205997147c78c52b32b9843}{sc\_geom}}-\/>provider);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01065}01065         \mbox{\hyperlink{geom_8h_a7a46b49361266e9bb4b1441aade2c48f}{g\_error\_provider}}(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}, ENXIO);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01066}01066 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01067}01067         \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}} = LIST\_FIRST(\&sc-\/>\mbox{\hyperlink{structg__eli__softc_a899949202205997147c78c52b32b9843}{sc\_geom}}-\/>consumer);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01068}01068         \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__eli__ctl_8c_source_l01069}01069 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01070}01070         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__eli__softc_a94876b8cf2ed7da3eb3a3e1858171ef2}{sc\_flags}} \& \mbox{\hyperlink{g__eli_8h_a6df3f8f55142a6f1ee2be41835adb7bd}{G\_ELI\_FLAG\_RO}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01071}01071                 \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(0, \textcolor{stringliteral}{"{}WARNING: Metadata won't be erased on read-\/only "{}}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01072}01072                     \textcolor{stringliteral}{"{}provider: \%s."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01073}01073         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01074}01074                 u\_char *sector;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01075}01075                 u\_int i;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01076}01076                 \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01077}01077 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01078}01078                 sector = malloc(\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, M\_ELI, M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01079}01079                 \textcolor{keywordflow}{for} (i = 0; i <= \mbox{\hyperlink{g__eli_8c_a704e93b0165f740d53c96f3b5be78550}{g\_eli\_overwrites}}; i++) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01080}01080                         \textcolor{keywordflow}{if} (i == \mbox{\hyperlink{g__eli_8c_a704e93b0165f740d53c96f3b5be78550}{g\_eli\_overwrites}})}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01081}01081                                 bzero(sector, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01082}01082                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01083}01083                                 arc4rand(sector, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, 0);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01084}01084                         err = \mbox{\hyperlink{geom_8h_a9b87ecbd812c109546b077da483baada}{g\_write\_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}},}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01085}01085                             sector, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01086}01086                         \textcolor{keywordflow}{if} (err != 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01087}01087                                 \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(0, \textcolor{stringliteral}{"{}Cannot erase metadata on \%s "{}}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01088}01088                                     \textcolor{stringliteral}{"{}(error=\%d)."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}}, err);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01089}01089                                 \textcolor{keywordflow}{if} (error == 0)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01090}01090                                         error = err;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01091}01091                         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01092}01092                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01093}01093 \textcolor{comment}{                         * Flush write cache so we don't overwrite data N times}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01094}01094 \textcolor{comment}{                         * in cache and only once on disk.}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01095}01095 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01096}01096                         (void)\mbox{\hyperlink{geom_8h_ac6fb73d666033fb395f7beaf2d6caa46}{g\_io\_flush}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01097}01097                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01098}01098                 \mbox{\hyperlink{g__raid__md__if_8m_a4df9edb2717b3f7e4c3c903878577a54}{free}}(sector, M\_ELI);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01099}01099         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01100}01100         \textcolor{keywordflow}{if} (error == 0)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01101}01101                 \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(0, \textcolor{stringliteral}{"{}\%s has been killed."{}}, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_a2bffb416ee58cf4df7839c6fd5ec004a}{name}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01102}01102         \mbox{\hyperlink{g__eli_8c_a065e40173aeaf62cd0dad0d2b7a71e04}{g\_eli\_destroy}}(sc, TRUE);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01103}01103         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01104}01104 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01105}01105 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01106}01106 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01107}\mbox{\hyperlink{g__eli__ctl_8c_afdaa334c488cd0d7e6e753c4d357d2c0}{01107}} \mbox{\hyperlink{g__eli__ctl_8c_afdaa334c488cd0d7e6e753c4d357d2c0}{g\_eli\_ctl\_kill}}(\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__eli__ctl_8c_source_l01108}01108 \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01109}01109         \textcolor{keywordtype}{int} *all, *nargs;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01110}01110         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01111}01111 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01112}01112         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01113}01113 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01114}01114         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__eli__ctl_8c_source_l01115}01115         \textcolor{keywordflow}{if} (nargs == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01116}01116                 \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__eli__ctl_8c_source_l01117}01117                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01118}01118         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01119}01119         all = \mbox{\hyperlink{geom_8h_ab762d12640f528d8f1f60eee92bf5f3b}{gctl\_get\_paraml}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}all"{}}, \textcolor{keyword}{sizeof}(*all));}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01120}01120         \textcolor{keywordflow}{if} (all == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01121}01121                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}No '\%s' argument."{}}, \textcolor{stringliteral}{"{}all"{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01122}01122                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01123}01123         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01124}01124         \textcolor{keywordflow}{if} (!*all \&\& *nargs == 0) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01125}01125                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Too few arguments."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01126}01126                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01127}01127         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01128}01128 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01129}01129         \textcolor{keywordflow}{if} (*all) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01130}01130                 \textcolor{keyword}{struct }\mbox{\hyperlink{structg__geom}{g\_geom}} *\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, *gp2;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01131}01131 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01132}01132                 LIST\_FOREACH\_SAFE(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}, \&\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}-\/>geom, geom, gp2) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01133}01133                         error = \mbox{\hyperlink{g__eli__ctl_8c_a0773d9616d5337dc84cc817c3e5dacd8}{g\_eli\_kill\_one}}(\mbox{\hyperlink{g__part__if_8m_abdc908a08b24cd2e589de2f44e40eeb9}{gp}}-\/>\mbox{\hyperlink{structg__geom_aa83c08c83459420f6cbcfe64c6099466}{softc}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01134}01134                         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01135}01135                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Not fully done."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01136}01136                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01137}01137         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01138}01138                 \textcolor{keyword}{struct }\mbox{\hyperlink{structg__eli__softc}{g\_eli\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01139}01139                 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *prov;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01140}01140                 \textcolor{keywordtype}{char} param[16];}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01141}01141                 \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01142}01142 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01143}01143                 \textcolor{keywordflow}{for} (i = 0; i < *nargs; i++) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01144}01144                         snprintf(param, \textcolor{keyword}{sizeof}(param), \textcolor{stringliteral}{"{}arg\%d"{}}, i);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01145}01145                         prov = \mbox{\hyperlink{geom_8h_ada33526012aac8ee446617bb3749a07c}{gctl\_get\_asciiparam}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, param);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01146}01146                         \textcolor{keywordflow}{if} (prov == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01147}01147                                 \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(0, \textcolor{stringliteral}{"{}No 'arg\%d' argument."{}}, i);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01148}01148                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01149}01149                         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01150}01150 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01151}01151                         sc = \mbox{\hyperlink{g__eli__ctl_8c_a83004f1cb0627915bc6d1f41d40bde13}{g\_eli\_find\_device}}(\mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}}, prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01152}01152                         \textcolor{keywordflow}{if} (sc == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01153}01153                                 \mbox{\hyperlink{g__eli_8h_ad99f556222c6099625689315eadadd9d}{G\_ELI\_DEBUG}}(0, \textcolor{stringliteral}{"{}No such provider: \%s."{}}, prov);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01154}01154                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01155}01155                         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01156}01156                         error = \mbox{\hyperlink{g__eli__ctl_8c_a0773d9616d5337dc84cc817c3e5dacd8}{g\_eli\_kill\_one}}(sc);}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01157}01157                         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01158}01158                                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Not fully done."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01159}01159                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01160}01160         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01161}01161 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01162}01162 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01163}01163 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01164}\mbox{\hyperlink{g__eli_8h_afe73ab3c1b97b746683f8a5e6292c147}{01164}} \mbox{\hyperlink{g__eli__ctl_8c_afe73ab3c1b97b746683f8a5e6292c147}{g\_eli\_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__eli__ctl_8c_source_l01165}01165 \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01166}01166         uint32\_t *version;}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01167}01167 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01168}01168         \mbox{\hyperlink{geom_8h_a1898dc8c812faa5de231ab840e8562bf}{g\_topology\_assert}}();}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01169}01169 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01170}01170         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__eli__ctl_8c_source_l01171}01171         \textcolor{keywordflow}{if} (version == NULL) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01172}01172                 \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__eli__ctl_8c_source_l01173}01173                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01174}01174         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01175}01175         \textcolor{keywordflow}{while} (*version != \mbox{\hyperlink{g__eli_8h_ab008623662537df1abcfc6d0c20e93c1}{G\_ELI\_VERSION}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01176}01176                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__eli_8h_ab008623662537df1abcfc6d0c20e93c1}{G\_ELI\_VERSION}} == \mbox{\hyperlink{g__eli_8h_a5fdab18ff1d1cbd969e6d739b49db736}{G\_ELI\_VERSION\_06}} \&\&}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01177}01177                     *version == \mbox{\hyperlink{g__eli_8h_a66fcd7e171885dc792b053dd6e2d8965}{G\_ELI\_VERSION\_05}}) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01178}01178                         \textcolor{comment}{/* Compatible. */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01179}01179                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01180}01180                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01181}01181                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__eli_8h_ab008623662537df1abcfc6d0c20e93c1}{G\_ELI\_VERSION}} == \mbox{\hyperlink{g__eli_8h_a17e89e9812752f25a89e88aeb7c6ec7f}{G\_ELI\_VERSION\_07}} \&\&}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01182}01182                     (*version == \mbox{\hyperlink{g__eli_8h_a66fcd7e171885dc792b053dd6e2d8965}{G\_ELI\_VERSION\_05}} ||}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01183}01183                      *version == \mbox{\hyperlink{g__eli_8h_a5fdab18ff1d1cbd969e6d739b49db736}{G\_ELI\_VERSION\_06}})) \{}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01184}01184                         \textcolor{comment}{/* Compatible. */}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01185}01185                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01186}01186                 \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01187}01187                 \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__eli__ctl_8c_source_l01188}01188                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01189}01189         \}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01190}01190 }
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01191}01191         \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}attach"{}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01192}01192                 \mbox{\hyperlink{g__eli__ctl_8c_a81e8b4c7ee993beaa6b7ebd24d34a3fc}{g\_eli\_ctl\_attach}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01193}01193         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}detach"{}}) == 0 || strcmp(verb, \textcolor{stringliteral}{"{}stop"{}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01194}01194                 \mbox{\hyperlink{g__eli__ctl_8c_a9c9515c8ecd783e45f3cd62f767fb494}{g\_eli\_ctl\_detach}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01195}01195         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}onetime"{}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01196}01196                 \mbox{\hyperlink{g__eli__ctl_8c_a11d2b0d71c00b7552264979099b2a9d7}{g\_eli\_ctl\_onetime}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01197}01197         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}configure"{}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01198}01198                 \mbox{\hyperlink{g__eli__ctl_8c_a114492a330f919db93ccf29ffe3419ec}{g\_eli\_ctl\_configure}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01199}01199         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}setkey"{}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01200}01200                 \mbox{\hyperlink{g__eli__ctl_8c_a8740d023f220a3b6f4da3e169b906139}{g\_eli\_ctl\_setkey}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01201}01201         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}delkey"{}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01202}01202                 \mbox{\hyperlink{g__eli__ctl_8c_a3e099b94efcf9f98d5f0fdccbcda2205}{g\_eli\_ctl\_delkey}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01203}01203         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}suspend"{}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01204}01204                 \mbox{\hyperlink{g__eli__ctl_8c_a295f052a287f599fd6d5643b82d955de}{g\_eli\_ctl\_suspend}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01205}01205         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}resume"{}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01206}01206                 \mbox{\hyperlink{g__eli__ctl_8c_a20091cdbff4a53549afa0c7360ee89c3}{g\_eli\_ctl\_resume}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01207}01207         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (strcmp(verb, \textcolor{stringliteral}{"{}kill"{}}) == 0)}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01208}01208                 \mbox{\hyperlink{g__eli__ctl_8c_afdaa334c488cd0d7e6e753c4d357d2c0}{g\_eli\_ctl\_kill}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \mbox{\hyperlink{g__raid__md__if_8m_a4f7502795edfd2493d3d223d0df33e1d}{mp}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01209}01209         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01210}01210                 \mbox{\hyperlink{geom_8h_a1d51201471b52be7e19a98b0fcb144de}{gctl\_error}}(\mbox{\hyperlink{g__part__if_8m_a7a9f20c97e75f805eb506910bd3e70d3}{req}}, \textcolor{stringliteral}{"{}Unknown verb."{}});}
\DoxyCodeLine{\Hypertarget{g__eli__ctl_8c_source_l01211}01211 \}}

\end{DoxyCode}
