<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Thank you Zdenek. We are developing a embedded system with very constrained memory/storage. So we are trying to see if we can combine utilities like dmsetup with other Rust code for managing storage in our embedded system, while only including
the parts of dmsetup that we really need. Hence I am trying to figure out what is the best way here.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks</p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:zkabelac@redhat.com">Zdenek Kabelac</a><br>
<b>Sent: </b>Monday, September 12, 2022 6:01 AM<br>
<b>To: </b><a href="mailto:linux_learner@outlook.com">Pra.. Dew..</a>; <a href="mailto:dm-devel@redhat.com">
dm-devel@redhat.com</a><br>
<b>Subject: </b>Re: [dm-devel] setting up dmverity using device mapper IOCTLs</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Dne 10. 09. 22 v 20:46 Pra.. Dew.. napsal(a):<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">I need to setup dm-verity from my program-basically mount verity enabled filesystems from my code. I have looked at veritysetup and devicemapper (libdm) library. I was wondering if there is some simple C code to use the DM IOCTLs directly
to setup verity. Any guidance to directly use the dm IOCTLs or libdm would also be helpful. Thank you for the guidance.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
</blockquote>
<p><o:p> </o:p></p>
<p>Hi</p>
<p>I'd recommend to exec "dmsetup" call - as that's by far the simplest solution for your problem.</p>
<p>Verity tool should supposedly solve 'compatibility' between various versions and various capabilities of driver.</p>
<p>What is the idea behind redevelopment of this tool by your C code (as clearly you should then do the same thing as verity tool) ?</p>
<p><o:p> </o:p></p>
<p>Regards</p>
<p><o:p> </o:p></p>
<p>Zdenek</p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>