1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>UDisks Reference Manual: org.freedesktop.UDisks2.Block</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
<link rel="home" href="index.html" title="UDisks Reference Manual">
8
<link rel="up" href="ch02.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.20 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
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="10"><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>
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="ch02.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>
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>
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>
33
<td class="gallery_image" valign="top" align="right"></td>
35
<div class="refsynopsisdiv">
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,
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,
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,
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,
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,
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,
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,
55
<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);
58
<div class="refsect1">
59
<a name="id-1.3.3.6.4"></a><h2>Properties</h2>
60
<pre class="synopsis">
61
<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
62
<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
63
<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
64
<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
65
<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
66
<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
67
<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
68
<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
69
<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
70
<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
71
<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
72
<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
73
<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
74
<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
75
<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
76
<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})
77
<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
78
<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
79
<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
80
<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
81
<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
82
<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
83
<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
84
<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
87
<div class="refsect1">
88
<a name="gdbus-interface-org-freedesktop-UDisks2-Block"></a><h2>Description</h2>
89
<p> This interface represents a block device.
91
<p> This should not be confused with the
92
<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
93
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>
94
interface is also used for block devices that do not correspond to
95
drives at all (e.g. <a class="ulink" href="http://en.wikipedia.org/wiki/Loop_device" target="_top">Loop
99
<div class="refsect1">
100
<a name="gdbus-methods-org.freedesktop.UDisks2.Block"></a><h2>Method Details</h2>
101
<div class="refsect2">
102
<a name="gdbus-method-org-freedesktop-UDisks2-Block.AddConfigurationItem"></a><h3>The AddConfigurationItem() method</h3>
103
<pre class="programlisting">
104
AddConfigurationItem (IN (sa{sv}) item,
107
<p> Adds a new configuration item.
109
<p> 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>
110
property for details about valid configuration items.
112
<div class="variablelist"><table border="0" class="variablelist">
114
<col align="left" valign="top">
119
<td><p><span class="term"><code class="literal">IN (sa{sv}) <em class="parameter"><code>item</code></em></code>:</span></p></td>
120
<td><p>The configuration item to add.</p></td>
123
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
124
<td><p>Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).</p></td>
130
<div class="refsect2">
131
<a name="gdbus-method-org-freedesktop-UDisks2-Block.RemoveConfigurationItem"></a><h3>The RemoveConfigurationItem() method</h3>
132
<pre class="programlisting">
133
RemoveConfigurationItem (IN (sa{sv}) item,
136
<p> Removes an existing configuration item.
138
<p> 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>
139
property for details about valid configuration items.
141
<div class="variablelist"><table border="0" class="variablelist">
143
<col align="left" valign="top">
148
<td><p><span class="term"><code class="literal">IN (sa{sv}) <em class="parameter"><code>item</code></em></code>:</span></p></td>
149
<td><p>The configuration item to remove.</p></td>
152
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
153
<td><p>Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).</p></td>
159
<div class="refsect2">
160
<a name="gdbus-method-org-freedesktop-UDisks2-Block.UpdateConfigurationItem"></a><h3>The UpdateConfigurationItem() method</h3>
161
<pre class="programlisting">
162
UpdateConfigurationItem (IN (sa{sv}) old_item,
163
IN (sa{sv}) new_item,
166
<p> Removes a configuration item and adds a new one. This is
167
equivalent to calling
168
<a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.RemoveConfigurationItem" title="The RemoveConfigurationItem() method">RemoveConfigurationItem()</a>
170
<a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.AddConfigurationItem" title="The AddConfigurationItem() method">AddConfigurationItem()</a>
171
with the change that only one PolicyKit check is made
172
and that <em class="parameter"><code>new_item</code></em> can be validated against <em class="parameter"><code>old_item</code></em>.
174
<p> 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>
175
property for details about valid configuration items.
177
<div class="variablelist"><table border="0" class="variablelist">
179
<col align="left" valign="top">
184
<td><p><span class="term"><code class="literal">IN (sa{sv}) <em class="parameter"><code>old_item</code></em></code>:</span></p></td>
185
<td><p>The configuration item to remove.</p></td>
188
<td><p><span class="term"><code class="literal">IN (sa{sv}) <em class="parameter"><code>new_item</code></em></code>:</span></p></td>
189
<td><p>The configuration item to add. Must be of the same type as <em class="parameter"><code>old_item</code></em>.</p></td>
192
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
193
<td><p>Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).</p></td>
199
<div class="refsect2">
200
<a name="gdbus-method-org-freedesktop-UDisks2-Block.GetSecretConfiguration"></a><h3>The GetSecretConfiguration() method</h3>
201
<pre class="programlisting">
202
GetSecretConfiguration (IN a{sv} options,
203
OUT a(sa{sv}) configuration);
205
<p> Returns the same value as in the
206
<a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.Configuration" title='The "Configuration" property'>"Configuration"</a> property
207
but without secret information filtered out.
209
<div class="variablelist"><table border="0" class="variablelist">
211
<col align="left" valign="top">
216
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
217
<td><p>Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).</p></td>
220
<td><p><span class="term"><code class="literal">OUT a(sa{sv}) <em class="parameter"><code>configuration</code></em></code>:</span></p></td>
221
<td><p>The resulting configuration.</p></td>
227
<div class="refsect2">
228
<a name="gdbus-method-org-freedesktop-UDisks2-Block.Format"></a><h3>The Format() method</h3>
229
<pre class="programlisting">
233
<p> Formats the device with a file system, partition table or
234
other well-known content.
236
<p> Known values for <em class="parameter"><code>type</code></em> includes <code class="constant">empty</code> (to
237
just zero out areas of the device known to host file system
238
signatures) and <code class="constant">swap</code> (Linux swap space)
239
and most file systems supported by the <span class="citerefentry"><span class="refentrytitle">mkfs</span>(8)</span>
240
program through its <code class="option">-t</code> option.
242
<p> Known partition table formats includes
243
<code class="constant">dos</code> and <code class="constant">gpt</code>.
245
<p> If <em class="parameter"><code>type</code></em> supports it, you can specify a label with the
246
<em class="parameter"><code>label</code></em> option in the <em class="parameter"><code>options</code></em> parameter;
247
however, note that this may not be supported on all file
248
systems and, if supported, the maximum allowed length may
251
<p> If the file system in question supports owners and the option
252
<em class="parameter"><code>take-ownership</code></em> is set to <code class="constant">TRUE</code> then the
253
root directory of the created file system will be owned by the
254
caller of this method.
256
<p> If the option <em class="parameter"><code>encrypt.passphrase</code></em> is
257
given then a LUKS device is created with the given passphrase
258
and the file system is created on the unlocked device. The
259
unlocked device will be left open.
261
<p> If the option <em class="parameter"><code>erase</code></em> is used then the
262
underlying device will be erased. Valid values include
263
<span class="quote">“<span class="quote">zero</span>”</span> to write zeroes over the entire device
264
before formatting, <span class="quote">“<span class="quote">ata-secure-erase</span>”</span> to perform
265
a secure erase or <span class="quote">“<span class="quote">ata-secure-erase-enhanced</span>”</span> to
266
perform an enhanced secure erase.
268
<p> If the option <em class="parameter"><code>update-partition-type</code></em> is
269
set to <code class="constant">TRUE</code> and the object in question is a partition, then
270
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>
271
property) will be set to the <span class="emphasis"><em>natural</em></span>
272
partition type matching <em class="parameter"><code>type</code></em>, if any. For example, if
273
formatting a GPT partition with a FAT filesystem, the
274
<span class="quote">“<span class="quote">Microsoft Basic Data</span>”</span> partition type will be
275
chosen; similar, if formatting a DOS partition with a Ext4
276
filesystem then partition type 0x83 is chosen.
278
<p> If the option <em class="parameter"><code>no-block</code></em> is set to <code class="constant">TRUE</code>
279
then the method returns just before the actual formatting
280
takes place but after authorization and other checks are
281
done. This is useful for applications that want to format
282
several devices in parallel.
284
<div class="variablelist"><table border="0" class="variablelist">
286
<col align="left" valign="top">
291
<td><p><span class="term"><code class="literal">IN s <em class="parameter"><code>type</code></em></code>:</span></p></td>
292
<td><p>The type of file system, partition table or other content to format the device with.</p></td>
295
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
296
<td><p>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>take-ownership</code></em> (of type 'b'), <em class="parameter"><code>encrypt.passphrase</code></em> (of type 's'), <em class="parameter"><code>erase</code></em> (of type 's'), <em class="parameter"><code>no-block</code></em> (of type 'b') and <em class="parameter"><code>update-partition-type</code></em> (of type 'b').</p></td>
302
<div class="refsect2">
303
<a name="gdbus-method-org-freedesktop-UDisks2-Block.OpenForBackup"></a><h3>The OpenForBackup() method</h3>
304
<pre class="programlisting">
305
OpenForBackup (IN a{sv} options,
308
<p> Gets a read-only file descriptor for the device intended for a
309
byte-by-byte imaging of the device. This can only be done if
310
the device is not already in use.
312
<div class="variablelist"><table border="0" class="variablelist">
314
<col align="left" valign="top">
319
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
320
<td><p>Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).</p></td>
323
<td><p><span class="term"><code class="literal">OUT h <em class="parameter"><code>fd</code></em></code>:</span></p></td>
324
<td><p>An index for the returned file descriptor.</p></td>
330
<div class="refsect2">
331
<a name="gdbus-method-org-freedesktop-UDisks2-Block.OpenForRestore"></a><h3>The OpenForRestore() method</h3>
332
<pre class="programlisting">
333
OpenForRestore (IN a{sv} options,
336
<p> Gets a writable file descriptor for the device intended for a
337
byte-by-byte restore of a disk image onto the device. This can
338
only be done if the device is not already in use.
340
<div class="variablelist"><table border="0" class="variablelist">
342
<col align="left" valign="top">
347
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
348
<td><p>Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).</p></td>
351
<td><p><span class="term"><code class="literal">OUT h <em class="parameter"><code>fd</code></em></code>:</span></p></td>
352
<td><p>An index for the returned file descriptor.</p></td>
358
<div class="refsect2">
359
<a name="gdbus-method-org-freedesktop-UDisks2-Block.OpenForBenchmark"></a><h3>The OpenForBenchmark() method</h3>
360
<pre class="programlisting">
361
OpenForBenchmark (IN a{sv} options,
364
<p> Gets a file descriptor for the device that is suitable to be
365
used for benchmarking the device (transfer rate, access time
366
etc.). Note that the file descriptor may be opened with the
367
<code class="literal">O_DIRECT</code> and <code class="literal">O_SYNC</code>
368
flags so care must be taken to only perform page-aligned I/O.
370
<p> If the <em class="parameter"><code>writable</code></em> in <em class="parameter"><code>options</code></em> is <code class="constant">TRUE</code>
371
then the returned file descriptor will be writable. This only
372
works if the device is not already in use.
374
<div class="variablelist"><table border="0" class="variablelist">
376
<col align="left" valign="top">
381
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
382
<td><p>Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).</p></td>
385
<td><p><span class="term"><code class="literal">OUT h <em class="parameter"><code>fd</code></em></code>:</span></p></td>
386
<td><p>An index for the returned file descriptor.</p></td>
392
<div class="refsect2">
393
<a name="gdbus-method-org-freedesktop-UDisks2-Block.Rescan"></a><h3>The Rescan() method</h3>
394
<pre class="programlisting">
395
Rescan (IN a{sv} options);
397
<p> Request that the kernel and core OS rescans the contents of
398
the device and update their state to reflect this (including
399
things such as the <code class="filename">/dev/disk/</code> hierarchy
400
of symlinks). This includes requesting that the kernel
401
re-reads the partition table, if appropriate.
403
<p> This is usually not needed since the OS automatically does
404
this when the last process with a writable file descriptor for
405
the device closes it.
407
<div class="variablelist"><table border="0" class="variablelist">
409
<col align="left" valign="top">
413
<td><p><span class="term"><code class="literal">IN a{sv} <em class="parameter"><code>options</code></em></code>:</span></p></td>
414
<td><p>Options (currently unused except for <a class="link" href="udisks-std-options.html" title="The options parameter">standard options</a>).</p></td>
419
<div class="refsect1">
420
<a name="gdbus-properties-org.freedesktop.UDisks2.Block"></a><h2>Property Details</h2>
421
<div class="refsect2">
422
<a name="gdbus-property-org-freedesktop-UDisks2-Block.Device"></a><h3>The "Device" property</h3>
423
<pre class="programlisting">
426
<p>The special device file for the block device e.g. <code class="filename">/dev/sda2</code>.</p>
429
<div class="refsect2">
430
<a name="gdbus-property-org-freedesktop-UDisks2-Block.PreferredDevice"></a><h3>The "PreferredDevice" property</h3>
431
<pre class="programlisting">
432
PreferredDevice readable ay
434
<p> The special device file to present in the UI instead of the value
435
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.
437
<p> For example this could be
438
e.g. <code class="filename">/dev/mapper/mpathk</code> for a multipath
439
device with special device file <code class="filename">/dev/dm-9</code>.
443
<div class="refsect2">
444
<a name="gdbus-property-org-freedesktop-UDisks2-Block.Symlinks"></a><h3>The "Symlinks" property</h3>
445
<pre class="programlisting">
446
Symlinks readable aay
448
<p> Known symlinks in <code class="filename">/dev</code> that points to
449
the device file in the
450
<a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.Device" title='The "Device" property'>"Device"</a> property.
452
<p> For example, this array could include symlinks such as
453
<code class="filename">/dev/disk/by-id/ata-INTEL_SSDSA2MH080G1GC_CVEM842101HD080DGN</code>
455
<code class="filename">/dev/disk/by-id/wwn-0x5001517387d61905</code>.
459
<div class="refsect2">
460
<a name="gdbus-property-org-freedesktop-UDisks2-Block.DeviceNumber"></a><h3>The "DeviceNumber" property</h3>
461
<pre class="programlisting">
462
DeviceNumber readable t
464
<p>The dev_t of the block device.</p>
467
<div class="refsect2">
468
<a name="gdbus-property-org-freedesktop-UDisks2-Block.Id"></a><h3>The "Id" property</h3>
469
<pre class="programlisting">
472
<p> A unique and persistent identifier for the device or blank if
473
no such identifier is available.
475
<p> For devices with fixed media, this identifier is derived from
476
vital product data / UUIDs / serial numbers of the drive or
477
construct (e.g. LVM or MD-RAID) the block device is part
478
of. For devices with removable media, this identifier is
479
derived from the medium currently inserted.
481
<p> This identifier is guaranteed to not include the slash
482
character '/' (U+002F SOLIDUS) which means it can be used as
486
<span class="quote">“<span class="quote">by-id-ata-INTEL_SSDSA2MH080G1GC_CVEM842101HD080DGN</span>”</span>,
487
<span class="quote">“<span class="quote">by-id-ata-ST1000LM024_HN-M101MBB_S2TBJA0C230233-part3</span>”</span>,
488
<span class="quote">“<span class="quote">by-id-usb-Kingston_DataTraveler_2.0_0013729940C4F9A166250D3E-0:0</span>”</span>,
489
<span class="quote">“<span class="quote">by-id-dm-name-luks-6d81fe85-26b1-4f8b-b834-405454c1cd46</span>”</span>,
490
<span class="quote">“<span class="quote">by-id-dm-name-vg_thinkpad-lv_swap</span>”</span>,
491
<span class="quote">“<span class="quote">by-label-HARRY_POTTER_SORCERERS_STONE-</span>”</span>,
492
<span class="quote">“<span class="quote">by-uuid-D22D-08B8</span>”</span>.
494
<p class="since">Since 2.1</p>
497
<div class="refsect2">
498
<a name="gdbus-property-org-freedesktop-UDisks2-Block.Size"></a><h3>The "Size" property</h3>
499
<pre class="programlisting">
502
<p>The size of the block device.</p>
505
<div class="refsect2">
506
<a name="gdbus-property-org-freedesktop-UDisks2-Block.ReadOnly"></a><h3>The "ReadOnly" property</h3>
507
<pre class="programlisting">
510
<p>If <code class="constant">TRUE</code>, the device can not be written to, only read from.</p>
513
<div class="refsect2">
514
<a name="gdbus-property-org-freedesktop-UDisks2-Block.Drive"></a><h3>The "Drive" property</h3>
515
<pre class="programlisting">
518
<p> 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
519
belongs to, or '/' if no such object exists.
523
<div class="refsect2">
524
<a name="gdbus-property-org-freedesktop-UDisks2-Block.MDRaid"></a><h3>The "MDRaid" property</h3>
525
<pre class="programlisting">
528
<p> If the block device is a running MD-RAID array, this is set
529
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
530
correspond to. Is '/' if no such object exists.
532
<p class="since">Since 2.1</p>
535
<div class="refsect2">
536
<a name="gdbus-property-org-freedesktop-UDisks2-Block.MDRaidMember"></a><h3>The "MDRaidMember" property</h3>
537
<pre class="programlisting">
538
MDRaidMember readable o
540
<p> If the block device is a member of a MD-RAID array, this
541
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
542
correspond to. Is '/' if no such object exists.
544
<p class="since">Since 2.1</p>
547
<div class="refsect2">
548
<a name="gdbus-property-org-freedesktop-UDisks2-Block.IdUsage"></a><h3>The "IdUsage" property</h3>
549
<pre class="programlisting">
552
<p> A result of probing for signatures on the block device. Known values include:
554
<div class="variablelist"><table border="0" class="variablelist">
556
<col align="left" valign="top">
561
<td><p><span class="term">filesystem</span></p></td>
562
<td><p>Used for mountable filesystems</p></td>
565
<td><p><span class="term">crypto</span></p></td>
566
<td><p>Used for e.g. LUKS devices</p></td>
569
<td><p><span class="term">raid</span></p></td>
570
<td><p>Used for e.g. RAID members and LVM PVs</p></td>
573
<td><p><span class="term">other</span></p></td>
574
<td><p>Something else was detected.</p></td>
579
If blank, no known signature was detected. This doesn't
580
necessarily mean the device contains no structured data; it
581
only means that no signature known to the probing code was
584
<p> Applications should not rely on the value in this or the
585
<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,
586
applications should check for whether the object in question
587
implements interfaces such as
588
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>,
589
<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
590
<a class="link" href="gdbus-org.freedesktop.UDisks2.Encrypted.html#gdbus-interface-org-freedesktop-UDisks2-Encrypted.top_of_page">org.freedesktop.UDisks2.Encrypted</a>.
594
<div class="refsect2">
595
<a name="gdbus-property-org-freedesktop-UDisks2-Block.IdType"></a><h3>The "IdType" property</h3>
596
<pre class="programlisting">
599
<p> This property contains more information about the result of
600
probing the block device. Its value depends of the value the
601
<a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-property-org-freedesktop-UDisks2-Block.IdUsage" title='The "IdUsage" property'>"IdUsage"</a> property:
603
<div class="variablelist"><table border="0" class="variablelist">
605
<col align="left" valign="top">
610
<td><p><span class="term">filesystem</span></p></td>
611
<td><p>The mountable file system that was detected (e.g. <code class="literal">vfat</code>).</p></td>
614
<td><p><span class="term">crypto</span></p></td>
615
<td><p>Encrypted data. Known values include <code class="literal">crypto_LUKS</code>.</p></td>
618
<td><p><span class="term">raid</span></p></td>
619
<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>
622
<td><p><span class="term">other</span></p></td>
623
<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>
628
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.
632
<div class="refsect2">
633
<a name="gdbus-property-org-freedesktop-UDisks2-Block.IdVersion"></a><h3>The "IdVersion" property</h3>
634
<pre class="programlisting">
637
<p> The version of the filesystem or other structured data on the block device.
638
Do not make any assumptions about the format.
640
<p> This property is blank if there is no version or the version is unknown.
644
<div class="refsect2">
645
<a name="gdbus-property-org-freedesktop-UDisks2-Block.IdLabel"></a><h3>The "IdLabel" property</h3>
646
<pre class="programlisting">
649
<p> The label of the filesystem or other structured data on the block device.
651
<p> This property is blank if there is no label or the label is unknown.
655
<div class="refsect2">
656
<a name="gdbus-property-org-freedesktop-UDisks2-Block.IdUUID"></a><h3>The "IdUUID" property</h3>
657
<pre class="programlisting">
660
<p> The <a class="ulink" href="http://en.wikipedia.org/wiki/UUID" target="_top">UUID</a> of the
661
filesystem or other structured data on the block device. Do not make
662
any assumptions about the UUID as its format depends on what kind of
663
data is on the device.
665
<p> This property is blank if there is no UUID or the UUID is unknown.
669
<div class="refsect2">
670
<a name="gdbus-property-org-freedesktop-UDisks2-Block.Configuration"></a><h3>The "Configuration" property</h3>
671
<pre class="programlisting">
672
Configuration readable a(sa{sv})
674
<p> The configuration for the device.
676
<p> 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
677
a string identifying the configuration source
678
(e.g. <code class="literal">fstab</code>) and <em class="parameter"><code>details</code></em> contains the
679
actual configuration data.
682
<a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.AddConfigurationItem" title="The AddConfigurationItem() method">AddConfigurationItem()</a>,
683
<a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.RemoveConfigurationItem" title="The RemoveConfigurationItem() method">RemoveConfigurationItem()</a>
685
<a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.UpdateConfigurationItem" title="The UpdateConfigurationItem() method">UpdateConfigurationItem()</a>
686
methods to add, remove and update configuration items.
689
<a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.GetSecretConfiguration" title="The GetSecretConfiguration() method">GetSecretConfiguration()</a>
690
to get the secrets (e.g. passphrases) that may be part of the
691
configuration but isn't exported in this property for
694
<p> For entries of type <code class="literal">fstab</code>, it means that
695
the block device is referenced in the system-wide
696
<code class="filename">/etc/fstab</code> file. Known configuration
697
items for type <code class="literal">fstab</code> are
699
<div class="variablelist"><table border="0" class="variablelist">
701
<col align="left" valign="top">
706
<td><p><span class="term">fsname (type <code class="literal">'ay'</code>)</span></p></td>
707
<td><p>The special device</p></td>
710
<td><p><span class="term">dir (type <code class="literal">'ay'</code>)</span></p></td>
711
<td><p>The mount point</p></td>
714
<td><p><span class="term">type (type <code class="literal">'ay'</code>)</span></p></td>
715
<td><p>The filesystem type</p></td>
718
<td><p><span class="term">opts (type <code class="literal">'ay'</code>)</span></p></td>
719
<td><p>Options</p></td>
722
<td><p><span class="term">freq (type <code class="literal">'i'</code>)</span></p></td>
723
<td><p>Dump frequency in days</p></td>
726
<td><p><span class="term">passno (type <code class="literal">'i'</code>)</span></p></td>
727
<td><p>Pass number of parallel fsck</p></td>
733
<p> For entries of type <code class="literal">crypttab</code>, it means that
734
the block device is referenced in the system-wide
735
<code class="filename">/etc/crypttab</code> file. Known configuration
736
items for type <code class="literal">crypttab</code> are
738
<div class="variablelist"><table border="0" class="variablelist">
740
<col align="left" valign="top">
745
<td><p><span class="term">name (type <code class="literal">'ay'</code>)</span></p></td>
746
<td><p>The name to set the device up as</p></td>
749
<td><p><span class="term">device (type <code class="literal">'ay'</code>)</span></p></td>
750
<td><p>The special device</p></td>
753
<td><p><span class="term">passphrase-path (type <code class="literal">'ay'</code>)</span></p></td>
754
<td><p>Either empty to specify that no password is set,
755
otherwise a path to a file containing the encryption password.
756
This may also point to a special device file in <code class="filename">/dev</code>
757
such as <code class="literal">/dev/random</code>.
761
<td><p><span class="term">passphrase-contents (type <code class="literal">'ay'</code>)</span></p></td>
762
<td><p>The contents of the file containing the encryption password, if applicable.
763
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>
767
<td><p><span class="term">opts (type <code class="literal">'ay'</code>)</span></p></td>
768
<td><p>Options</p></td>
773
For security reasons, when creating a new
774
<code class="literal">crypttab</code> entry (via the
775
<a class="link" href="gdbus-org.freedesktop.UDisks2.Block.html#gdbus-method-org-freedesktop-UDisks2-Block.AddConfigurationItem" title="The AddConfigurationItem() method">AddConfigurationItem()</a>
776
method), then the <code class="option">passphrase-path</code> must
777
reference an unexisting file in the
778
<code class="filename">/etc/luks-keys</code> directory.
782
<div class="refsect2">
783
<a name="gdbus-property-org-freedesktop-UDisks2-Block.CryptoBackingDevice"></a><h3>The "CryptoBackingDevice" property</h3>
784
<pre class="programlisting">
785
CryptoBackingDevice readable o
787
<p> 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
788
backing the device or <code class="literal">/</code> if unknown or if
789
the block device is not the cleartext device for an encrypted
794
<div class="refsect2">
795
<a name="gdbus-property-org-freedesktop-UDisks2-Block.HintPartitionable"></a><h3>The "HintPartitionable" property</h3>
796
<pre class="programlisting">
797
HintPartitionable readable b
799
<p> If <code class="constant">TRUE</code>, the device is normally expected to be
800
partitionable. Devices for which this is not the case include
801
floppy drives, optical drives and LVM logical volumes.
805
<div class="refsect2">
806
<a name="gdbus-property-org-freedesktop-UDisks2-Block.HintSystem"></a><h3>The "HintSystem" property</h3>
807
<pre class="programlisting">
808
HintSystem readable b
810
<p>If <code class="constant">TRUE</code>, the device is considered a <span class="emphasis"><em>system device</em></span>.</p>
811
<p> System devices are devices that require additional permissions to access.
813
<p> 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.
817
<div class="refsect2">
818
<a name="gdbus-property-org-freedesktop-UDisks2-Block.HintIgnore"></a><h3>The "HintIgnore" property</h3>
819
<pre class="programlisting">
820
HintIgnore readable b
822
<p>If <code class="constant">TRUE</code>, the device should be hidden from users.</p>
823
<p> 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.
827
<div class="refsect2">
828
<a name="gdbus-property-org-freedesktop-UDisks2-Block.HintAuto"></a><h3>The "HintAuto" property</h3>
829
<pre class="programlisting">
832
<p>If <code class="constant">TRUE</code>, the device should be automatically started (e.g. mounted, unlocked etc.).</p>
833
<p> 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.
837
<div class="refsect2">
838
<a name="gdbus-property-org-freedesktop-UDisks2-Block.HintName"></a><h3>The "HintName" property</h3>
839
<pre class="programlisting">
842
<p>If not blank, the name to use when presenting the device.</p>
843
<p> 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.
847
<div class="refsect2">
848
<a name="gdbus-property-org-freedesktop-UDisks2-Block.HintIconName"></a><h3>The "HintIconName" property</h3>
849
<pre class="programlisting">
850
HintIconName readable s
852
<p>If not blank, the icon name to use when presenting the device.</p>
853
<p> The name must adhere to the
854
<a class="ulink" href="http://www.freedesktop.org/wiki/Specifications/icon-theme-spec" target="_top">freedesktop.org icon theme specification</a>.
856
<p> 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.
860
<div class="refsect2">
861
<a name="gdbus-property-org-freedesktop-UDisks2-Block.HintSymbolicIconName"></a><h3>The "HintSymbolicIconName" property</h3>
862
<pre class="programlisting">
863
HintSymbolicIconName readable s
865
<p> If not blank, the icon name to use when presenting the device using a symbolic icon.
867
<p> The name must adhere to the
868
<a class="ulink" href="http://www.freedesktop.org/wiki/Specifications/icon-theme-spec" target="_top">freedesktop.org icon theme specification</a>.
870
<p> 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.
872
<p class="since">Since 2.1</p>
878
Generated by GTK-Doc V1.20</div>
b'\\ No newline at end of file'