\hypertarget{g__label__ntfs_8c_source}{}\doxysection{g\+\_\+label\+\_\+ntfs.\+c}
\label{g__label__ntfs_8c_source}\index{geom/label/g\_label\_ntfs.c@{geom/label/g\_label\_ntfs.c}}
\mbox{\hyperlink{g__label__ntfs_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2005 Takanori Watanabe}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00029}00029 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00030}\mbox{\hyperlink{g__label__ntfs_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00030}} \mbox{\hyperlink{g__label__ntfs_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00034}00034 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00036}00036 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{geom_8h}{geom/geom.h}}>}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{g__label_8h}{geom/label/g\_label.h}}>}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00039}00039 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00040}\mbox{\hyperlink{g__label__ntfs_8c_a296c225f2d8dbc21c05df85734a2ac60}{00040}} \textcolor{preprocessor}{\#define NTFS\_A\_VOLUMENAME       0x60}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00041}\mbox{\hyperlink{g__label__ntfs_8c_a52dde2db265675527628b7d517f96b74}{00041}} \textcolor{preprocessor}{\#define NTFS\_FILEMAGIC          ((uint32\_t)(0x454C4946))}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00042}\mbox{\hyperlink{g__label__ntfs_8c_ae14efeb04707783372d68b05dbdea87e}{00042}} \textcolor{preprocessor}{\#define NTFS\_VOLUMEINO          3}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00043}00043 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00044}\mbox{\hyperlink{structntfs__attr}{00044}} \textcolor{keyword}{struct }\mbox{\hyperlink{structntfs__attr}{ntfs\_attr}} \{}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00045}\mbox{\hyperlink{structntfs__attr_a26efc6f5970d8bd4f4ce142c927ff477}{00045}}         uint32\_t        \mbox{\hyperlink{structntfs__attr_a26efc6f5970d8bd4f4ce142c927ff477}{a\_type}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00046}\mbox{\hyperlink{structntfs__attr_a7695f86322a2a6fdcbccf03a5df0b282}{00046}}         uint32\_t        \mbox{\hyperlink{structntfs__attr_a7695f86322a2a6fdcbccf03a5df0b282}{reclen}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00047}\mbox{\hyperlink{structntfs__attr_aaf9bb85015f219076ff30f4461ed1c55}{00047}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structntfs__attr_aaf9bb85015f219076ff30f4461ed1c55}{a\_flag}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00048}\mbox{\hyperlink{structntfs__attr_af8d80ad971c137442098ee61c64cbe70}{00048}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structntfs__attr_af8d80ad971c137442098ee61c64cbe70}{a\_namelen}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00049}\mbox{\hyperlink{structntfs__attr_a94e617bf9af97e4d51c4f60cf339c349}{00049}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structntfs__attr_a94e617bf9af97e4d51c4f60cf339c349}{a\_nameoff}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00050}\mbox{\hyperlink{structntfs__attr_a5f4656c5a185a21681b62dc7bb111da7}{00050}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structntfs__attr_a5f4656c5a185a21681b62dc7bb111da7}{reserved1}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00051}\mbox{\hyperlink{structntfs__attr_aa6810522911c994a513987414e95bb80}{00051}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structntfs__attr_aa6810522911c994a513987414e95bb80}{a\_compression}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00052}\mbox{\hyperlink{structntfs__attr_a382eb3854d74420a9c47fe714f14c896}{00052}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structntfs__attr_a382eb3854d74420a9c47fe714f14c896}{reserved2}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00053}\mbox{\hyperlink{structntfs__attr_a04d9b749439db0675c3c6e83ba62d034}{00053}}         uint16\_t        \mbox{\hyperlink{structntfs__attr_a04d9b749439db0675c3c6e83ba62d034}{a\_index}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00054}\mbox{\hyperlink{structntfs__attr_a3abe3243e09010e78dec71efea7599c1}{00054}}         uint16\_t        \mbox{\hyperlink{structntfs__attr_a3abe3243e09010e78dec71efea7599c1}{a\_datalen}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00055}\mbox{\hyperlink{structntfs__attr_a73a6744d533a93d5a326b932a8dd46c4}{00055}}         uint16\_t        \mbox{\hyperlink{structntfs__attr_a73a6744d533a93d5a326b932a8dd46c4}{reserved3}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00056}\mbox{\hyperlink{structntfs__attr_a8854c07da45c5d03477d87d6487df445}{00056}}         uint16\_t        \mbox{\hyperlink{structntfs__attr_a8854c07da45c5d03477d87d6487df445}{a\_dataoff}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00057}\mbox{\hyperlink{structntfs__attr_ad040dbba03c8fdea416f3406d29fd35f}{00057}}         uint16\_t        \mbox{\hyperlink{structntfs__attr_ad040dbba03c8fdea416f3406d29fd35f}{a\_indexed}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00058}\mbox{\hyperlink{g__label__ntfs_8c_ad3a3998cd3cc881d924b3835c00c96d8}{00058}} \} \mbox{\hyperlink{g__label__ntfs_8c_ad3a3998cd3cc881d924b3835c00c96d8}{\_\_packed}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00059}00059 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00060}\mbox{\hyperlink{structntfs__filerec}{00060}} \textcolor{keyword}{struct }\mbox{\hyperlink{structntfs__filerec}{ntfs\_filerec}} \{}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00061}\mbox{\hyperlink{structntfs__filerec_ac671c81be186c0b5efc780bd046a2751}{00061}}         uint32\_t        \mbox{\hyperlink{structntfs__filerec_ac671c81be186c0b5efc780bd046a2751}{fr\_hdrmagic}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00062}\mbox{\hyperlink{structntfs__filerec_a029f3678b9053ff5c476397655222828}{00062}}         uint16\_t        \mbox{\hyperlink{structntfs__filerec_a029f3678b9053ff5c476397655222828}{fr\_hdrfoff}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00063}\mbox{\hyperlink{structntfs__filerec_aef2a51d12653561f06cee007099b37d9}{00063}}         uint16\_t        \mbox{\hyperlink{structntfs__filerec_aef2a51d12653561f06cee007099b37d9}{fr\_hdrfnum}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00064}\mbox{\hyperlink{structntfs__filerec_aa201c7466f6fa86ea614c83a34037c52}{00064}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structntfs__filerec_aa201c7466f6fa86ea614c83a34037c52}{reserved}}[8];}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00065}\mbox{\hyperlink{structntfs__filerec_a5c3b1fca8d76ff48db25a1084379812e}{00065}}         uint16\_t        \mbox{\hyperlink{structntfs__filerec_a5c3b1fca8d76ff48db25a1084379812e}{fr\_seqnum}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00066}\mbox{\hyperlink{structntfs__filerec_a22ecb03d987564db24a8c3c68ccd222f}{00066}}         uint16\_t        \mbox{\hyperlink{structntfs__filerec_a22ecb03d987564db24a8c3c68ccd222f}{fr\_nlink}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00067}\mbox{\hyperlink{structntfs__filerec_a827ffe2b79fd2a2438c1624c88c3328a}{00067}}         uint16\_t        \mbox{\hyperlink{structntfs__filerec_a827ffe2b79fd2a2438c1624c88c3328a}{fr\_attroff}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00068}\mbox{\hyperlink{structntfs__filerec_ac56bcc05005fe5d7cd0f80a9167dee21}{00068}}         uint16\_t        \mbox{\hyperlink{structntfs__filerec_ac56bcc05005fe5d7cd0f80a9167dee21}{fr\_flags}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00069}\mbox{\hyperlink{structntfs__filerec_ac40292008a3d0e784cb4e5e5e1dfa454}{00069}}         uint32\_t        \mbox{\hyperlink{structntfs__filerec_ac40292008a3d0e784cb4e5e5e1dfa454}{fr\_size}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00070}\mbox{\hyperlink{structntfs__filerec_af8ada45f9d852244eb7f134f102e11a1}{00070}}         uint32\_t        \mbox{\hyperlink{structntfs__filerec_af8ada45f9d852244eb7f134f102e11a1}{fr\_allocated}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00071}\mbox{\hyperlink{structntfs__filerec_a46bf46c41cb54d9e940399b7afa11afb}{00071}}         uint64\_t        \mbox{\hyperlink{structntfs__filerec_a46bf46c41cb54d9e940399b7afa11afb}{fr\_mainrec}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00072}\mbox{\hyperlink{structntfs__filerec_a4a5eda5d465a76d8ede828d4a96978ad}{00072}}         uint16\_t        \mbox{\hyperlink{structntfs__filerec_a4a5eda5d465a76d8ede828d4a96978ad}{fr\_attrnum}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00073}00073 \} \mbox{\hyperlink{g__label__ntfs_8c_ad3a3998cd3cc881d924b3835c00c96d8}{\_\_packed}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00074}00074 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00075}\mbox{\hyperlink{structntfs__bootfile}{00075}} \textcolor{keyword}{struct }\mbox{\hyperlink{structntfs__bootfile}{ntfs\_bootfile}} \{}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00076}\mbox{\hyperlink{structntfs__bootfile_a53398a35aaabb6f949abc3336f7ad3d2}{00076}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structntfs__bootfile_a53398a35aaabb6f949abc3336f7ad3d2}{reserved1}}[3];}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00077}\mbox{\hyperlink{structntfs__bootfile_a6a867a272f6095f148d669f551537471}{00077}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structntfs__bootfile_a6a867a272f6095f148d669f551537471}{bf\_sysid}}[8];}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00078}\mbox{\hyperlink{structntfs__bootfile_a36a12c1cd8278f96b311d093faabb238}{00078}}         uint16\_t        \mbox{\hyperlink{structntfs__bootfile_a36a12c1cd8278f96b311d093faabb238}{bf\_bps}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00079}\mbox{\hyperlink{structntfs__bootfile_a8ca0580b65441593d2ca674c635efb2b}{00079}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structntfs__bootfile_a8ca0580b65441593d2ca674c635efb2b}{bf\_spc}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00080}\mbox{\hyperlink{structntfs__bootfile_a9e6fbddb3cb9fd2de1083dc9864ee02f}{00080}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structntfs__bootfile_a9e6fbddb3cb9fd2de1083dc9864ee02f}{reserved2}}[7];}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00081}\mbox{\hyperlink{structntfs__bootfile_ac0fc55c92bf680b3c1eae837d0496606}{00081}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structntfs__bootfile_ac0fc55c92bf680b3c1eae837d0496606}{bf\_media}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00082}\mbox{\hyperlink{structntfs__bootfile_af54009bb950a54b4b8f5c548bf074671}{00082}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structntfs__bootfile_af54009bb950a54b4b8f5c548bf074671}{reserved3}}[2];}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00083}\mbox{\hyperlink{structntfs__bootfile_ae7eb558a95b8b24748b2d42e646c3d38}{00083}}         uint16\_t        \mbox{\hyperlink{structntfs__bootfile_ae7eb558a95b8b24748b2d42e646c3d38}{bf\_spt}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00084}\mbox{\hyperlink{structntfs__bootfile_a9660adb8558afd6a83131951446ddf87}{00084}}         uint16\_t        \mbox{\hyperlink{structntfs__bootfile_a9660adb8558afd6a83131951446ddf87}{bf\_heads}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00085}\mbox{\hyperlink{structntfs__bootfile_ad44da5486daf39970835a0de0cad51ae}{00085}}         \mbox{\hyperlink{binstream_8h_ab077fa1127453be2bd9d4c3c8a768fa7}{uint8\_t}}          \mbox{\hyperlink{structntfs__bootfile_ad44da5486daf39970835a0de0cad51ae}{reserver4}}[12];}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00086}\mbox{\hyperlink{structntfs__bootfile_ab50c250ac3d8d2461595a7eb53edec27}{00086}}         uint64\_t        \mbox{\hyperlink{structntfs__bootfile_ab50c250ac3d8d2461595a7eb53edec27}{bf\_spv}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00087}\mbox{\hyperlink{structntfs__bootfile_a34cfda729890279ab3a487181948afa6}{00087}}         uint64\_t        \mbox{\hyperlink{structntfs__bootfile_a34cfda729890279ab3a487181948afa6}{bf\_mftcn}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00088}\mbox{\hyperlink{structntfs__bootfile_a0947a85ed3be8dea665e8ed35b68934c}{00088}}         uint64\_t        \mbox{\hyperlink{structntfs__bootfile_a0947a85ed3be8dea665e8ed35b68934c}{bf\_mftmirrcn}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00089}\mbox{\hyperlink{structntfs__bootfile_ad9ffcc835ee7bc610a3962891264fe9a}{00089}}         int8\_t          \mbox{\hyperlink{structntfs__bootfile_ad9ffcc835ee7bc610a3962891264fe9a}{bf\_mftrecsz}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00090}\mbox{\hyperlink{structntfs__bootfile_adc3127a9c4fb5bcf5700369916fac732}{00090}}         uint32\_t        \mbox{\hyperlink{structntfs__bootfile_adc3127a9c4fb5bcf5700369916fac732}{bf\_ibsz}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00091}\mbox{\hyperlink{structntfs__bootfile_a8a892f189f427604e501c9358514c5dc}{00091}}         uint32\_t        \mbox{\hyperlink{structntfs__bootfile_a8a892f189f427604e501c9358514c5dc}{bf\_volsn}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00092}00092 \} \mbox{\hyperlink{g__label__ntfs_8c_ad3a3998cd3cc881d924b3835c00c96d8}{\_\_packed}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00093}00093 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00094}00094 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00095}\mbox{\hyperlink{g__label__ntfs_8c_a0e94db4b8828545a32135316ab10a8a4}{00095}} \mbox{\hyperlink{g__label__ntfs_8c_a0e94db4b8828545a32135316ab10a8a4}{g\_label\_ntfs\_taste}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__consumer}{g\_consumer}} *\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, \textcolor{keywordtype}{char} *label, \textcolor{keywordtype}{size\_t} size)}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00096}00096 \{}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00097}00097         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__provider}{g\_provider}} *\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00098}00098         \textcolor{keyword}{struct }\mbox{\hyperlink{structntfs__bootfile}{ntfs\_bootfile}} *bf;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00099}00099         \textcolor{keyword}{struct }\mbox{\hyperlink{structntfs__filerec}{ntfs\_filerec}} *fr;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00100}00100         \textcolor{keyword}{struct }\mbox{\hyperlink{structntfs__attr}{ntfs\_attr}} *atr;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00101}00101         off\_t voloff;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00102}00102         \textcolor{keywordtype}{size\_t} recoff;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00103}00103         \textcolor{keywordtype}{char} *filerecp;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00104}00104         int8\_t mftrecsz;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00105}00105         \textcolor{keywordtype}{char} vnchar;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00106}00106         \textcolor{keywordtype}{int} recsize, j;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00107}00107 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00108}00108         \mbox{\hyperlink{geom_8h_a71a3365bd3741226d2c0d1abada9fde7}{g\_topology\_assert\_not}}();}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00109}00109 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00110}00110         label[0] = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00111}00111         \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}} = \mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}-\/>\mbox{\hyperlink{structg__consumer_a6435d5aec0376e995dce3131fd3beb52}{provider}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00112}00112         bf = NULL;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00113}00113         filerecp = NULL;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00114}00114 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00115}00115         \textcolor{keywordflow}{if} (\mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} < \textcolor{keyword}{sizeof}(*bf))}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00116}00116                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00117}00117 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00118}00118         bf = \mbox{\hyperlink{geom_8h_a550c2071f79908eea3d1ccbf821c4e4f}{g\_read\_data}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, 0, \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}}, NULL);}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00119}00119         \textcolor{keywordflow}{if} (bf == NULL || strncmp(bf-\/>\mbox{\hyperlink{structntfs__bootfile_a6a867a272f6095f148d669f551537471}{bf\_sysid}}, \textcolor{stringliteral}{"{}NTFS    "{}}, 8) != 0)}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00120}00120                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00121}00121 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00122}00122         mftrecsz = bf-\/>\mbox{\hyperlink{structntfs__bootfile_ad9ffcc835ee7bc610a3962891264fe9a}{bf\_mftrecsz}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00123}00123         recsize = (mftrecsz > 0) ? (mftrecsz * bf-\/>\mbox{\hyperlink{structntfs__bootfile_a36a12c1cd8278f96b311d093faabb238}{bf\_bps}} * bf-\/>\mbox{\hyperlink{structntfs__bootfile_a8ca0580b65441593d2ca674c635efb2b}{bf\_spc}}) :}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00124}00124             (1 << -\/mftrecsz);}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00125}00125         \textcolor{keywordflow}{if} (recsize <= 0 || recsize > maxphys || recsize \% \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} != 0)}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00126}00126                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00127}00127 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00128}00128         voloff = bf-\/>\mbox{\hyperlink{structntfs__bootfile_a34cfda729890279ab3a487181948afa6}{bf\_mftcn}} * bf-\/>\mbox{\hyperlink{structntfs__bootfile_a8ca0580b65441593d2ca674c635efb2b}{bf\_spc}} * bf-\/>\mbox{\hyperlink{structntfs__bootfile_a36a12c1cd8278f96b311d093faabb238}{bf\_bps}} +}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00129}00129             recsize * \mbox{\hyperlink{g__label__ntfs_8c_ae14efeb04707783372d68b05dbdea87e}{NTFS\_VOLUMEINO}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00130}00130         \textcolor{keywordflow}{if} (voloff \% \mbox{\hyperlink{g__part__if_8m_a9bc7638f295763b77465c5ebebbd3442}{pp}}-\/>\mbox{\hyperlink{structg__provider_aea3cd43d41461790b8d0afcd8c49a355}{sectorsize}} != 0)}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00131}00131                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00132}00132 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00133}00133         filerecp = \mbox{\hyperlink{geom_8h_a550c2071f79908eea3d1ccbf821c4e4f}{g\_read\_data}}(\mbox{\hyperlink{g__part__if_8m_a294f18324585ff37641fb8aa1c9ccd82}{cp}}, voloff, recsize, NULL);}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00134}00134         \textcolor{keywordflow}{if} (filerecp == NULL)}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00135}00135                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00136}00136         fr = (\textcolor{keyword}{struct }\mbox{\hyperlink{structntfs__filerec}{ntfs\_filerec}} *)filerecp;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00137}00137         \textcolor{keywordflow}{if} (fr-\/>\mbox{\hyperlink{structntfs__filerec_ac671c81be186c0b5efc780bd046a2751}{fr\_hdrmagic}} != \mbox{\hyperlink{g__label__ntfs_8c_a52dde2db265675527628b7d517f96b74}{NTFS\_FILEMAGIC}})}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00138}00138                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00139}00139 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00140}00140         \textcolor{keywordflow}{for} (recoff = fr-\/>\mbox{\hyperlink{structntfs__filerec_a827ffe2b79fd2a2438c1624c88c3328a}{fr\_attroff}};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00141}00141             recoff <= recsize -\/ 2 * \textcolor{keyword}{sizeof}(uint32\_t);}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00142}00142             recoff += atr-\/>\mbox{\hyperlink{structntfs__attr_a7695f86322a2a6fdcbccf03a5df0b282}{reclen}}) \{}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00143}00143                 atr = (\textcolor{keyword}{struct }\mbox{\hyperlink{structntfs__attr}{ntfs\_attr}} *)(filerecp + recoff);}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00144}00144                 \textcolor{keywordflow}{if} (atr-\/>\mbox{\hyperlink{structntfs__attr_a26efc6f5970d8bd4f4ce142c927ff477}{a\_type}} == -\/1)}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00145}00145                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00146}00146                 \textcolor{keywordflow}{if} (atr-\/>\mbox{\hyperlink{structntfs__attr_a7695f86322a2a6fdcbccf03a5df0b282}{reclen}} < \textcolor{keyword}{sizeof}(*atr))}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00147}00147                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00148}00148                 \textcolor{keywordflow}{if} (recsize -\/ recoff < atr-\/>\mbox{\hyperlink{structntfs__attr_a7695f86322a2a6fdcbccf03a5df0b282}{reclen}})}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00149}00149                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00150}00150                 \textcolor{keywordflow}{if} (atr-\/>\mbox{\hyperlink{structntfs__attr_a26efc6f5970d8bd4f4ce142c927ff477}{a\_type}} == \mbox{\hyperlink{g__label__ntfs_8c_a296c225f2d8dbc21c05df85734a2ac60}{NTFS\_A\_VOLUMENAME}}) \{}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00151}00151                         \textcolor{keywordflow}{if} (atr-\/>\mbox{\hyperlink{structntfs__attr_a8854c07da45c5d03477d87d6487df445}{a\_dataoff}} > atr-\/>\mbox{\hyperlink{structntfs__attr_a7695f86322a2a6fdcbccf03a5df0b282}{reclen}} ||}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00152}00152                             atr-\/>\mbox{\hyperlink{structntfs__attr_a3abe3243e09010e78dec71efea7599c1}{a\_datalen}} > atr-\/>\mbox{\hyperlink{structntfs__attr_a7695f86322a2a6fdcbccf03a5df0b282}{reclen}} -\/ atr-\/>\mbox{\hyperlink{structntfs__attr_a8854c07da45c5d03477d87d6487df445}{a\_dataoff}})}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00153}00153                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00154}00154 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00155}00155                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00156}00156 \textcolor{comment}{                         * UNICODE to ASCII.}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00157}00157 \textcolor{comment}{                         * Should we need to use iconv(9)?}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00158}00158 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00159}00159                         \textcolor{keywordflow}{if} (atr-\/>\mbox{\hyperlink{structntfs__attr_a3abe3243e09010e78dec71efea7599c1}{a\_datalen}} >= size * 2 ||}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00160}00160                             atr-\/>\mbox{\hyperlink{structntfs__attr_a3abe3243e09010e78dec71efea7599c1}{a\_datalen}} \% 2 != 0)}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00161}00161                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00162}00162                         \textcolor{keywordflow}{for} (j = 0; j < atr-\/>\mbox{\hyperlink{structntfs__attr_a3abe3243e09010e78dec71efea7599c1}{a\_datalen}}; j++) \{}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00163}00163                                 vnchar = ((\textcolor{keywordtype}{char} *)atr)[atr-\/>\mbox{\hyperlink{structntfs__attr_a8854c07da45c5d03477d87d6487df445}{a\_dataoff}} + j];}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00164}00164                                 \textcolor{keywordflow}{if} (j \& 1) \{}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00165}00165                                         \textcolor{keywordflow}{if} (vnchar) \{}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00166}00166                                                 label[0] = 0;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00167}00167                                                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00168}00168                                         \}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00169}00169                                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00170}00170                                         label[j / 2] = vnchar;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00171}00171                                 \}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00172}00172                         \}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00173}00173                         label[j / 2] = 0;}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00174}00174                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00175}00175                 \}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00176}00176         \}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00177}00177 done:}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00178}00178         \textcolor{keywordflow}{if} (bf != NULL)}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00179}00179                 \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(bf);}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00180}00180         \textcolor{keywordflow}{if} (filerecp != NULL)}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00181}00181                 \mbox{\hyperlink{geom_8h_ad9924deb20de7b40cb6cf06e5ae28855}{g\_free}}(filerecp);}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00182}00182 \}}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00183}00183 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00184}\mbox{\hyperlink{g__label_8h_aa16b0837cf9d07aaf79b69b0eb9d7b4e}{00184}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__label__desc}{g\_label\_desc}} \mbox{\hyperlink{g__label__ntfs_8c_aa16b0837cf9d07aaf79b69b0eb9d7b4e}{g\_label\_ntfs}} = \{}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00185}00185         .\mbox{\hyperlink{structg__label__desc_a5c38840bd2d369860b22fb12362fb4de}{ld\_taste}} = \mbox{\hyperlink{g__label__ntfs_8c_a0e94db4b8828545a32135316ab10a8a4}{g\_label\_ntfs\_taste}},}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00186}00186         .ld\_dirprefix = \textcolor{stringliteral}{"{}ntfs/"{}},}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00187}00187         .ld\_enabled = 1}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00188}00188 \};}
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00189}00189 }
\DoxyCodeLine{\Hypertarget{g__label__ntfs_8c_source_l00190}\mbox{\hyperlink{g__label__ntfs_8c_a1bb5163ce1cac6641a06daba3b028944}{00190}} \mbox{\hyperlink{g__label__ntfs_8c_a1bb5163ce1cac6641a06daba3b028944}{G\_LABEL\_INIT}}(ntfs, \mbox{\hyperlink{g__label__ntfs_8c_aa16b0837cf9d07aaf79b69b0eb9d7b4e}{g\_label\_ntfs}}, \textcolor{stringliteral}{"{}Create device nodes for NTFS volumes"{}});}

\end{DoxyCode}
