\hypertarget{geom__vinum__share_8c_source}{}\doxysection{geom\+\_\+vinum\+\_\+share.\+c}
\label{geom__vinum__share_8c_source}\index{geom/vinum/geom\_vinum\_share.c@{geom/vinum/geom\_vinum\_share.c}}
\mbox{\hyperlink{geom__vinum__share_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/4-\/Clause}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2004, 2007 Lukas Ertl}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00005}00005 \textcolor{comment}{ * Copyright (c) 1997, 1998, 1999}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00006}00006 \textcolor{comment}{ *      Nan Yang Computer Services Limited.  All rights reserved.}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00007}00007 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00008}00008 \textcolor{comment}{ *  Parts written by Greg Lehey}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00009}00009 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00010}00010 \textcolor{comment}{ *  This software is distributed under the so-\/called ``Berkeley}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00011}00011 \textcolor{comment}{ *  License'':}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00012}00012 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00013}00013 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00014}00014 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00015}00015 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00016}00016 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00017}00017 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00018}00018 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00019}00019 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00020}00020 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00021}00021 \textcolor{comment}{ * 3. All advertising materials mentioning features or use of this software}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00022}00022 \textcolor{comment}{ *    must display the following acknowledgement:}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00023}00023 \textcolor{comment}{ *      This product includes software developed by Nan Yang Computer}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00024}00024 \textcolor{comment}{ *      Services Limited.}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00025}00025 \textcolor{comment}{ * 4. Neither the name of the Company nor the names of its contributors}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00026}00026 \textcolor{comment}{ *    may be used to endorse or promote products derived from this software}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00027}00027 \textcolor{comment}{ *    without specific prior written permission.}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00028}00028 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00029}00029 \textcolor{comment}{ * This software is provided ``as is'', and any express or implied}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00030}00030 \textcolor{comment}{ * warranties, including, but not limited to, the implied warranties of}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00031}00031 \textcolor{comment}{ * merchantability and fitness for a particular purpose are disclaimed.}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00032}00032 \textcolor{comment}{ * In no event shall the company or contributors be liable for any}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00033}00033 \textcolor{comment}{ * direct, indirect, incidental, special, exemplary, or consequential}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00034}00034 \textcolor{comment}{ * damages (including, but not limited to, procurement of substitute}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00035}00035 \textcolor{comment}{ * goods or services; loss of use, data, or profits; or business}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00036}00036 \textcolor{comment}{ * interruption) however caused and on any theory of liability, whether}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00037}00037 \textcolor{comment}{ * in contract, strict liability, or tort (including negligence or}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00038}00038 \textcolor{comment}{ * otherwise) arising in any way out of the use of this software, even if}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00039}00039 \textcolor{comment}{ * advised of the possibility of such damage.}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00040}00040 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00041}00041 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00042}00042 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00043}00043 \textcolor{comment}{/* This file is shared between kernel and userland. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00044}00044 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00046}\mbox{\hyperlink{geom__vinum__share_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00046}} \mbox{\hyperlink{geom__vinum__share_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00047}00047 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00049}00049 \textcolor{preprocessor}{\#ifdef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00052}00052 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom_8h}{geom/geom.h}}>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00054}\mbox{\hyperlink{geom__vinum__share_8c_ac3db3b048290e3a67e5be1d2a8e221cc}{00054}} \textcolor{preprocessor}{\#define iswhite(c) (((c) == ' ') || ((c) == '\(\backslash\)t'))}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00055}00055 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <ctype.h>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <paths.h>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <stdio.h>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <stdlib.h>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <string.h>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00061}00061 \textcolor{preprocessor}{\#define iswhite isspace}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00062}00062 \textcolor{preprocessor}{\#define g\_free  free}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00063}00063 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* \_KERNEL */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00064}00064 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00065}00065 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00066}00066 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00067}00067 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00068}00068 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom__vinum__var_8h}{geom/vinum/geom\_vinum\_var.h}}>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00069}00069 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom__vinum__share_8h}{geom/vinum/geom\_vinum\_share.h}}>}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00070}00070 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00071}00071 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00072}00072 \textcolor{comment}{ * Take a blank separated list of tokens and turn it into a list of}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00073}00073 \textcolor{comment}{ * individual nul-\/delimited strings.  Build a list of pointers at}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00074}00074 \textcolor{comment}{ * token, which must have enough space for the tokens.  Return the}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00075}00075 \textcolor{comment}{ * number of tokens, or -\/1 on error (typically a missing string}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00076}00076 \textcolor{comment}{ * delimiter).}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00077}00077 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00078}00078 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00079}\mbox{\hyperlink{geom__vinum__share_8c_af0255ebddd354697d7e5f82ad3b256c5}{00079}} \mbox{\hyperlink{geom__vinum__share_8c_af0255ebddd354697d7e5f82ad3b256c5}{gv\_tokenize}}(\textcolor{keywordtype}{char} *cptr, \textcolor{keywordtype}{char} *token[], \textcolor{keywordtype}{int} maxtoken)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00080}00080 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00081}00081         \textcolor{keywordtype}{int} tokennr;    \textcolor{comment}{/* Index of this token. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00082}00082         \textcolor{keywordtype}{char} delim;     \textcolor{comment}{/* Delimiter for searching for the partner. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00083}00083 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00084}00084         \textcolor{keywordflow}{for} (tokennr = 0; tokennr < maxtoken;) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00085}00085                 \textcolor{comment}{/* Skip leading white space. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00086}00086                 \textcolor{keywordflow}{while} (\mbox{\hyperlink{geom__vinum__share_8c_ac3db3b048290e3a67e5be1d2a8e221cc}{iswhite}}(*cptr))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00087}00087                         cptr++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00089}00089                 \textcolor{comment}{/* End of line. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00090}00090                 \textcolor{keywordflow}{if} ((*cptr == \textcolor{charliteral}{'\(\backslash\)0'}) || (*cptr == \textcolor{charliteral}{'\(\backslash\)n'}) || (*cptr == \textcolor{charliteral}{'\#'}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00091}00091                         \textcolor{keywordflow}{return} tokennr;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00092}00092 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00093}00093                 delim = *cptr;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00094}00094                 token[tokennr] = cptr;          \textcolor{comment}{/* Point to it. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00095}00095                 tokennr++;                      \textcolor{comment}{/* One more. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00096}00096 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00097}00097                 \textcolor{comment}{/* Run off the end? */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00098}00098                 \textcolor{keywordflow}{if} (tokennr == maxtoken)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00099}00099                         \textcolor{keywordflow}{return} tokennr;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00100}00100 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00101}00101                 \textcolor{comment}{/* Quoted? */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00102}00102                 \textcolor{keywordflow}{if} ((delim == \textcolor{charliteral}{'\(\backslash\)''}) || (delim == \textcolor{charliteral}{'"{}'})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00103}00103                         \textcolor{keywordflow}{for} (;;) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00104}00104                                 cptr++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00105}00105 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00106}00106                                 \textcolor{comment}{/* Found the partner. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00107}00107                                 \textcolor{keywordflow}{if} ((*cptr == delim) \&\& (cptr[-\/1] != \textcolor{charliteral}{'\(\backslash\)\(\backslash\)'})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00108}00108                                         cptr++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00109}00109 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00110}00110                                         \textcolor{comment}{/* Space after closing quote needed. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00111}00111                                         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{geom__vinum__share_8c_ac3db3b048290e3a67e5be1d2a8e221cc}{iswhite}}(*cptr))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00112}00112                                                 \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00113}00113 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00114}00114                                         \textcolor{comment}{/* Delimit. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00115}00115                                         *cptr++ = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00116}00116 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00117}00117                                 \textcolor{comment}{/* End-\/of-\/line? */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00118}00118                                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((*cptr == \textcolor{charliteral}{'\(\backslash\)0'}) || (*cptr == \textcolor{charliteral}{'\(\backslash\)n'}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00119}00119                                         \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00120}00120                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00121}00121 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00122}00122                 \textcolor{comment}{/* Not quoted. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00123}00123                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00124}00124                         \textcolor{keywordflow}{while} ((*cptr != \textcolor{charliteral}{'\(\backslash\)0'}) \&\&}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00125}00125                             (!\mbox{\hyperlink{geom__vinum__share_8c_ac3db3b048290e3a67e5be1d2a8e221cc}{iswhite}}(*cptr)) \&\&}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00126}00126                             (*cptr != \textcolor{charliteral}{'\(\backslash\)n'}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00127}00127                                 cptr++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00128}00128 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00129}00129                         \textcolor{comment}{/* Not end-\/of-\/line; delimit and move to the next. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00130}00130                         \textcolor{keywordflow}{if} (*cptr != \textcolor{charliteral}{'\(\backslash\)0'})}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00131}00131                                 *cptr++ = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00132}00132                 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00133}00133         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00134}00134 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00135}00135         \textcolor{comment}{/* Can't get here. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00136}00136         \textcolor{keywordflow}{return} maxtoken;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00137}00137 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00138}00138 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00139}00139 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00140}00140 \textcolor{comment}{ * Take a number with an optional scale factor and convert it to a number of}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00141}00141 \textcolor{comment}{ * bytes.}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00142}00142 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00143}00143 \textcolor{comment}{ * The scale factors are:}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00144}00144 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00145}00145 \textcolor{comment}{ * s    sectors (of 512 bytes)}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00146}00146 \textcolor{comment}{ * b    blocks (of 512 bytes).  This unit is deprecated, because it's}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00147}00147 \textcolor{comment}{ *      confusing, but maintained to avoid confusing Veritas users.}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00148}00148 \textcolor{comment}{ * k    kilobytes (1024 bytes)}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00149}00149 \textcolor{comment}{ * m    megabytes (of 1024 * 1024 bytes)}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00150}00150 \textcolor{comment}{ * g    gigabytes (of 1024 * 1024 * 1024 bytes)}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00151}00151 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00152}00152 \textcolor{comment}{ * XXX: need a way to signal error}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00153}00153 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00154}00154 off\_t}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00155}\mbox{\hyperlink{geom__vinum__share_8c_ac935ffcb9ad246a8bf96c287ec42523d}{00155}} \mbox{\hyperlink{geom__vinum__share_8c_ac935ffcb9ad246a8bf96c287ec42523d}{gv\_sizespec}}(\textcolor{keywordtype}{char} *spec)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00156}00156 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00157}00157         uint64\_t size;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00158}00158         \textcolor{keywordtype}{char} *s;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00159}00159         \textcolor{keywordtype}{int} sign;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00160}00160 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00161}00161         size = 0;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00162}00162         sign = 1;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00163}00163         \textcolor{keywordflow}{if} (spec != NULL) \{             \textcolor{comment}{/* we have a parameter */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00164}00164                 s = spec;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00165}00165                 \textcolor{keywordflow}{if} (*s == \textcolor{charliteral}{'-\/'}) \{        \textcolor{comment}{/* negative, */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00166}00166                         sign = -\/1;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00167}00167                         s++;            \textcolor{comment}{/* skip */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00168}00168                 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00169}00169 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00170}00170                 \textcolor{comment}{/* It's numeric. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00171}00171                 \textcolor{keywordflow}{if} ((*s >= \textcolor{charliteral}{'0'}) \&\& (*s <= \textcolor{charliteral}{'9'})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00172}00172                         \textcolor{comment}{/* It's numeric. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00173}00173                         \textcolor{keywordflow}{while} ((*s >= \textcolor{charliteral}{'0'}) \&\& (*s <= \textcolor{charliteral}{'9'}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00174}00174                                 \textcolor{comment}{/* Convert it. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00175}00175                                 size = size * 10 + *s++ -\/ \textcolor{charliteral}{'0'};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00176}00176 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00177}00177                         \textcolor{keywordflow}{switch} (*s) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00178}00178                         \textcolor{keywordflow}{case} \textcolor{charliteral}{'\(\backslash\)0'}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00179}00179                                 \textcolor{keywordflow}{return} size * sign;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00180}00180                         }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00181}00181                         \textcolor{keywordflow}{case} \textcolor{charliteral}{'B'}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00182}00182                         \textcolor{keywordflow}{case} \textcolor{charliteral}{'b'}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00183}00183                         \textcolor{keywordflow}{case} \textcolor{charliteral}{'S'}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00184}00184                         \textcolor{keywordflow}{case} \textcolor{charliteral}{'s'}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00185}00185                                 \textcolor{keywordflow}{return} size * sign * 512;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00186}00186                         }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00187}00187                         \textcolor{keywordflow}{case} \textcolor{charliteral}{'K'}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00188}00188                         \textcolor{keywordflow}{case} \textcolor{charliteral}{'k'}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00189}00189                                 \textcolor{keywordflow}{return} size * sign * 1024;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00190}00190                         }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00191}00191                         \textcolor{keywordflow}{case} \textcolor{charliteral}{'M'}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00192}00192                         \textcolor{keywordflow}{case} \textcolor{charliteral}{'m'}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00193}00193                                 \textcolor{keywordflow}{return} size * sign * 1024 * 1024;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00194}00194                         }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00195}00195                         \textcolor{keywordflow}{case} \textcolor{charliteral}{'G'}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00196}00196                         \textcolor{keywordflow}{case} \textcolor{charliteral}{'g'}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00197}00197                                 \textcolor{keywordflow}{return} size * sign * 1024 * 1024 * 1024;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00198}00198                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00199}00199                 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00200}00200         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00201}00201 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00202}00202         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00203}00203 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00204}00204 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00205}00205 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00206}\mbox{\hyperlink{geom__vinum__share_8c_a87a39c3d19b3f7fc3e2fce1bf5a764f2}{00206}} \mbox{\hyperlink{geom__vinum__share_8c_a87a39c3d19b3f7fc3e2fce1bf5a764f2}{gv\_drivestate}}(\textcolor{keywordtype}{int} state)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00207}00207 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00208}00208         \textcolor{keywordflow}{switch} (state) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00209}00209         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_ab7ae7c257cd1b6a3ef82c1e963713b2b}{GV\_DRIVE\_DOWN}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00210}00210                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}down"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00211}00211         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a8a76c535d700d8c84cb573b43fd010f7}{GV\_DRIVE\_UP}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00212}00212                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}up"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00213}00213         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00214}00214                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}??"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00215}00215         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00216}00216 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00217}00217 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00218}00218 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00219}\mbox{\hyperlink{geom__vinum__share_8c_ab8fcdce7a131f2c54c7db6f2c134c570}{00219}} \mbox{\hyperlink{geom__vinum__share_8c_ab8fcdce7a131f2c54c7db6f2c134c570}{gv\_drivestatei}}(\textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}})}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00220}00220 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00221}00221         \textcolor{keywordflow}{if} (!strcmp(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{stringliteral}{"{}up"{}}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00222}00222                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_a8a76c535d700d8c84cb573b43fd010f7}{GV\_DRIVE\_UP}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00223}00223         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00224}00224                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_ab7ae7c257cd1b6a3ef82c1e963713b2b}{GV\_DRIVE\_DOWN}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00225}00225 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00227}00227 \textcolor{comment}{/* Translate from a string to a subdisk state. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00228}00228 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00229}\mbox{\hyperlink{geom__vinum__share_8c_a829b9547a226dd993f3971571d5644a5}{00229}} \mbox{\hyperlink{geom__vinum__share_8c_a829b9547a226dd993f3971571d5644a5}{gv\_sdstatei}}(\textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}})}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00230}00230 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00231}00231         \textcolor{keywordflow}{if} (!strcmp(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{stringliteral}{"{}up"{}}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00232}00232                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_a85ea8962028c1319a7fd5cd7adc4e497}{GV\_SD\_UP}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00233}00233         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{stringliteral}{"{}reviving"{}}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00234}00234                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_a7fe4bfdd815ab9446e630efe806619d1}{GV\_SD\_REVIVING}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00235}00235         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{stringliteral}{"{}initializing"{}}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00236}00236                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_abb3257448e42ad06d3218e02cc26c8ba}{GV\_SD\_INITIALIZING}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00237}00237         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{stringliteral}{"{}stale"{}}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00238}00238                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_a5dd4abf3a748b1a4ee0da0bab79840d2}{GV\_SD\_STALE}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00239}00239         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00240}00240                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_a397e4bbebbaca115ef30ebb13a9d18bf}{GV\_SD\_DOWN}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00241}00241 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00242}00242 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00243}00243 \textcolor{comment}{/* Translate from a subdisk state to a string. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00244}00244 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00245}\mbox{\hyperlink{geom__vinum__share_8c_a3d13d2bb3d32f3fe52928022b2d5c602}{00245}} \mbox{\hyperlink{geom__vinum__share_8c_a3d13d2bb3d32f3fe52928022b2d5c602}{gv\_sdstate}}(\textcolor{keywordtype}{int} state)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00246}00246 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00247}00247         \textcolor{keywordflow}{switch} (state) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00248}00248         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_abb3257448e42ad06d3218e02cc26c8ba}{GV\_SD\_INITIALIZING}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00249}00249                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}initializing"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00250}00250         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a5dd4abf3a748b1a4ee0da0bab79840d2}{GV\_SD\_STALE}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00251}00251                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}stale"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00252}00252         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a397e4bbebbaca115ef30ebb13a9d18bf}{GV\_SD\_DOWN}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00253}00253                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}down"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00254}00254         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a7fe4bfdd815ab9446e630efe806619d1}{GV\_SD\_REVIVING}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00255}00255                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}reviving"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00256}00256         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a85ea8962028c1319a7fd5cd7adc4e497}{GV\_SD\_UP}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00257}00257                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}up"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00258}00258         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00259}00259                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}??"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00260}00260         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00261}00261 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00262}00262 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00263}00263 \textcolor{comment}{/* Translate from a string to a plex state. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00264}00264 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00265}\mbox{\hyperlink{geom__vinum__share_8c_a7d84b92f2d1185bd816798565423f734}{00265}} \mbox{\hyperlink{geom__vinum__share_8c_a7d84b92f2d1185bd816798565423f734}{gv\_plexstatei}}(\textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}})}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00266}00266 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00267}00267         \textcolor{keywordflow}{if} (!strcmp(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{stringliteral}{"{}up"{}}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00268}00268                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_a2a5ed58267acc541957b387d71bd868d}{GV\_PLEX\_UP}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00269}00269         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{stringliteral}{"{}initializing"{}}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00270}00270                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_a3df68513d03b6c6b7cadc15b872691fb}{GV\_PLEX\_INITIALIZING}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00271}00271         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{stringliteral}{"{}degraded"{}}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00272}00272                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_a80774ac8b615985dacf9f245fe370d7c}{GV\_PLEX\_DEGRADED}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00273}00273         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{stringliteral}{"{}growable"{}}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00274}00274                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_a768ff0748cb47b0fa77b1381d770e6e9}{GV\_PLEX\_GROWABLE}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00275}00275         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00276}00276                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_a9eebfaad55e358e87acc6a9bacc163b7}{GV\_PLEX\_DOWN}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00277}00277 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00278}00278 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00279}00279 \textcolor{comment}{/* Translate from a plex state to a string. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00280}00280 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00281}\mbox{\hyperlink{geom__vinum__share_8c_a8bae1daaa46161fa23672f2b220b30a8}{00281}} \mbox{\hyperlink{geom__vinum__share_8c_a8bae1daaa46161fa23672f2b220b30a8}{gv\_plexstate}}(\textcolor{keywordtype}{int} state)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00282}00282 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00283}00283         \textcolor{keywordflow}{switch} (state) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00284}00284         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a9eebfaad55e358e87acc6a9bacc163b7}{GV\_PLEX\_DOWN}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00285}00285                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}down"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00286}00286         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a3df68513d03b6c6b7cadc15b872691fb}{GV\_PLEX\_INITIALIZING}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00287}00287                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}initializing"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00288}00288         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a80774ac8b615985dacf9f245fe370d7c}{GV\_PLEX\_DEGRADED}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00289}00289                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}degraded"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00290}00290         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a768ff0748cb47b0fa77b1381d770e6e9}{GV\_PLEX\_GROWABLE}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00291}00291                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}growable"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00292}00292         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a2a5ed58267acc541957b387d71bd868d}{GV\_PLEX\_UP}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00293}00293                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}up"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00294}00294         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00295}00295                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}??"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00296}00296         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00297}00297 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00298}00298 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00299}00299 \textcolor{comment}{/* Translate from a string to a plex organization. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00300}00300 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00301}\mbox{\hyperlink{geom__vinum__share_8c_ae860b6e804f21230ca3f67d4b9fc0d6c}{00301}} \mbox{\hyperlink{geom__vinum__share_8c_ae860b6e804f21230ca3f67d4b9fc0d6c}{gv\_plexorgi}}(\textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}})}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00302}00302 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00303}00303         \textcolor{keywordflow}{if} (!strcmp(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{stringliteral}{"{}concat"{}}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00304}00304                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_a49fa4ea4e60154b1e54c70eb1f53cf19}{GV\_PLEX\_CONCAT}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00305}00305         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{stringliteral}{"{}striped"{}}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00306}00306                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_a02ae949789d43dde7a6e5540aab97beb}{GV\_PLEX\_STRIPED}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00307}00307         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{stringliteral}{"{}raid5"{}}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00308}00308                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_a77d0838869414279112148a8b1efee50}{GV\_PLEX\_RAID5}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00309}00309         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00310}00310                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_a2799ce5ed6851c4411a94e3dfbdaeb80}{GV\_PLEX\_DISORG}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00311}00311 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00312}00312 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00313}00313 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00314}\mbox{\hyperlink{geom__vinum__share_8c_a3d33c201d385d451cb4e613b28b5dfd4}{00314}} \mbox{\hyperlink{geom__vinum__share_8c_a3d33c201d385d451cb4e613b28b5dfd4}{gv\_volstatei}}(\textcolor{keywordtype}{char} *\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}})}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00315}00315 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00316}00316         \textcolor{keywordflow}{if} (!strcmp(\mbox{\hyperlink{g__part__if_8m_ac14417684334d01b4e1e807a19d92816}{buf}}, \textcolor{stringliteral}{"{}up"{}}))}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00317}00317                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_a8844be9458f8ec729320775c16ccc542}{GV\_VOL\_UP}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00318}00318         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00319}00319                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{geom__vinum__var_8h_af08dd2b0a2b9c2b5f74eaf5927a99c5c}{GV\_VOL\_DOWN}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00320}00320 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00321}00321 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00322}00322 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00323}\mbox{\hyperlink{geom__vinum__share_8c_a6f26fc1855ffc33ef0cb67d45d947de5}{00323}} \mbox{\hyperlink{geom__vinum__share_8c_a6f26fc1855ffc33ef0cb67d45d947de5}{gv\_volstate}}(\textcolor{keywordtype}{int} state)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00324}00324 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00325}00325         \textcolor{keywordflow}{switch} (state) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00326}00326         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a8844be9458f8ec729320775c16ccc542}{GV\_VOL\_UP}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00327}00327                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}up"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00328}00328         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_af08dd2b0a2b9c2b5f74eaf5927a99c5c}{GV\_VOL\_DOWN}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00329}00329                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}down"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00330}00330         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00331}00331                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}??"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00332}00332         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00333}00333 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00334}00334 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00335}00335 \textcolor{comment}{/* Translate from a plex organization to a string. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00336}00336 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00337}\mbox{\hyperlink{geom__vinum__share_8c_a67e48e2ae7c16f39789c555512d511ef}{00337}} \mbox{\hyperlink{geom__vinum__share_8c_a67e48e2ae7c16f39789c555512d511ef}{gv\_plexorg}}(\textcolor{keywordtype}{int} org)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00338}00338 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00339}00339         \textcolor{keywordflow}{switch} (org) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00340}00340         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a2799ce5ed6851c4411a94e3dfbdaeb80}{GV\_PLEX\_DISORG}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00341}00341                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}??"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00342}00342         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a49fa4ea4e60154b1e54c70eb1f53cf19}{GV\_PLEX\_CONCAT}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00343}00343                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}concat"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00344}00344         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a02ae949789d43dde7a6e5540aab97beb}{GV\_PLEX\_STRIPED}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00345}00345                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}striped"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00346}00346         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a77d0838869414279112148a8b1efee50}{GV\_PLEX\_RAID5}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00347}00347                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}raid5"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00348}00348         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00349}00349                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}??"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00350}00350         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00351}00351 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00352}00352 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00353}00353 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00354}\mbox{\hyperlink{geom__vinum__share_8c_a1e18a7331a16634c3246e5342fcc4ed3}{00354}} \mbox{\hyperlink{geom__vinum__share_8c_a1e18a7331a16634c3246e5342fcc4ed3}{gv\_plexorg\_short}}(\textcolor{keywordtype}{int} org)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00355}00355 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00356}00356         \textcolor{keywordflow}{switch} (org) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00357}00357         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a2799ce5ed6851c4411a94e3dfbdaeb80}{GV\_PLEX\_DISORG}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00358}00358                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}??"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00359}00359         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a49fa4ea4e60154b1e54c70eb1f53cf19}{GV\_PLEX\_CONCAT}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00360}00360                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}C"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00361}00361         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a02ae949789d43dde7a6e5540aab97beb}{GV\_PLEX\_STRIPED}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00362}00362                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}S"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00363}00363         \textcolor{keywordflow}{case} \mbox{\hyperlink{geom__vinum__var_8h_a77d0838869414279112148a8b1efee50}{GV\_PLEX\_RAID5}}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00364}00364                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}R5"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00365}00365         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00366}00366                 \textcolor{keywordflow}{return} \textcolor{stringliteral}{"{}??"{}};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00367}00367         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00368}00368 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00369}00369 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00370}00370 \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__sd}{gv\_sd}} *}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00371}\mbox{\hyperlink{geom__vinum__share_8c_a56add53510a739e03c1cf042a1987b61}{00371}} \mbox{\hyperlink{geom__vinum__share_8c_a56add53510a739e03c1cf042a1987b61}{gv\_alloc\_sd}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00372}00372 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00373}00373         \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__sd}{gv\_sd}} *s;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00374}00374 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00375}00375 \textcolor{preprocessor}{\#ifdef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00376}00376         s = \mbox{\hyperlink{geom_8h_a0f190247baa73dc863a79fea9d5f6b4f}{g\_malloc}}(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgv__sd}{gv\_sd}}), M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00377}00377 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00378}00378         s = malloc(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgv__sd}{gv\_sd}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00379}00379 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00380}00380         \textcolor{keywordflow}{if} (s == NULL)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00381}00381                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00382}00382         bzero(s, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgv__sd}{gv\_sd}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00383}00383         s-\/>\mbox{\hyperlink{structgv__sd_aec325f89682a834bf445a955dd6b8dac}{plex\_offset}} = -\/1;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00384}00384         s-\/>\mbox{\hyperlink{structgv__sd_a7caba67088081bb1e3ede489c8b0dbbc}{size}} = -\/1;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00385}00385         s-\/>\mbox{\hyperlink{structgv__sd_a7affffaf0220e9c53c090bb6f41fb2b4}{drive\_offset}} = -\/1;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00386}00386         \textcolor{keywordflow}{return} (s);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00387}00387 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00388}00388 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00389}00389 \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__drive}{gv\_drive}} *}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00390}\mbox{\hyperlink{geom__vinum__share_8c_abbc3b1ca36b87756010b92bf79b2c4f2}{00390}} \mbox{\hyperlink{geom__vinum__share_8c_abbc3b1ca36b87756010b92bf79b2c4f2}{gv\_alloc\_drive}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00391}00391 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00392}00392         \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__drive}{gv\_drive}} *d;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00393}00393 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00394}00394 \textcolor{preprocessor}{\#ifdef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00395}00395         d = \mbox{\hyperlink{geom_8h_a0f190247baa73dc863a79fea9d5f6b4f}{g\_malloc}}(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgv__drive}{gv\_drive}}), M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00396}00396 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00397}00397         d = malloc(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgv__drive}{gv\_drive}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00398}00398 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00399}00399         \textcolor{keywordflow}{if} (d == NULL)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00400}00400                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00401}00401         bzero(d, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgv__drive}{gv\_drive}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00402}00402         \textcolor{keywordflow}{return} (d);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00403}00403 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00404}00404 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00405}00405 \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__volume}{gv\_volume}} *}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00406}\mbox{\hyperlink{geom__vinum__share_8c_a793c3052fadb49c1b9d1d18854adeb6f}{00406}} \mbox{\hyperlink{geom__vinum__share_8c_a793c3052fadb49c1b9d1d18854adeb6f}{gv\_alloc\_volume}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00407}00407 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00408}00408         \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__volume}{gv\_volume}} *v;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00409}00409 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00410}00410 \textcolor{preprocessor}{\#ifdef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00411}00411         v = \mbox{\hyperlink{geom_8h_a0f190247baa73dc863a79fea9d5f6b4f}{g\_malloc}}(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgv__volume}{gv\_volume}}), M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00412}00412 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00413}00413         v = malloc(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgv__volume}{gv\_volume}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00414}00414 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00415}00415         \textcolor{keywordflow}{if} (v == NULL)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00416}00416                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00417}00417         bzero(v, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgv__volume}{gv\_volume}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00418}00418         \textcolor{keywordflow}{return} (v);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00419}00419 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00420}00420 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00421}00421 \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__plex}{gv\_plex}} *}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00422}\mbox{\hyperlink{geom__vinum__share_8c_a5553092e672524f8cc796ba0e9aa86db}{00422}} \mbox{\hyperlink{geom__vinum__share_8c_a5553092e672524f8cc796ba0e9aa86db}{gv\_alloc\_plex}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00423}00423 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00424}00424         \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__plex}{gv\_plex}} *p;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00425}00425 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00426}00426 \textcolor{preprocessor}{\#ifdef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00427}00427         p = \mbox{\hyperlink{geom_8h_a0f190247baa73dc863a79fea9d5f6b4f}{g\_malloc}}(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgv__plex}{gv\_plex}}), M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00428}00428 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00429}00429         p = malloc(\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgv__plex}{gv\_plex}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00430}00430 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00431}00431         \textcolor{keywordflow}{if} (p == NULL)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00432}00432                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00433}00433         bzero(p, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} \mbox{\hyperlink{structgv__plex}{gv\_plex}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00434}00434         \textcolor{keywordflow}{return} (p);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00435}00435 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00436}00436 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00437}00437 \textcolor{comment}{/* Get a new drive object. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00438}00438 \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__drive}{gv\_drive}} *}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00439}\mbox{\hyperlink{geom__vinum__share_8c_a2c8a637389ad0856fe25599f2d62c93c}{00439}} \mbox{\hyperlink{geom__vinum__share_8c_a2c8a637389ad0856fe25599f2d62c93c}{gv\_new\_drive}}(\textcolor{keywordtype}{int} max, \textcolor{keywordtype}{char} *token[])}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00440}00440 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00441}00441         \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__drive}{gv\_drive}} *d;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00442}00442         \textcolor{keywordtype}{int} j, errors;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00443}00443         \textcolor{keywordtype}{char} *ptr;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00444}00444 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00445}00445         \textcolor{keywordflow}{if} (token[1] == NULL || *token[1] == \textcolor{charliteral}{'\(\backslash\)0'})}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00446}00446                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00447}00447         d = \mbox{\hyperlink{geom__vinum__share_8c_abbc3b1ca36b87756010b92bf79b2c4f2}{gv\_alloc\_drive}}();}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00448}00448         \textcolor{keywordflow}{if} (d == NULL)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00449}00449                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00450}00450         errors = 0;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00451}00451         \textcolor{keywordflow}{for} (j = 1; j < max; j++) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00452}00452                 \textcolor{keywordflow}{if} (!strcmp(token[j], \textcolor{stringliteral}{"{}state"{}})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00453}00453                         j++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00454}00454                         \textcolor{keywordflow}{if} (j >= max) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00455}00455                                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00456}00456                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00457}00457                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00458}00458                         d-\/>\mbox{\hyperlink{structgv__drive_af2b798d0717a723c580025dc04416ce7}{state}} = \mbox{\hyperlink{geom__vinum__share_8c_ab8fcdce7a131f2c54c7db6f2c134c570}{gv\_drivestatei}}(token[j]);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00459}00459                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(token[j], \textcolor{stringliteral}{"{}device"{}})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00460}00460                         j++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00461}00461                         \textcolor{keywordflow}{if} (j >= max) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00462}00462                                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00463}00463                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00464}00464                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00465}00465                         ptr = token[j];}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00466}00466 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00467}00467                         \textcolor{keywordflow}{if} (strncmp(ptr, \mbox{\hyperlink{geom_8h_a9e429780e6e3bb32284b54630bc60a0d}{\_PATH\_DEV}}, 5) == 0)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00468}00468                                 ptr += 5;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00469}00469                         strlcpy(d-\/>\mbox{\hyperlink{structgv__drive_a940421a9537b8ce86596e18365122ae6}{device}}, ptr, \textcolor{keyword}{sizeof}(d-\/>\mbox{\hyperlink{structgv__drive_a940421a9537b8ce86596e18365122ae6}{device}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00470}00470                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00471}00471                         \textcolor{comment}{/* We assume this is the drive name. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00472}00472                         strlcpy(d-\/>\mbox{\hyperlink{structgv__drive_a69e5c72365075804074d21c056111ebf}{name}}, token[j], \textcolor{keyword}{sizeof}(d-\/>\mbox{\hyperlink{structgv__drive_a69e5c72365075804074d21c056111ebf}{name}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00473}00473                 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00474}00474         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00475}00475 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00476}00476         \textcolor{keywordflow}{if} (strlen(d-\/>\mbox{\hyperlink{structgv__drive_a69e5c72365075804074d21c056111ebf}{name}}) == 0 || strlen(d-\/>\mbox{\hyperlink{structgv__drive_a940421a9537b8ce86596e18365122ae6}{device}}) == 0)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00477}00477                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00478}00478 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00479}00479         \textcolor{keywordflow}{if} (errors) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00480}00480                 \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(d);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00481}00481                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00482}00482         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00483}00483 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00484}00484         \textcolor{keywordflow}{return} (d);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00485}00485 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00486}00486 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00487}00487 \textcolor{comment}{/* Get a new volume object. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00488}00488 \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__volume}{gv\_volume}} *}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00489}\mbox{\hyperlink{geom__vinum__share_8c_ae67bd5de86889be4abcefe32cc4ef5b9}{00489}} \mbox{\hyperlink{geom__vinum__share_8c_ae67bd5de86889be4abcefe32cc4ef5b9}{gv\_new\_volume}}(\textcolor{keywordtype}{int} max, \textcolor{keywordtype}{char} *token[])}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00490}00490 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00491}00491         \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__volume}{gv\_volume}} *v;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00492}00492         \textcolor{keywordtype}{int} j, errors;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00493}00493 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00494}00494         \textcolor{keywordflow}{if} (token[1] == NULL || *token[1] == \textcolor{charliteral}{'\(\backslash\)0'})}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00495}00495                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00496}00496 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00497}00497         v = \mbox{\hyperlink{geom__vinum__share_8c_a793c3052fadb49c1b9d1d18854adeb6f}{gv\_alloc\_volume}}();}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00498}00498         \textcolor{keywordflow}{if} (v == NULL)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00499}00499                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00500}00500 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00501}00501         errors = 0;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00502}00502         \textcolor{keywordflow}{for} (j = 1; j < max; j++) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00503}00503                 \textcolor{keywordflow}{if} (!strcmp(token[j], \textcolor{stringliteral}{"{}state"{}})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00504}00504                         j++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00505}00505                         \textcolor{keywordflow}{if} (j >= max) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00506}00506                                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00507}00507                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00508}00508                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00509}00509                         v-\/>\mbox{\hyperlink{structgv__volume_a54dd71f304a3aefc237c7cef1dac9777}{state}} = \mbox{\hyperlink{geom__vinum__share_8c_a3d33c201d385d451cb4e613b28b5dfd4}{gv\_volstatei}}(token[j]);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00510}00510                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00511}00511                         \textcolor{comment}{/* We assume this is the volume name. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00512}00512                         strlcpy(v-\/>\mbox{\hyperlink{structgv__volume_a3369e150403037bca7ed34ea68f25ce0}{name}}, token[j], \textcolor{keyword}{sizeof}(v-\/>\mbox{\hyperlink{structgv__volume_a3369e150403037bca7ed34ea68f25ce0}{name}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00513}00513                 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00514}00514         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00515}00515 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00516}00516         \textcolor{keywordflow}{if} (strlen(v-\/>\mbox{\hyperlink{structgv__volume_a3369e150403037bca7ed34ea68f25ce0}{name}}) == 0)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00517}00517                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00518}00518 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00519}00519         \textcolor{keywordflow}{if} (errors) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00520}00520                 \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(v);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00521}00521                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00522}00522         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00523}00523 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00524}00524         \textcolor{keywordflow}{return} (v);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00525}00525 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00526}00526 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00527}00527 \textcolor{comment}{/* Get a new plex object. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00528}00528 \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__plex}{gv\_plex}} *}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00529}\mbox{\hyperlink{geom__vinum__share_8c_addb05ff8eac29330e41e01a5345fbe55}{00529}} \mbox{\hyperlink{geom__vinum__share_8c_addb05ff8eac29330e41e01a5345fbe55}{gv\_new\_plex}}(\textcolor{keywordtype}{int} max, \textcolor{keywordtype}{char} *token[])}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00530}00530 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00531}00531         \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__plex}{gv\_plex}} *p;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00532}00532         \textcolor{keywordtype}{int} j, errors;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00533}00533 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00534}00534         \textcolor{keywordflow}{if} (token[1] == NULL || *token[1] == \textcolor{charliteral}{'\(\backslash\)0'})}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00535}00535                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00536}00536 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00537}00537         p = \mbox{\hyperlink{geom__vinum__share_8c_a5553092e672524f8cc796ba0e9aa86db}{gv\_alloc\_plex}}();}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00538}00538         \textcolor{keywordflow}{if} (p == NULL)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00539}00539                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00540}00540 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00541}00541         errors = 0;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00542}00542         \textcolor{keywordflow}{for} (j = 1; j < max; j++) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00543}00543                 \textcolor{keywordflow}{if} (!strcmp(token[j], \textcolor{stringliteral}{"{}name"{}})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00544}00544                         j++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00545}00545                         \textcolor{keywordflow}{if} (j >= max) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00546}00546                                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00547}00547                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00548}00548                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00549}00549                         strlcpy(p-\/>\mbox{\hyperlink{structgv__plex_a0978e4d5dd271f5403af3cf98ae02103}{name}}, token[j], \textcolor{keyword}{sizeof}(p-\/>\mbox{\hyperlink{structgv__plex_a0978e4d5dd271f5403af3cf98ae02103}{name}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00550}00550                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(token[j], \textcolor{stringliteral}{"{}org"{}})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00551}00551                         j++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00552}00552                         \textcolor{keywordflow}{if} (j >= max) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00553}00553                                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00554}00554                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00555}00555                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00556}00556                         p-\/>\mbox{\hyperlink{structgv__plex_ac35ac16eab74d053052bdb850ff7efbd}{org}} = \mbox{\hyperlink{geom__vinum__share_8c_ae860b6e804f21230ca3f67d4b9fc0d6c}{gv\_plexorgi}}(token[j]);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00557}00557                         \textcolor{keywordflow}{if} ((p-\/>\mbox{\hyperlink{structgv__plex_ac35ac16eab74d053052bdb850ff7efbd}{org}} == \mbox{\hyperlink{geom__vinum__var_8h_a77d0838869414279112148a8b1efee50}{GV\_PLEX\_RAID5}}) ||}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00558}00558                             (p-\/>\mbox{\hyperlink{structgv__plex_ac35ac16eab74d053052bdb850ff7efbd}{org}} == \mbox{\hyperlink{geom__vinum__var_8h_a02ae949789d43dde7a6e5540aab97beb}{GV\_PLEX\_STRIPED}})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00559}00559                                 j++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00560}00560                                 \textcolor{keywordflow}{if} (j >= max) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00561}00561                                         errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00562}00562                                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00563}00563                                 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00564}00564                                 p-\/>\mbox{\hyperlink{structgv__plex_a670e4abf06a7ee6c9737aeffd3e1e15e}{stripesize}} = \mbox{\hyperlink{geom__vinum__share_8c_ac935ffcb9ad246a8bf96c287ec42523d}{gv\_sizespec}}(token[j]);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00565}00565                                 \textcolor{keywordflow}{if} (p-\/>\mbox{\hyperlink{structgv__plex_a670e4abf06a7ee6c9737aeffd3e1e15e}{stripesize}} == 0) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00566}00566                                         errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00567}00567                                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00568}00568                                 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00569}00569                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00570}00570                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(token[j], \textcolor{stringliteral}{"{}state"{}})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00571}00571                         j++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00572}00572                         \textcolor{keywordflow}{if} (j >= max) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00573}00573                                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00574}00574                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00575}00575                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00576}00576                         p-\/>\mbox{\hyperlink{structgv__plex_a323004a8a80cc2691e845ba155ad55f0}{state}} = \mbox{\hyperlink{geom__vinum__share_8c_a7d84b92f2d1185bd816798565423f734}{gv\_plexstatei}}(token[j]);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00577}00577                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(token[j], \textcolor{stringliteral}{"{}vol"{}}) ||}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00578}00578                             !strcmp(token[j], \textcolor{stringliteral}{"{}volume"{}})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00579}00579                         j++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00580}00580                         \textcolor{keywordflow}{if} (j >= max) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00581}00581                                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00582}00582                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00583}00583                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00584}00584                         strlcpy(p-\/>\mbox{\hyperlink{structgv__plex_a3dba998991302b326667692db3ab2ac5}{volume}}, token[j], \textcolor{keyword}{sizeof}(p-\/>\mbox{\hyperlink{structgv__plex_a3dba998991302b326667692db3ab2ac5}{volume}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00585}00585                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00586}00586                         errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00587}00587                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00588}00588                 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00589}00589         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00590}00590 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00591}00591         \textcolor{keywordflow}{if} (errors) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00592}00592                 \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(p);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00593}00593                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00594}00594         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00595}00595 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00596}00596         \textcolor{keywordflow}{return} (p);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00597}00597 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00598}00598 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00599}00599 \textcolor{comment}{/* Get a new subdisk object. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00600}00600 \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__sd}{gv\_sd}} *}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00601}\mbox{\hyperlink{geom__vinum__share_8c_a7517b87d56c22c17cabd434b0b4bcb27}{00601}} \mbox{\hyperlink{geom__vinum__share_8c_a7517b87d56c22c17cabd434b0b4bcb27}{gv\_new\_sd}}(\textcolor{keywordtype}{int} max, \textcolor{keywordtype}{char} *token[])}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00602}00602 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00603}00603         \textcolor{keyword}{struct }\mbox{\hyperlink{structgv__sd}{gv\_sd}} *s;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00604}00604         \textcolor{keywordtype}{int} j, errors;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00605}00605 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00606}00606         \textcolor{keywordflow}{if} (token[1] == NULL || *token[1] == \textcolor{charliteral}{'\(\backslash\)0'})}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00607}00607                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00608}00608 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00609}00609         s = \mbox{\hyperlink{geom__vinum__share_8c_a56add53510a739e03c1cf042a1987b61}{gv\_alloc\_sd}}();}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00610}00610         \textcolor{keywordflow}{if} (s == NULL)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00611}00611                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00612}00612 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00613}00613         errors = 0;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00614}00614         \textcolor{keywordflow}{for} (j = 1; j < max; j++) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00615}00615                 \textcolor{keywordflow}{if} (!strcmp(token[j], \textcolor{stringliteral}{"{}name"{}})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00616}00616                         j++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00617}00617                         \textcolor{keywordflow}{if} (j >= max) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00618}00618                                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00619}00619                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00620}00620                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00621}00621                         strlcpy(s-\/>\mbox{\hyperlink{structgv__sd_a835bdd1e1c9adf03425b91c873eebf1e}{name}}, token[j], \textcolor{keyword}{sizeof}(s-\/>\mbox{\hyperlink{structgv__sd_a835bdd1e1c9adf03425b91c873eebf1e}{name}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00622}00622                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(token[j], \textcolor{stringliteral}{"{}drive"{}})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00623}00623                         j++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00624}00624                         \textcolor{keywordflow}{if} (j >= max) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00625}00625                                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00626}00626                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00627}00627                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00628}00628                         strlcpy(s-\/>\mbox{\hyperlink{structgv__sd_abb67fc2a84afb2c110794b6de19d55d6}{drive}}, token[j], \textcolor{keyword}{sizeof}(s-\/>\mbox{\hyperlink{structgv__sd_abb67fc2a84afb2c110794b6de19d55d6}{drive}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00629}00629                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(token[j], \textcolor{stringliteral}{"{}plex"{}})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00630}00630                         j++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00631}00631                         \textcolor{keywordflow}{if} (j >= max) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00632}00632                                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00633}00633                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00634}00634                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00635}00635                         strlcpy(s-\/>\mbox{\hyperlink{structgv__sd_abc2c739f0fbd33ce2480d93752375f22}{plex}}, token[j], \textcolor{keyword}{sizeof}(s-\/>\mbox{\hyperlink{structgv__sd_abc2c739f0fbd33ce2480d93752375f22}{plex}}));}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00636}00636                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(token[j], \textcolor{stringliteral}{"{}state"{}})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00637}00637                         j++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00638}00638                         \textcolor{keywordflow}{if} (j >= max) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00639}00639                                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00640}00640                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00641}00641                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00642}00642                         s-\/>\mbox{\hyperlink{structgv__sd_ae69fbd03ecc14fbc16b0d4ed0421b59d}{state}} = \mbox{\hyperlink{geom__vinum__share_8c_a829b9547a226dd993f3971571d5644a5}{gv\_sdstatei}}(token[j]);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00643}00643                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(token[j], \textcolor{stringliteral}{"{}len"{}}) ||}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00644}00644                     !strcmp(token[j], \textcolor{stringliteral}{"{}length"{}})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00645}00645                         j++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00646}00646                         \textcolor{keywordflow}{if} (j >= max) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00647}00647                                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00648}00648                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00649}00649                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00650}00650                         s-\/>\mbox{\hyperlink{structgv__sd_a7caba67088081bb1e3ede489c8b0dbbc}{size}} = \mbox{\hyperlink{geom__vinum__share_8c_ac935ffcb9ad246a8bf96c287ec42523d}{gv\_sizespec}}(token[j]);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00651}00651                         \textcolor{keywordflow}{if} (s-\/>\mbox{\hyperlink{structgv__sd_a7caba67088081bb1e3ede489c8b0dbbc}{size}} <= 0)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00652}00652                                 s-\/>\mbox{\hyperlink{structgv__sd_a7caba67088081bb1e3ede489c8b0dbbc}{size}} = -\/1;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00653}00653                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(token[j], \textcolor{stringliteral}{"{}driveoffset"{}})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00654}00654                         j++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00655}00655                         \textcolor{keywordflow}{if} (j >= max) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00656}00656                                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00657}00657                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00658}00658                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00659}00659                         s-\/>\mbox{\hyperlink{structgv__sd_a7affffaf0220e9c53c090bb6f41fb2b4}{drive\_offset}} = \mbox{\hyperlink{geom__vinum__share_8c_ac935ffcb9ad246a8bf96c287ec42523d}{gv\_sizespec}}(token[j]);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00660}00660                         \textcolor{keywordflow}{if} (s-\/>\mbox{\hyperlink{structgv__sd_a7affffaf0220e9c53c090bb6f41fb2b4}{drive\_offset}} != 0 \&\&}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00661}00661                             s-\/>\mbox{\hyperlink{structgv__sd_a7affffaf0220e9c53c090bb6f41fb2b4}{drive\_offset}} < \mbox{\hyperlink{geom__vinum__var_8h_a41a10b380adbacc1eebe7ed20a3cfdad}{GV\_DATA\_START}}) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00662}00662                                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00663}00663                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00664}00664                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00665}00665                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (!strcmp(token[j], \textcolor{stringliteral}{"{}plexoffset"{}})) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00666}00666                         j++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00667}00667                         \textcolor{keywordflow}{if} (j >= max) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00668}00668                                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00669}00669                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00670}00670                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00671}00671                         s-\/>\mbox{\hyperlink{structgv__sd_aec325f89682a834bf445a955dd6b8dac}{plex\_offset}} = \mbox{\hyperlink{geom__vinum__share_8c_ac935ffcb9ad246a8bf96c287ec42523d}{gv\_sizespec}}(token[j]);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00672}00672                         \textcolor{keywordflow}{if} (s-\/>\mbox{\hyperlink{structgv__sd_aec325f89682a834bf445a955dd6b8dac}{plex\_offset}} < 0) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00673}00673                                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00674}00674                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00675}00675                         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00676}00676                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00677}00677                         errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00678}00678                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00679}00679                 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00680}00680         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00681}00681 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00682}00682         \textcolor{keywordflow}{if} (strlen(s-\/>\mbox{\hyperlink{structgv__sd_abb67fc2a84afb2c110794b6de19d55d6}{drive}}) == 0)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00683}00683                 errors++;}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00684}00684 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00685}00685         \textcolor{keywordflow}{if} (errors) \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00686}00686                 \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(s);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00687}00687                 \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00688}00688         \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00689}00689 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00690}00690         \textcolor{keywordflow}{return} (s);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00691}00691 \}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00692}00692 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00693}00693 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00694}00694 \textcolor{comment}{ * Take a size in bytes and return a pointer to a string which represents the}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00695}00695 \textcolor{comment}{ * size best.  If lj is != 0, return left justified, otherwise in a fixed 10}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00696}00696 \textcolor{comment}{ * character field suitable for columnar printing.}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00697}00697 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00698}00698 \textcolor{comment}{ * Note this uses a static string: it's only intended to be used immediately}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00699}00699 \textcolor{comment}{ * for printing.}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00700}00700 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00701}00701 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00702}\mbox{\hyperlink{geom__vinum__share_8c_aa7785306d2ed020ae2041195fbce8969}{00702}} \mbox{\hyperlink{geom__vinum__share_8c_aa7785306d2ed020ae2041195fbce8969}{gv\_roughlength}}(off\_t bytes, \textcolor{keywordtype}{int} lj)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00703}00703 \{}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00704}00704         \textcolor{keyword}{static} \textcolor{keywordtype}{char} desc[16];}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00705}00705 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00706}00706         \textcolor{comment}{/* Gigabytes. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00707}00707         \textcolor{keywordflow}{if} (bytes > (off\_t)\mbox{\hyperlink{geom__vinum__share_8h_abed82baf7f470b522273a3e37c24c600af424d391e75508e17be80d5cd7930bb1}{MEGABYTE}} * 10000)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00708}00708                 snprintf(desc, \textcolor{keyword}{sizeof}(desc), lj ? \textcolor{stringliteral}{"{}\%jd GB"{}} : \textcolor{stringliteral}{"{}\%10jd GB"{}},}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00709}00709                     bytes / \mbox{\hyperlink{geom__vinum__share_8h_abed82baf7f470b522273a3e37c24c600ac0dab06a4965d874e7380c280b43f1df}{GIGABYTE}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00710}00710 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00711}00711         \textcolor{comment}{/* Megabytes. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00712}00712         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (bytes > \mbox{\hyperlink{geom__vinum__share_8h_abed82baf7f470b522273a3e37c24c600a977af103c44f10c4d662aee002de652e}{KILOBYTE}} * 10000)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00713}00713                 snprintf(desc, \textcolor{keyword}{sizeof}(desc), lj ? \textcolor{stringliteral}{"{}\%jd MB"{}} : \textcolor{stringliteral}{"{}\%10jd MB"{}},}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00714}00714                     bytes / \mbox{\hyperlink{geom__vinum__share_8h_abed82baf7f470b522273a3e37c24c600af424d391e75508e17be80d5cd7930bb1}{MEGABYTE}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00715}00715 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00716}00716         \textcolor{comment}{/* Kilobytes. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00717}00717         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (bytes > 10000)}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00718}00718                 snprintf(desc, \textcolor{keyword}{sizeof}(desc), lj ? \textcolor{stringliteral}{"{}\%jd kB"{}} : \textcolor{stringliteral}{"{}\%10jd kB"{}},}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00719}00719                     bytes / \mbox{\hyperlink{geom__vinum__share_8h_abed82baf7f470b522273a3e37c24c600a977af103c44f10c4d662aee002de652e}{KILOBYTE}});}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00720}00720 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00721}00721         \textcolor{comment}{/* Bytes. */}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00722}00722         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00723}00723                 snprintf(desc, \textcolor{keyword}{sizeof}(desc), lj ? \textcolor{stringliteral}{"{}\%jd  B"{}} : \textcolor{stringliteral}{"{}\%10jd  B"{}}, bytes);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00724}00724 }
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00725}00725         \textcolor{keywordflow}{return} (desc);}
\DoxyCodeLine{\Hypertarget{geom__vinum__share_8c_source_l00726}00726 \}}

\end{DoxyCode}
