Debian Codegraph @

doc/html/gdbus-org.freedesktop.UDisks2.Block.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>org.freedesktop.UDisks2.Block: UDisks Reference Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
7 <link rel="home" href="index.html" title="UDisks Reference Manual">
8 <link rel="up" href="ch03.html" title="D-Bus Interfaces">
9 <link rel="prev" href="gdbus-org.freedesktop.UDisks2.MDRaid.html" title="org.freedesktop.UDisks2.MDRaid">
10 <link rel="next" href="gdbus-org.freedesktop.UDisks2.Partition.html" title="org.freedesktop.UDisks2.Partition">
11 <meta name="generator" content="GTK-Doc V1.35.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18 <a href="#gdbus-org.freedesktop.UDisks2.Block.description" class="shortcut">Description</a></span><span id="nav_properties">  <span class="dim">|</span> 
19 <a href="#gdbus-org.freedesktop.UDisks2.Block.properties" class="shortcut">Properties</a></span>
20 </td>
21 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
22 <td><a accesskey="u" href="ch03.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
23 <td><a accesskey="p" href="gdbus-org.freedesktop.UDisks2.MDRaid.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
24 <td><a accesskey="n" href="gdbus-org.freedesktop.UDisks2.Partition.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
25 </tr></table>
26 <div class="refentry">
27 <a name="gdbus-org.freedesktop.UDisks2.Block"></a><div class="titlepage"></div>
28 <div class="refnamediv"><table width="100%"><tr>
29 <td valign="top">
30 <h2><span class="refentrytitle"><a name="gdbus-interface-org-freedesktop-UDisks2-Block.top_of_page"></a>org.freedesktop.UDisks2.Block</span></h2>
31 <p>org.freedesktop.UDisks2.Block — Block device</p>
32 </td>
33 <td class="gallery_image" valign="top" align="right"></td>
34 </tr></table></div>
35 <div class="refsynopsisdiv">
36 <h2>Methods</h2>
37 <pre class="synopsis">
38 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.AddConfigurationItem" title="The AddConfigurationItem() method">AddConfigurationItem</a> (IN (sa{sv}) item,
39 IN a{sv} options);
40 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.RemoveConfigurationItem" title="The RemoveConfigurationItem() method">RemoveConfigurationItem</a> (IN (sa{sv}) item,
41 IN a{sv} options);
42 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.UpdateConfigurationItem" title="The UpdateConfigurationItem() method">UpdateConfigurationItem</a> (IN (sa{sv}) old_item,
43 IN (sa{sv}) new_item,
44 IN a{sv} options);
45 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.GetSecretConfiguration" title="The GetSecretConfiguration() method">GetSecretConfiguration</a> (IN a{sv} options,
46 OUT a(sa{sv}) configuration);
47 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.Format" title="The Format() method">Format</a> (IN s type,
48 IN a{sv} options);
49 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.OpenForBackup" title="The OpenForBackup() method">OpenForBackup</a> (IN a{sv} options,
50 OUT h fd);
51 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.OpenForRestore" title="The OpenForRestore() method">OpenForRestore</a> (IN a{sv} options,
52 OUT h fd);
53 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.OpenForBenchmark" title="The OpenForBenchmark() method">OpenForBenchmark</a> (IN a{sv} options,
54 OUT h fd);
55 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.OpenDevice" title="The OpenDevice() method">OpenDevice</a> (IN s mode,
56 IN a{sv} options,
57 OUT h fd);
58 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.Rescan" title="The Rescan() method">Rescan</a> (IN a{sv} options);
59 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.RestoreEncryptedHeader" title="The RestoreEncryptedHeader() method">RestoreEncryptedHeader</a> (IN s backup_file,
60 IN a{sv} options);
61 </pre>
62 </div>
63 <div class="refsect1">
64 <a name="id-1.3.3.6.4"></a><h2>Properties</h2>
65 <pre class="synopsis">
66 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.Device" title='The "Device" property'>Device</a> readable ay
67 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.PreferredDevice" title='The "PreferredDevice" property'>PreferredDevice</a> readable ay
68 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.Symlinks" title='The "Symlinks" property'>Symlinks</a> readable aay
69 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.DeviceNumber" title='The "DeviceNumber" property'>DeviceNumber</a> readable t
70 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.Id" title='The "Id" property'>Id</a> readable s
71 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.Size" title='The "Size" property'>Size</a> readable t
72 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.ReadOnly" title='The "ReadOnly" property'>ReadOnly</a> readable b
73 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.Drive" title='The "Drive" property'>Drive</a> readable o
74 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.MDRaid" title='The "MDRaid" property'>MDRaid</a> readable o
75 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.MDRaidMember" title='The "MDRaidMember" property'>MDRaidMember</a> readable o
76 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.IdUsage" title='The "IdUsage" property'>IdUsage</a> readable s
77 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.IdType" title='The "IdType" property'>IdType</a> readable s
78 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.IdVersion" title='The "IdVersion" property'>IdVersion</a> readable s
79 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.IdLabel" title='The "IdLabel" property'>IdLabel</a> readable s
80 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.IdUUID" title='The "IdUUID" property'>IdUUID</a> readable s
81 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.Configuration" title='The "Configuration" property'>Configuration</a> readable a(sa{sv})
82 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.CryptoBackingDevice" title='The "CryptoBackingDevice" property'>CryptoBackingDevice</a> readable o
83 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.HintPartitionable" title='The "HintPartitionable" property'>HintPartitionable</a> readable b
84 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.HintSystem" title='The "HintSystem" property'>HintSystem</a> readable b
85 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.HintIgnore" title='The "HintIgnore" property'>HintIgnore</a> readable b
86 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.HintAuto" title='The "HintAuto" property'>HintAuto</a> readable b
87 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.HintName" title='The "HintName" property'>HintName</a> readable s
88 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.HintIconName" title='The "HintIconName" property'>HintIconName</a> readable s
89 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.HintSymbolicIconName" title='The "HintSymbolicIconName" property'>HintSymbolicIconName</a> readable s
90 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.UserspaceMountOptions" title='The "UserspaceMountOptions" property'>UserspaceMountOptions</a> readable as
91 </pre>
92 </div>
93 <div class="refsect1">
94 <a name="gdbus-interface-org-freedesktop-UDisks2-Block"></a><h2>Description</h2>
95 <p>
96 This interface represents a block device.
97 </p>
98 <p>
99 This should not be confused with the
100 <a class="link" href="gdbus-org.freedesktop.UDisks2.Drive.html#gdbus-interface-org-freedesktop-UDisks2-Drive.top_of_page">org.freedesktop.UDisks2.Drive</a> interface that is used to represent
101 disk drives. For example, the <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-interface-org-freedesktop-UDisks2-Block.top_of_page">org.freedesktop.UDisks2.Block</a>
102 interface is also used for block devices that do not correspond to
103 drives at all (e.g. <a class="ulink" href="http://en.wikipedia.org/wiki/Loop_device" target="_top">Loop
104 Devices</a>).
105 </p>
106 </div>
107 <div class="refsect1">
108 <a name="gdbus-methods-org.freedesktop.UDisks2.Block"></a><h2>Method Details</h2>
109 <div class="refsect2">
110 <a name="gdbus-method-org-freedesktop-UDisks2-Block.AddConfigurationItem"></a><h3>The AddConfigurationItem() method</h3>
111 <pre class="programlisting">
112 AddConfigurationItem (IN (sa{sv}) item,
113 IN a{sv} options);
114 </pre>
115 <p>
116 Adds a new configuration item.
117 </p>
118 <p>
119 See the <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.Configuration" title='The "Configuration" property'>"Configuration"</a>
120 property for details about valid configuration items.
121 </p>
122 <p>
123 Some fields can be omitted and will then receive default
124 values. This is useful when passing configuration items to
125 Format, for example, because the proper values are not known
126 before the formatting is done.
127 </p>
128 <p>
129 If 'fsname' is omitted in a 'fstab' entry, or 'device' is
130 omitted in a 'crypttab' entry, it defaults to "UUID=..." when
131 the block device has a filesystem UUID, or to the name of the
132 device in the filesystem.
133 </p>
134 <p>
135 If 'name' is omitted in a 'crypttab' entry, it defaults to
136 "luks-&lt;UUID&gt;".
137 </p>
138 <p>
139 If 'passphrase-path' is omitted, it defaults to
140 "/etc/luks-keys/&lt;NAME&gt;".
141 </p>
142 <p>
143 If 'track-parents' is set to true in <em class="parameter"><code>item</code></em>, then the 'opts'
144 and 'options' fields will be augmented with "x-parent"
145 elements, as appropriate. This will make <em class="parameter"><code>item</code></em> appear in the
146 ChildConfiguration properties, and will allow the 'tear-down'
147 option of Format, DeletePartition, and other methods to remove
148 this item reliably.
149 </p>
150 <div class="variablelist"><table border="0" class="variablelist">
151 <colgroup>
152 <col align="left" valign="top">
153 <col>
154 </colgroup>
155 <tbody>
156 <tr>
157 <td><p><span class="term"><code class="literal">IN (sa{sv}) <em class="parameter"><code>item</code></em></code>:</span></p></td>
158 <td><p>
159 The configuration item to add.
160 </p></td>
161 </tr>
162 <tr>
163 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
164 <td><p>
165 Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).
166 </p></td>
167 </tr>
168 </tbody>
169 </table></div>
170 </div>
171 <hr>
172 <div class="refsect2">
173 <a name="gdbus-method-org-freedesktop-UDisks2-Block.RemoveConfigurationItem"></a><h3>The RemoveConfigurationItem() method</h3>
174 <pre class="programlisting">
175 RemoveConfigurationItem (IN (sa{sv}) item,
176 IN a{sv} options);
177 </pre>
178 <p>
179 Removes an existing configuration item.
180 </p>
181 <p>
182 See the <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.Configuration" title='The "Configuration" property'>"Configuration"</a>
183 property for details about valid configuration items.
184 </p>
185 <div class="variablelist"><table border="0" class="variablelist">
186 <colgroup>
187 <col align="left" valign="top">
188 <col>
189 </colgroup>
190 <tbody>
191 <tr>
192 <td><p><span class="term"><code class="literal">IN (sa{sv}) <em class="parameter"><code>item</code></em></code>:</span></p></td>
193 <td><p>
194 The configuration item to remove.
195 </p></td>
196 </tr>
197 <tr>
198 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
199 <td><p>
200 Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).
201 </p></td>
202 </tr>
203 </tbody>
204 </table></div>
205 </div>
206 <hr>
207 <div class="refsect2">
208 <a name="gdbus-method-org-freedesktop-UDisks2-Block.UpdateConfigurationItem"></a><h3>The UpdateConfigurationItem() method</h3>
209 <pre class="programlisting">
210 UpdateConfigurationItem (IN (sa{sv}) old_item,
211 IN (sa{sv}) new_item,
212 IN a{sv} options);
213 </pre>
214 <p>
215 Removes a configuration item and adds a new one. This is
216 equivalent to calling
217 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.RemoveConfigurationItem" title="The RemoveConfigurationItem() method">RemoveConfigurationItem()</a>
218 followed by
219 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.AddConfigurationItem" title="The AddConfigurationItem() method">AddConfigurationItem()</a>
220 with the change that only one PolicyKit check is made
221 and that <em class="parameter"><code>new_item</code></em> can be validated against <em class="parameter"><code>old_item</code></em>.
222 </p>
223 <p>
224 See the <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.Configuration" title='The "Configuration" property'>"Configuration"</a>
225 property for details about valid configuration items.
226 </p>
227 <div class="variablelist"><table border="0" class="variablelist">
228 <colgroup>
229 <col align="left" valign="top">
230 <col>
231 </colgroup>
232 <tbody>
233 <tr>
234 <td><p><span class="term"><code class="literal">IN (sa{sv}) <em class="parameter"><code>old_item</code></em></code>:</span></p></td>
235 <td><p>
236 The configuration item to remove.
237 </p></td>
238 </tr>
239 <tr>
240 <td><p><span class="term"><code class="literal">IN (sa{sv}) <em class="parameter"><code>new_item</code></em></code>:</span></p></td>
241 <td><p>
242 The configuration item to add. Must be of the same type as <em class="parameter"><code>old_item</code></em>.
243 </p></td>
244 </tr>
245 <tr>
246 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
247 <td><p>
248 Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).
249 </p></td>
250 </tr>
251 </tbody>
252 </table></div>
253 </div>
254 <hr>
255 <div class="refsect2">
256 <a name="gdbus-method-org-freedesktop-UDisks2-Block.GetSecretConfiguration"></a><h3>The GetSecretConfiguration() method</h3>
257 <pre class="programlisting">
258 GetSecretConfiguration (IN a{sv} options,
259 OUT a(sa{sv}) configuration);
260 </pre>
261 <p>
262 Returns the same value as in the
263 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.Configuration" title='The "Configuration" property'>"Configuration"</a> property
264 but without secret information filtered out.
265 </p>
266 <div class="variablelist"><table border="0" class="variablelist">
267 <colgroup>
268 <col align="left" valign="top">
269 <col>
270 </colgroup>
271 <tbody>
272 <tr>
273 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
274 <td><p>
275 Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).
276 </p></td>
277 </tr>
278 <tr>
279 <td><p><span class="term"><code class="literal">OUT a(sa{sv}) <em class="parameter"><code>configuration</code></em></code>:</span></p></td>
280 <td><p>
281 The resulting configuration.
282 </p></td>
283 </tr>
284 </tbody>
285 </table></div>
286 </div>
287 <hr>
288 <div class="refsect2">
289 <a name="gdbus-method-org-freedesktop-UDisks2-Block.Format"></a><h3>The Format() method</h3>
290 <pre class="programlisting">
291 Format (IN s type,
292 IN a{sv} options);
293 </pre>
294 <p>
295 Formats the device with a file system, partition table or
296 other well-known content.
297 </p>
298 <p>
299 Known values for <em class="parameter"><code>type</code></em> includes <code class="constant">empty</code> (to
300 just zero out areas of the device known to host file system
301 signatures) and <code class="constant">swap</code> (Linux swap space)
302 and most file systems supported by the <span class="citerefentry"><span class="refentrytitle">mkfs</span>(8)</span>
303 program through its <code class="option">-t</code> option.
304 </p>
305 <p>
306 Known partition table formats includes
307 <code class="constant">dos</code> and <code class="constant">gpt</code>.
308 </p>
309 <p>
310 If <em class="parameter"><code>type</code></em> supports it, you can specify a label with the
311 <em class="parameter"><code>label</code></em> option in the <em class="parameter"><code>options</code></em> parameter;
312 however, note that this may not be supported on all file
313 systems and, if supported, the maximum allowed length may
314 vary. Similarly, you can specify filesystem UUID with the
315 <em class="parameter"><code>uuid</code></em> option in the <em class="parameter"><code>options</code></em> parameter
316 given that the particular filesystem type supports this feature.
317 The format of the UUID string should match the <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.IdUUID" title='The "IdUUID" property'>"IdUUID"</a>
318 property.
319 </p>
320 <p>
321 If the file system in question supports owners and the option
322 <em class="parameter"><code>take-ownership</code></em> is set to <code class="constant">TRUE</code> then the
323 root directory of the created file system will be owned by the
324 caller of this method.
325 </p>
326 <p>
327 If the option <em class="parameter"><code>encrypt.passphrase</code></em> is
328 given then a LUKS device is created with the given passphrase
329 and the file system is created on the unlocked device. The
330 unlocked device will be left open. This parameter can be used
331 to supply the binary contents of an arbitrary keyfile by passing
332 a value of type <span class="quote">“<span class="quote">ay</span>”</span>.
333 Option <em class="parameter"><code>encrypt.type</code></em> can be used to
334 specify encryption "technology" that will be used. Currently
335 only <span class="quote">“<span class="quote">luks1</span>”</span> and <span class="quote">“<span class="quote">luks2</span>”</span> are supported.
336 Option <em class="parameter"><code>encrypt.label</code></em> can be used to specify
337 label for the LUKS format.
338 Following additional options for LUKS key derivation function can
339 be used:
340 </p>
341 <p>
342 </p>
343 <div class="variablelist"><table border="0" class="variablelist">
344 <colgroup>
345 <col align="left" valign="top">
346 <col>
347 </colgroup>
348 <tbody>
349 <tr>
350 <td><p><span class="term">encrypt.pbkdf</span></p></td>
351 <td><p>key derivation function, one of "pbkdf2", "argon2i", "argon2id"</p></td>
352 </tr>
353 <tr>
354 <td><p><span class="term">encrypt.iterations</span></p></td>
355 <td><p>number of iterations for PBKDF</p></td>
356 </tr>
357 <tr>
358 <td><p><span class="term">encrypt.memory</span></p></td>
359 <td><p>memory cost in KiB for Argon2</p></td>
360 </tr>
361 <tr>
362 <td><p><span class="term">encrypt.time</span></p></td>
363 <td><p>time cost for PBKDF in ms</p></td>
364 </tr>
365 <tr>
366 <td><p><span class="term">encrypt.threads</span></p></td>
367 <td><p>parallel cost for PBKDF (number of threads, up to 4)</p></td>
368 </tr>
369 </tbody>
370 </table></div>
371 <p>
372 </p>
373 <p>
374 If the option <em class="parameter"><code>erase</code></em> is used then the
375 underlying device will be erased. Valid values include
376 <span class="quote">“<span class="quote">zero</span>”</span> to write zeroes over the entire device
377 before formatting, <span class="quote">“<span class="quote">ata-secure-erase</span>”</span> to perform
378 a secure erase or <span class="quote">“<span class="quote">ata-secure-erase-enhanced</span>”</span> to
379 perform an enhanced secure erase.
380 </p>
381 <p>
382 If the option <em class="parameter"><code>update-partition-type</code></em> is
383 set to <code class="constant">TRUE</code> and the object in question is a partition, then
384 its type (cf. the <a class="link" href="gdbus-org.freedesktop.UDisks2.Partition.html#gdbus-property-org-freedesktop-UDisks2-Partition.Type" title='The "Type" property'>"Type"</a>
385 property) will be set to the <span class="emphasis"><em>natural</em></span>
386 partition type matching <em class="parameter"><code>type</code></em>, if any. For example, if
387 formatting a GPT partition with a FAT filesystem, the
388 <span class="quote">“<span class="quote">Microsoft Basic Data</span>”</span> partition type will be
389 chosen; similar, if formatting a DOS partition with a Ext4
390 filesystem then partition type 0x83 is chosen.
391 </p>
392 <p>
393 If the option <em class="parameter"><code>no-block</code></em> is set to <code class="constant">TRUE</code>
394 then the method returns just before the actual formatting
395 takes place but after authorization and other checks are
396 done. This is useful for applications that want to format
397 several devices in parallel.
398 </p>
399 <p>
400 If the option <em class="parameter"><code>dry-run-first</code></em> is set to
401 <code class="constant">TRUE</code> then a dry run of the formatting command is performed
402 first, if UDisks knows how to do that. The idea is that
403 this allows a deeper check of the parameters even when
404 <em class="parameter"><code>no-block</code></em> is <code class="constant">TRUE</code>. Note that the block
405 device has already been modified (wiped) when the dry run
406 check is called.
407 </p>
408 <p>
409 If the option <em class="parameter"><code>mkfs-args</code></em> is set then the
410 caller can provide a list of additional command-line arguments
411 that will be passed to the mkfs program. The arguments
412 specified in this way are not validated by UDisks, and the
413 user is responsible for making sure that the available mkfs
414 program for that filesystem supports them and that they work
415 for the intended purpose. Note that UDisks can also pass its
416 own additional arguments to mkfs, and they may vary between
417 releases, with no guarantees of stability in this regard. The
418 position in which the user-provided arguments are appended to
419 the final mkfs command line is also not defined. Because of
420 all this, <em class="parameter"><code>mkfs-args</code></em> should only be used
421 as a last resort when no other dedicated option is available.
422 </p>
423 <p>
424 If the option <em class="parameter"><code>no-discard</code></em> is set to
425 <code class="constant">TRUE</code> then Udisks tells the formatting utility not to issue
426 BLKDISCARD ioctls.
427 </p>
428 <p>
429 If the option <em class="parameter"><code>config-items</code></em> is set, it
430 should be an array of configuration items suitable for
431 org.freedesktop.UDisks2.Block.AddConfigurationItem. They will
432 all be added after the formatting is done.
433 </p>
434 <p>
435 If the option <em class="parameter"><code>tear-down</code></em> is set to
436 <code class="constant">TRUE</code>, then the block device and all its children will be
437 cleaned up before formatting. This cleanup consists of
438 removing entries from /etc/fstab and /etc/crypttab, and
439 locking of encrypted block devices. Entries in /etc/fstab and
440 /etc/crypttab that have been created with the 'track-parents'
441 options to AddConfigurationItem will be removed even if their
442 block device is currently unavailable.
443 </p>
444 <p>
445 Note that if the operation fails the block device may be left
446 in an inconsistent state. In cases of removing partition table
447 and failed operation it's advised to validate the device e.g.
448 by re-reading the partition table or force-wiping it before
449 performing further operations.
450 </p>
451 <p>
452 In case the <em class="parameter"><code>tear-down</code></em> option is not set
453 and the block device being formatted is partitioned and
454 contains mounted filesystem or an active layered structure
455 inside then the Format operation may not fail, yet could still
456 overwrite nested foreign data regions. It is the caller
457 responsibility to ensure the device is ready for destructive
458 operations. This may be subject to further restrictions
459 in the future.
460 </p>
461 <div class="variablelist"><table border="0" class="variablelist">
462 <colgroup>
463 <col align="left" valign="top">
464 <col>
465 </colgroup>
466 <tbody>
467 <tr>
468 <td><p><span class="term"><code class="literal">IN s <em class="parameter"><code>type</code></em></code>:</span></p></td>
469 <td><p>
470 The type of file system, partition table or other content to format the device with.
471 </p></td>
472 </tr>
473 <tr>
474 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
475 <td><p>
476 Options - known options (in addition to <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>) includes <em class="parameter"><code>label</code></em> (of type 's'), <em class="parameter"><code>uuid</code></em> (of type 's'), <em class="parameter"><code>take-ownership</code></em> (of type 'b'), <em class="parameter"><code>encrypt.passphrase</code></em> (of type 's' or 'ay'), <em class="parameter"><code>encrypt.type</code></em> (of type 's'), <em class="parameter"><code>encrypt.label</code></em> (of type 's'), <em class="parameter"><code>encrypt.pbkdf</code></em> (of type 's'), <em class="parameter"><code>encrypt.memory</code></em> (of type 'u'), <em class="parameter"><code>encrypt.iterations</code></em> (of type 'u'), <em class="parameter"><code>encrypt.time</code></em> (of type 'u'), <em class="parameter"><code>encrypt.threads</code></em> (of type 'u'), <em class="parameter"><code>erase</code></em> (of type 's'), <em class="parameter"><code>mkfs-args</code></em> (of type 'as'), <em class="parameter"><code>no-block</code></em> (of type 'b') and <em class="parameter"><code>update-partition-type</code></em> (of type 'b').
477 </p></td>
478 </tr>
479 </tbody>
480 </table></div>
481 </div>
482 <hr>
483 <div class="refsect2">
484 <a name="gdbus-method-org-freedesktop-UDisks2-Block.OpenForBackup"></a><h3>The OpenForBackup() method</h3>
485 <pre class="programlisting">
486 OpenForBackup (IN a{sv} options,
487 OUT h fd);
488 </pre>
489 <p>
490 Gets a read-only file descriptor for the device intended for a
491 byte-by-byte imaging of the device. This can only be done if
492 the device is not already in use.
493 </p>
494 <p>
495 <span class="emphasis"><em>This method is deprecated since 2.7.3.</em></span>
496 Use <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.OpenDevice" title="The OpenDevice() method">OpenDevice()</a> with <code class="literal">O_EXCL</code>
497 and <code class="literal">O_CLOEXEC</code> flags instead.
498 </p>
499 <div class="variablelist"><table border="0" class="variablelist">
500 <colgroup>
501 <col align="left" valign="top">
502 <col>
503 </colgroup>
504 <tbody>
505 <tr>
506 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
507 <td><p>
508 Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).
509 </p></td>
510 </tr>
511 <tr>
512 <td><p><span class="term"><code class="literal">OUT h <em class="parameter"><code>fd</code></em></code>:</span></p></td>
513 <td><p>
514 An index for the returned file descriptor.
515 </p></td>
516 </tr>
517 </tbody>
518 </table></div>
519 </div>
520 <hr>
521 <div class="refsect2">
522 <a name="gdbus-method-org-freedesktop-UDisks2-Block.OpenForRestore"></a><h3>The OpenForRestore() method</h3>
523 <pre class="programlisting">
524 OpenForRestore (IN a{sv} options,
525 OUT h fd);
526 </pre>
527 <p>
528 Gets a writable file descriptor for the device intended for a
529 byte-by-byte restore of a disk image onto the device. This can
530 only be done if the device is not already in use.
531 </p>
532 <p>
533 <span class="emphasis"><em>This method is deprecated since 2.7.3.</em></span>
534 Use <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.OpenDevice" title="The OpenDevice() method">OpenDevice()</a> with <code class="literal">O_EXCL</code>,
535 <code class="literal">O_SYNC</code> and <code class="literal">O_CLOEXEC</code> flags instead.
536 </p>
537 <div class="variablelist"><table border="0" class="variablelist">
538 <colgroup>
539 <col align="left" valign="top">
540 <col>
541 </colgroup>
542 <tbody>
543 <tr>
544 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
545 <td><p>
546 Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).
547 </p></td>
548 </tr>
549 <tr>
550 <td><p><span class="term"><code class="literal">OUT h <em class="parameter"><code>fd</code></em></code>:</span></p></td>
551 <td><p>
552 An index for the returned file descriptor.
553 </p></td>
554 </tr>
555 </tbody>
556 </table></div>
557 </div>
558 <hr>
559 <div class="refsect2">
560 <a name="gdbus-method-org-freedesktop-UDisks2-Block.OpenForBenchmark"></a><h3>The OpenForBenchmark() method</h3>
561 <pre class="programlisting">
562 OpenForBenchmark (IN a{sv} options,
563 OUT h fd);
564 </pre>
565 <p>
566 Gets a file descriptor for the device that is suitable to be
567 used for benchmarking the device (transfer rate, access time
568 etc.). Note that the file descriptor may be opened with the
569 <code class="literal">O_DIRECT</code> and <code class="literal">O_SYNC</code>
570 flags so care must be taken to only perform block-aligned I/O.
571 </p>
572 <p>
573 If the <em class="parameter"><code>writable</code></em> in <em class="parameter"><code>options</code></em> is <code class="constant">TRUE</code>
574 then the returned file descriptor will be writable. This only
575 works if the device is not already in use.
576 </p>
577 <p>
578 <span class="emphasis"><em>This method is deprecated since 2.7.3.</em></span>
579 Use <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.OpenDevice" title="The OpenDevice() method">OpenDevice()</a> with <code class="literal">O_DIRECT</code>,
580 <code class="literal">O_SYNC</code> and <code class="literal">O_CLOEXEC</code> flags instead.
581 </p>
582 <div class="variablelist"><table border="0" class="variablelist">
583 <colgroup>
584 <col align="left" valign="top">
585 <col>
586 </colgroup>
587 <tbody>
588 <tr>
589 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
590 <td><p>
591 Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).
592 </p></td>
593 </tr>
594 <tr>
595 <td><p><span class="term"><code class="literal">OUT h <em class="parameter"><code>fd</code></em></code>:</span></p></td>
596 <td><p>
597 An index for the returned file descriptor.
598 </p></td>
599 </tr>
600 </tbody>
601 </table></div>
602 </div>
603 <hr>
604 <div class="refsect2">
605 <a name="gdbus-method-org-freedesktop-UDisks2-Block.OpenDevice"></a><h3>The OpenDevice() method</h3>
606 <pre class="programlisting">
607 OpenDevice (IN s mode,
608 IN a{sv} options,
609 OUT h fd);
610 </pre>
611 <p>
612 Option <em class="parameter"><code>flags</code></em> can be used to specify additional flags.
613 See <code class="literal">man 2 open</code> for list of supported flags.
614 <code class="literal">O_RDONLY</code>, <code class="literal">O_WRONLY</code> and
615 <code class="literal">O_RDWR</code> are not allowed, use <em class="parameter"><code>mode</code></em> instead.
616 </p>
617 <p>
618 Gets a file descriptor for the device.
619 </p>
620 <div class="variablelist"><table border="0" class="variablelist">
621 <colgroup>
622 <col align="left" valign="top">
623 <col>
624 </colgroup>
625 <tbody>
626 <tr>
627 <td><p><span class="term"><code class="literal">IN s <em class="parameter"><code>mode</code></em></code>:</span></p></td>
628 <td><p>
629 Mode: "r" for read-only, "w" for write-only or "rw" for read-write
630 </p></td>
631 </tr>
632 <tr>
633 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
634 <td><p>
635 Options - known options (in addition to <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>) includes <em class="parameter"><code>flags</code></em> (of type 'i')
636 </p></td>
637 </tr>
638 <tr>
639 <td><p><span class="term"><code class="literal">OUT h <em class="parameter"><code>fd</code></em></code>:</span></p></td>
640 <td><p>
641 An index for the returned file descriptor.
642 </p></td>
643 </tr>
644 </tbody>
645 </table></div>
646 <p class="since">Since 2.7.3</p>
647 </div>
648 <hr>
649 <div class="refsect2">
650 <a name="gdbus-method-org-freedesktop-UDisks2-Block.Rescan"></a><h3>The Rescan() method</h3>
651 <pre class="programlisting">
652 Rescan (IN a{sv} options);
653 </pre>
654 <p>
655 Request that the kernel and core OS rescans the contents of
656 the device and update their state to reflect this (including
657 things such as the <code class="filename">/dev/disk/</code> hierarchy
658 of symlinks). This includes requesting that the kernel
659 re-reads the partition table, if appropriate.
660 </p>
661 <p>
662 This is usually not needed since the OS automatically does
663 this when the last process with a writable file descriptor for
664 the device closes it.
665 </p>
666 <div class="variablelist"><table border="0" class="variablelist">
667 <colgroup>
668 <col align="left" valign="top">
669 <col>
670 </colgroup>
671 <tbody><tr>
672 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
673 <td><p>
674 Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).
675 </p></td>
676 </tr></tbody>
677 </table></div>
678 </div>
679 <hr>
680 <div class="refsect2">
681 <a name="gdbus-method-org-freedesktop-UDisks2-Block.RestoreEncryptedHeader"></a><h3>The RestoreEncryptedHeader() method</h3>
682 <pre class="programlisting">
683 RestoreEncryptedHeader (IN s backup_file,
684 IN a{sv} options);
685 </pre>
686 <p>
687 Writes header and keyslots from the specified file to the specified device.
688 The specified file must exist.
689 </p>
690 <div class="variablelist"><table border="0" class="variablelist">
691 <colgroup>
692 <col align="left" valign="top">
693 <col>
694 </colgroup>
695 <tbody>
696 <tr>
697 <td><p><span class="term"><code class="literal">IN s <em class="parameter"><code>backup_file</code></em></code>:</span></p></td>
698 <td><p>
699 Path from where to backup header and keyslots.
700 </p></td>
701 </tr>
702 <tr>
703 <td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
704 <td><p>
705 Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).
706 </p></td>
707 </tr>
708 </tbody>
709 </table></div>
710 <p class="since">Since 2.11.0</p>
711 </div>
712 </div>
713 <div class="refsect1">
714 <a name="gdbus-properties-org.freedesktop.UDisks2.Block"></a><h2>Property Details</h2>
715 <div class="refsect2">
716 <a name="gdbus-property-org-freedesktop-UDisks2-Block.Device"></a><h3>The "Device" property</h3>
717 <pre class="programlisting">
718 Device readable ay
719 </pre>
720 <p>
721 The special device file for the block device e.g. <code class="filename">/dev/sda2</code>.
722 </p>
723 </div>
724 <hr>
725 <div class="refsect2">
726 <a name="gdbus-property-org-freedesktop-UDisks2-Block.PreferredDevice"></a><h3>The "PreferredDevice" property</h3>
727 <pre class="programlisting">
728 PreferredDevice readable ay
729 </pre>
730 <p>
731 </p>
732 <p>
733 The special device file to present in the UI instead of the value
734 of the <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.Device" title='The "Device" property'>"Device"</a> property.
735 </p>
736 <p>
737 For example this could be
738 e.g. <code class="filename">/dev/mapper/mpathk</code> for a multipath
739 device with special device file <code class="filename">/dev/dm-9</code>.
740 </p>
741 </div>
742 <hr>
743 <div class="refsect2">
744 <a name="gdbus-property-org-freedesktop-UDisks2-Block.Symlinks"></a><h3>The "Symlinks" property</h3>
745 <pre class="programlisting">
746 Symlinks readable aay
747 </pre>
748 <p>
749 Known symlinks in <code class="filename">/dev</code> that points to
750 the device file in the
751 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.Device" title='The "Device" property'>"Device"</a> property.
752 </p>
753 <p>
754 For example, this array could include symlinks such as
755 <code class="filename">/dev/disk/by-id/ata-INTEL_SSDSA2MH080G1GC_CVEM842101HD080DGN</code>
756 and
757 <code class="filename">/dev/disk/by-id/wwn-0x5001517387d61905</code>.
758 </p>
759 </div>
760 <hr>
761 <div class="refsect2">
762 <a name="gdbus-property-org-freedesktop-UDisks2-Block.DeviceNumber"></a><h3>The "DeviceNumber" property</h3>
763 <pre class="programlisting">
764 DeviceNumber readable t
765 </pre>
766 <p>
767 The dev_t of the block device.
768 </p>
769 </div>
770 <hr>
771 <div class="refsect2">
772 <a name="gdbus-property-org-freedesktop-UDisks2-Block.Id"></a><h3>The "Id" property</h3>
773 <pre class="programlisting">
774 Id readable s
775 </pre>
776 <p>
777 </p>
778 <p>
779 <em class="parameter"><code>since</code></em>: 2.0.0
780 A unique and persistent identifier for the device or blank if
781 no such identifier is available.
782 </p>
783 <p>
784 For devices with fixed media, this identifier is derived from
785 vital product data / UUIDs / serial numbers of the drive or
786 construct (e.g. LVM or MD-RAID) the block device is part
787 of. For devices with removable media, this identifier is
788 derived from the medium currently inserted.
789 </p>
790 <p>
791 This identifier is guaranteed to not include the slash
792 character '/' (U+002F SOLIDUS) which means it can be used as
793 a filename.
794 </p>
795 <p>
796 Examples:
797 <span class="quote">“<span class="quote">by-id-ata-INTEL_SSDSA2MH080G1GC_CVEM842101HD080DGN</span>”</span>,
798 <span class="quote">“<span class="quote">by-id-ata-ST1000LM024_HN-M101MBB_S2TBJA0C230233-part3</span>”</span>,
799 <span class="quote">“<span class="quote">by-id-usb-Kingston_DataTraveler_2.0_0013729940C4F9A166250D3E-0:0</span>”</span>,
800 <span class="quote">“<span class="quote">by-id-dm-name-luks-6d81fe85-26b1-4f8b-b834-405454c1cd46</span>”</span>,
801 <span class="quote">“<span class="quote">by-id-dm-name-vg_thinkpad-lv_swap</span>”</span>,
802 <span class="quote">“<span class="quote">by-label-HARRY_POTTER_SORCERERS_STONE-</span>”</span>,
803 <span class="quote">“<span class="quote">by-uuid-D22D-08B8</span>”</span>.
804 </p>
805 </div>
806 <hr>
807 <div class="refsect2">
808 <a name="gdbus-property-org-freedesktop-UDisks2-Block.Size"></a><h3>The "Size" property</h3>
809 <pre class="programlisting">
810 Size readable t
811 </pre>
812 <p>
813 The size of the block device.
814 </p>
815 </div>
816 <hr>
817 <div class="refsect2">
818 <a name="gdbus-property-org-freedesktop-UDisks2-Block.ReadOnly"></a><h3>The "ReadOnly" property</h3>
819 <pre class="programlisting">
820 ReadOnly readable b
821 </pre>
822 <p>
823 If <code class="constant">TRUE</code>, the device can not be written to, only read from.
824 </p>
825 </div>
826 <hr>
827 <div class="refsect2">
828 <a name="gdbus-property-org-freedesktop-UDisks2-Block.Drive"></a><h3>The "Drive" property</h3>
829 <pre class="programlisting">
830 Drive readable o
831 </pre>
832 <p>
833 </p>
834 <p>
835 The <a class="link" href="gdbus-org.freedesktop.UDisks2.Drive.html#gdbus-interface-org-freedesktop-UDisks2-Drive.top_of_page">org.freedesktop.UDisks2.Drive</a> object that the block device
836 belongs to, or '/' if no such object exists.
837 </p>
838 </div>
839 <hr>
840 <div class="refsect2">
841 <a name="gdbus-property-org-freedesktop-UDisks2-Block.MDRaid"></a><h3>The "MDRaid" property</h3>
842 <pre class="programlisting">
843 MDRaid readable o
844 </pre>
845 <p>
846 </p>
847 <p>
848 <em class="parameter"><code>since</code></em>: 2.0.0
849 If the block device is a running MD-RAID array, this is set
850 to the <a class="link" href="gdbus-org.freedesktop.UDisks2.MDRaid.html#gdbus-interface-org-freedesktop-UDisks2-MDRaid.top_of_page">org.freedesktop.UDisks2.MDRaid</a> object that it
851 correspond to. Is '/' if no such object exists.
852 </p>
853 </div>
854 <hr>
855 <div class="refsect2">
856 <a name="gdbus-property-org-freedesktop-UDisks2-Block.MDRaidMember"></a><h3>The "MDRaidMember" property</h3>
857 <pre class="programlisting">
858 MDRaidMember readable o
859 </pre>
860 <p>
861 </p>
862 <p>
863 <em class="parameter"><code>since</code></em>: 2.0.0
864 If the block device is a member of a MD-RAID array, this
865 is set to the <a class="link" href="gdbus-org.freedesktop.UDisks2.MDRaid.html#gdbus-interface-org-freedesktop-UDisks2-MDRaid.top_of_page">org.freedesktop.UDisks2.MDRaid</a> object that it
866 correspond to. Is '/' if no such object exists.
867 </p>
868 </div>
869 <hr>
870 <div class="refsect2">
871 <a name="gdbus-property-org-freedesktop-UDisks2-Block.IdUsage"></a><h3>The "IdUsage" property</h3>
872 <pre class="programlisting">
873 IdUsage readable s
874 </pre>
875 <p>
876 </p>
877 <p>
878 A result of probing for signatures on the block device. Known values include:
879 </p>
880 <div class="variablelist"><table border="0" class="variablelist">
881 <colgroup>
882 <col align="left" valign="top">
883 <col>
884 </colgroup>
885 <tbody>
886 <tr>
887 <td><p><span class="term">filesystem</span></p></td>
888 <td><p>Used for mountable filesystems</p></td>
889 </tr>
890 <tr>
891 <td><p><span class="term">crypto</span></p></td>
892 <td><p>Used for e.g. LUKS devices</p></td>
893 </tr>
894 <tr>
895 <td><p><span class="term">raid</span></p></td>
896 <td><p>Used for e.g. RAID members and LVM PVs</p></td>
897 </tr>
898 <tr>
899 <td><p><span class="term">other</span></p></td>
900 <td><p>Something else was detected.</p></td>
901 </tr>
902 </tbody>
903 </table></div>
904 <p>
905 If blank, no known signature was detected. This doesn't
906 necessarily mean the device contains no structured data; it
907 only means that no signature known to the probing code was
908 detected.
909 </p>
910 <p>
911 Applications should not rely on the value in this or the
912 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.IdType" title='The "IdType" property'>"IdType"</a> property - instead,
913 applications should check for whether the object in question
914 implements interfaces such as
915 e.g. <a class="link" href="gdbus-org.freedesktop.UDisks2.Filesystem.html#gdbus-interface-org-freedesktop-UDisks2-Filesystem.top_of_page">org.freedesktop.UDisks2.Filesystem</a>,
916 <a class="link" href="gdbus-org.freedesktop.UDisks2.Swapspace.html#gdbus-interface-org-freedesktop-UDisks2-Swapspace.top_of_page">org.freedesktop.UDisks2.Swapspace</a> or
917 <a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-interface-org-freedesktop-UDisks2-Encrypted.top_of_page">org.freedesktop.UDisks2.Encrypted</a>.
918 </p>
919 </div>
920 <hr>
921 <div class="refsect2">
922 <a name="gdbus-property-org-freedesktop-UDisks2-Block.IdType"></a><h3>The "IdType" property</h3>
923 <pre class="programlisting">
924 IdType readable s
925 </pre>
926 <p>
927 </p>
928 <p>
929 This property contains more information about the result of
930 probing the block device. Its value depends of the value the
931 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.IdUsage" title='The "IdUsage" property'>"IdUsage"</a> property:
932 </p>
933 <div class="variablelist"><table border="0" class="variablelist">
934 <colgroup>
935 <col align="left" valign="top">
936 <col>
937 </colgroup>
938 <tbody>
939 <tr>
940 <td><p><span class="term">filesystem</span></p></td>
941 <td><p>The mountable file system that was detected (e.g. <code class="literal">vfat</code>).</p></td>
942 </tr>
943 <tr>
944 <td><p><span class="term">crypto</span></p></td>
945 <td><p>Encrypted data. Known values include <code class="literal">crypto_LUKS</code>.</p></td>
946 </tr>
947 <tr>
948 <td><p><span class="term">raid</span></p></td>
949 <td><p><a class="ulink" href="http://en.wikipedia.org/wiki/RAID" target="_top">RAID</a> or similar. Known values include <code class="literal">LVM2_member</code> (for LVM2 components), <code class="literal">linux_raid_member</code> (for MD-RAID components.)</p></td>
950 </tr>
951 <tr>
952 <td><p><span class="term">other</span></p></td>
953 <td><p>Something else. Known values include <code class="literal">swap</code> (for swap space), <code class="literal">suspend</code> (data used when resuming from suspend-to-disk).</p></td>
954 </tr>
955 </tbody>
956 </table></div>
957 <p>
958 See the note for the <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.IdUsage" title='The "IdUsage" property'>"IdUsage"</a> property about usage.
959 </p>
960 </div>
961 <hr>
962 <div class="refsect2">
963 <a name="gdbus-property-org-freedesktop-UDisks2-Block.IdVersion"></a><h3>The "IdVersion" property</h3>
964 <pre class="programlisting">
965 IdVersion readable s
966 </pre>
967 <p>
968 </p>
969 <p>
970 The version of the filesystem or other structured data on the block device.
971 Do not make any assumptions about the format.
972 </p>
973 <p>
974 This property is blank if there is no version or the version is unknown.
975 </p>
976 </div>
977 <hr>
978 <div class="refsect2">
979 <a name="gdbus-property-org-freedesktop-UDisks2-Block.IdLabel"></a><h3>The "IdLabel" property</h3>
980 <pre class="programlisting">
981 IdLabel readable s
982 </pre>
983 <p>
984 </p>
985 <p>
986 The label of the filesystem or other structured data on the block device.
987 </p>
988 <p>
989 This property is blank if there is no label or the label is unknown.
990 </p>
991 </div>
992 <hr>
993 <div class="refsect2">
994 <a name="gdbus-property-org-freedesktop-UDisks2-Block.IdUUID"></a><h3>The "IdUUID" property</h3>
995 <pre class="programlisting">
996 IdUUID readable s
997 </pre>
998 <p>
999 </p>
1000 <p>
1001 The <a class="ulink" href="http://en.wikipedia.org/wiki/UUID" target="_top">UUID</a> of the
1002 filesystem or other structured data on the block device. Do not make
1003 any assumptions about the UUID as its format depends on what kind of
1004 data is on the device.
1005 </p>
1006 <p>
1007 This property is blank if there is no UUID or the UUID is unknown.
1008 </p>
1009 </div>
1010 <hr>
1011 <div class="refsect2">
1012 <a name="gdbus-property-org-freedesktop-UDisks2-Block.Configuration"></a><h3>The "Configuration" property</h3>
1013 <pre class="programlisting">
1014 Configuration readable a(sa{sv})
1015 </pre>
1016 <p>
1017 </p>
1018 <p>
1019 The configuration for the device.
1020 </p>
1021 <p>
1022 This is an array of pairs of (<em class="parameter"><code>type</code></em>, <em class="parameter"><code>details</code></em>) where <em class="parameter"><code>type</code></em> is
1023 a string identifying the configuration source
1024 (e.g. <code class="literal">fstab</code>) and <em class="parameter"><code>details</code></em> contains the
1025 actual configuration data.
1026 </p>
1027 <p>
1028 Use the
1029 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.AddConfigurationItem" title="The AddConfigurationItem() method">AddConfigurationItem()</a>,
1030 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.RemoveConfigurationItem" title="The RemoveConfigurationItem() method">RemoveConfigurationItem()</a>
1031 and
1032 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.UpdateConfigurationItem" title="The UpdateConfigurationItem() method">UpdateConfigurationItem()</a>
1033 methods to add, remove and update configuration items.
1034 </p>
1035 <p>
1036 Use
1037 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.GetSecretConfiguration" title="The GetSecretConfiguration() method">GetSecretConfiguration()</a>
1038 to get the secrets (e.g. passphrases) that may be part of the
1039 configuration but isn't exported in this property for
1040 security reasons.
1041 </p>
1042 <p>
1043 For entries of type <code class="literal">fstab</code>, it means that
1044 the block device is referenced in the system-wide
1045 <code class="filename">/etc/fstab</code> file. Known configuration
1046 items for type <code class="literal">fstab</code> are
1047 </p>
1048 <div class="variablelist"><table border="0" class="variablelist">
1049 <colgroup>
1050 <col align="left" valign="top">
1051 <col>
1052 </colgroup>
1053 <tbody>
1054 <tr>
1055 <td><p><span class="term">fsname (type <code class="literal">'ay'</code>)</span></p></td>
1056 <td><p>The special device</p></td>
1057 </tr>
1058 <tr>
1059 <td><p><span class="term">dir (type <code class="literal">'ay'</code>)</span></p></td>
1060 <td><p>The mount point</p></td>
1061 </tr>
1062 <tr>
1063 <td><p><span class="term">type (type <code class="literal">'ay'</code>)</span></p></td>
1064 <td><p>The filesystem type</p></td>
1065 </tr>
1066 <tr>
1067 <td><p><span class="term">opts (type <code class="literal">'ay'</code>)</span></p></td>
1068 <td><p>Options</p></td>
1069 </tr>
1070 <tr>
1071 <td><p><span class="term">freq (type <code class="literal">'i'</code>)</span></p></td>
1072 <td><p>Dump frequency in days</p></td>
1073 </tr>
1074 <tr>
1075 <td><p><span class="term">passno (type <code class="literal">'i'</code>)</span></p></td>
1076 <td><p>Pass number of parallel fsck</p></td>
1077 </tr>
1078 </tbody>
1079 </table></div>
1080 <p>
1081 </p>
1082 <p>
1083 For entries of type <code class="literal">crypttab</code>, it means that
1084 the block device is referenced in the system-wide
1085 <code class="filename">/etc/crypttab</code> file. Known configuration
1086 items for type <code class="literal">crypttab</code> are
1087 </p>
1088 <div class="variablelist"><table border="0" class="variablelist">
1089 <colgroup>
1090 <col align="left" valign="top">
1091 <col>
1092 </colgroup>
1093 <tbody>
1094 <tr>
1095 <td><p><span class="term">name (type <code class="literal">'ay'</code>)</span></p></td>
1096 <td><p>The name to set the device up as</p></td>
1097 </tr>
1098 <tr>
1099 <td><p><span class="term">device (type <code class="literal">'ay'</code>)</span></p></td>
1100 <td><p>The special device</p></td>
1101 </tr>
1102 <tr>
1103 <td><p><span class="term">passphrase-path (type <code class="literal">'ay'</code>)</span></p></td>
1104 <td><p>Either empty to specify that no password is set,
1105 otherwise a path to a file containing the encryption password.
1106 This may also point to a special device file in <code class="filename">/dev</code>
1107 such as <code class="literal">/dev/random</code>.
1108 </p></td>
1109 </tr>
1110 <tr>
1111 <td><p><span class="term">passphrase-contents (type <code class="literal">'ay'</code>)</span></p></td>
1112 <td><p>The contents of the file containing the encryption password, if applicable.
1113 This is only available via the <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.GetSecretConfiguration" title="The GetSecretConfiguration() method">GetSecretConfiguration()</a>
1114 method.</p></td>
1115 </tr>
1116 <tr>
1117 <td><p><span class="term">options (type <code class="literal">'ay'</code>)</span></p></td>
1118 <td><p>Options</p></td>
1119 </tr>
1120 </tbody>
1121 </table></div>
1122 <p>
1123 For security reasons, when creating a new
1124 <code class="literal">crypttab</code> entry (via the
1125 <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.AddConfigurationItem" title="The AddConfigurationItem() method">AddConfigurationItem()</a>
1126 method), then the <code class="option">passphrase-path</code> must
1127 reference an unexisting file in the
1128 <code class="filename">/etc/luks-keys</code> directory.
1129 </p>
1130 </div>
1131 <hr>
1132 <div class="refsect2">
1133 <a name="gdbus-property-org-freedesktop-UDisks2-Block.CryptoBackingDevice"></a><h3>The "CryptoBackingDevice" property</h3>
1134 <pre class="programlisting">
1135 CryptoBackingDevice readable o
1136 </pre>
1137 <p>
1138 </p>
1139 <p>
1140 The <a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-interface-org-freedesktop-UDisks2-Block.top_of_page">org.freedesktop.UDisks2.Block</a> object that is
1141 backing the device or <code class="literal">/</code> if unknown or if
1142 the block device is not the cleartext device for an encrypted
1143 device.
1144 </p>
1145 </div>
1146 <hr>
1147 <div class="refsect2">
1148 <a name="gdbus-property-org-freedesktop-UDisks2-Block.HintPartitionable"></a><h3>The "HintPartitionable" property</h3>
1149 <pre class="programlisting">
1150 HintPartitionable readable b
1151 </pre>
1152 <p>
1153 </p>
1154 <p>
1155 If <code class="constant">TRUE</code>, the device is normally expected to be
1156 partitionable. Devices for which this is not the case include
1157 floppy drives, optical drives and LVM logical volumes.
1158 </p>
1159 </div>
1160 <hr>
1161 <div class="refsect2">
1162 <a name="gdbus-property-org-freedesktop-UDisks2-Block.HintSystem"></a><h3>The "HintSystem" property</h3>
1163 <pre class="programlisting">
1164 HintSystem readable b
1165 </pre>
1166 <p>
1167 If <code class="constant">TRUE</code>, the device is considered a <span class="emphasis"><em>system device</em></span>.
1168 </p>
1169 <p>
1170 System devices are devices that require additional permissions to access.
1171 </p>
1172 <p>
1173 See <a class="xref" href="udisks.8.html" title="udisks"><span class="refentrytitle">udisks</span>(8)</a> for how to influence the value of this property.
1174 </p>
1175 </div>
1176 <hr>
1177 <div class="refsect2">
1178 <a name="gdbus-property-org-freedesktop-UDisks2-Block.HintIgnore"></a><h3>The "HintIgnore" property</h3>
1179 <pre class="programlisting">
1180 HintIgnore readable b
1181 </pre>
1182 <p>
1183 If <code class="constant">TRUE</code>, the device should be hidden from users.
1184 See <a class="xref" href="udisks.8.html" title="udisks"><span class="refentrytitle">udisks</span>(8)</a> for how to influence the value of this property.
1185 </p>
1186 </div>
1187 <hr>
1188 <div class="refsect2">
1189 <a name="gdbus-property-org-freedesktop-UDisks2-Block.HintAuto"></a><h3>The "HintAuto" property</h3>
1190 <pre class="programlisting">
1191 HintAuto readable b
1192 </pre>
1193 <p>
1194 If <code class="constant">TRUE</code>, the device should be automatically started (e.g. mounted, unlocked etc.).
1195 See <a class="xref" href="udisks.8.html" title="udisks"><span class="refentrytitle">udisks</span>(8)</a> for how to influence the value of this property.
1196 </p>
1197 </div>
1198 <hr>
1199 <div class="refsect2">
1200 <a name="gdbus-property-org-freedesktop-UDisks2-Block.HintName"></a><h3>The "HintName" property</h3>
1201 <pre class="programlisting">
1202 HintName readable s
1203 </pre>
1204 <p>
1205 If not blank, the name to use when presenting the device.
1206 See <a class="xref" href="udisks.8.html" title="udisks"><span class="refentrytitle">udisks</span>(8)</a> for how to influence the value of this property.
1207 </p>
1208 </div>
1209 <hr>
1210 <div class="refsect2">
1211 <a name="gdbus-property-org-freedesktop-UDisks2-Block.HintIconName"></a><h3>The "HintIconName" property</h3>
1212 <pre class="programlisting">
1213 HintIconName readable s
1214 </pre>
1215 <p>
1216 If not blank, the icon name to use when presenting the device.
1217 </p>
1218 <p>
1219 The name must adhere to the
1220 <a class="ulink" href="http://www.freedesktop.org/wiki/Specifications/icon-theme-spec" target="_top">freedesktop.org icon theme specification</a>.
1221 </p>
1222 <p>
1223 See <a class="xref" href="udisks.8.html" title="udisks"><span class="refentrytitle">udisks</span>(8)</a> for how to influence the value of this property.
1224 </p>
1225 </div>
1226 <hr>
1227 <div class="refsect2">
1228 <a name="gdbus-property-org-freedesktop-UDisks2-Block.HintSymbolicIconName"></a><h3>The "HintSymbolicIconName" property</h3>
1229 <pre class="programlisting">
1230 HintSymbolicIconName readable s
1231 </pre>
1232 <p>
1233 </p>
1234 <p>
1235 <em class="parameter"><code>since</code></em>: 2.0.0
1236 If not blank, the icon name to use when presenting the device using a symbolic icon.
1237 </p>
1238 <p>
1239 The name must adhere to the
1240 <a class="ulink" href="http://www.freedesktop.org/wiki/Specifications/icon-theme-spec" target="_top">freedesktop.org icon theme specification</a>.
1241 </p>
1242 <p>
1243 See <a class="xref" href="udisks.8.html" title="udisks"><span class="refentrytitle">udisks</span>(8)</a> for how to influence the value of this property.
1244 </p>
1245 </div>
1246 <hr>
1247 <div class="refsect2">
1248 <a name="gdbus-property-org-freedesktop-UDisks2-Block.UserspaceMountOptions"></a><h3>The "UserspaceMountOptions" property</h3>
1249 <pre class="programlisting">
1250 UserspaceMountOptions readable as
1251 </pre>
1252 <p>
1253 List of userspace mount options.
1254 </p>
1255 </div>
1256 </div>
1257 </div>
1258 <div class="footer">
1259 <hr>Generated by GTK-Doc V1.35.1</div>
1260 </body>
1261 </html>