File: structfuse__opt.html

package info (click to toggle)
fuse3 3.14.0-4
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 106,436 kB
  • sloc: ansic: 21,091; cpp: 2,724; python: 963; sh: 238; javascript: 201; makefile: 65
file content (145 lines) | stat: -rw-r--r-- 7,934 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libfuse: fuse_opt Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libfuse
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">fuse_opt Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="fuse-3_813_80_2include_2fuse__opt_8h_source.html">fuse_opt.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:a49330e9bdac51625d00c0e7d49ba57ef"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfuse__opt.html#a49330e9bdac51625d00c0e7d49ba57ef">templ</a></td></tr>
<tr class="separator:a49330e9bdac51625d00c0e7d49ba57ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a333dcd849a3bd54df06084a69b5a8d39"><td class="memItemLeft" align="right" valign="top">unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfuse__opt.html#a333dcd849a3bd54df06084a69b5a8d39">offset</a></td></tr>
<tr class="separator:a333dcd849a3bd54df06084a69b5a8d39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb76339e1ce6948ad94bd2d4d5d01e20"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfuse__opt.html#aeb76339e1ce6948ad94bd2d4d5d01e20">value</a></td></tr>
<tr class="separator:aeb76339e1ce6948ad94bd2d4d5d01e20"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Option description</p>
<p>This structure describes a single option, and action associated with it, in case it matches.</p>
<p>More than one such match may occur, in which case the action for each match is executed.</p>
<p>There are three possible actions in case of a match:</p>
<p>i) An integer (int or unsigned) variable determined by 'offset' is set to 'value'</p>
<p>ii) The processing function is called, with 'value' as the key</p>
<p>iii) An integer (any) or string (char *) variable determined by 'offset' is set to the value of an option parameter</p>
<p>'offset' should normally be either set to</p>
<ul>
<li>'offsetof(struct foo, member)' actions i) and iii)</li>
<li>-1 action ii)</li>
</ul>
<p>The 'offsetof()' macro is defined in the &lt;stddef.h&gt; header.</p>
<p>The template determines which options match, and also have an effect on the action. Normally the action is either i) or ii), but if a format is present in the template, then action iii) is performed.</p>
<p>The types of templates are:</p>
<p>1) "-x", "-foo", "--foo", "--foo-bar", etc. These match only themselves. Invalid values are "--" and anything beginning with "-o"</p>
<p>2) "foo", "foo-bar", etc. These match "-ofoo", "-ofoo-bar" or the relevant option in a comma separated option list</p>
<p>3) "bar=", "--foo=", etc. These are variations of 1) and 2) which have a parameter</p>
<p>4) "bar=%s", "--foo=%lu", etc. Same matching as above but perform action iii).</p>
<p>5) "-x ", etc. Matches either "-xparam" or "-x param" as two separate arguments</p>
<p>6) "-x %s", etc. Combination of 4) and 5)</p>
<p>If the format is "%s", memory is allocated for the string unlike with scanf(). The previous value (if non-NULL) stored at the this location is freed. </p>

<p class="definition">Definition at line <a class="el" href="fuse-3_813_80_2include_2fuse__opt_8h_source.html#l00077">77</a> of file <a class="el" href="fuse-3_813_80_2include_2fuse__opt_8h_source.html">fuse_opt.h</a>.</p>
</div><h2 class="groupheader">Field Documentation</h2>
<a id="a333dcd849a3bd54df06084a69b5a8d39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a333dcd849a3bd54df06084a69b5a8d39">&#9670;&nbsp;</a></span>offset</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned long fuse_opt::offset</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Offset of variable within 'data' parameter of <a class="el" href="fuse-3_813_80_2include_2fuse__opt_8h.html#a539ef1f571c34f516c60c4cbe2901c0e">fuse_opt_parse()</a> or -1 </p>

<p class="definition">Definition at line <a class="el" href="fuse-3_813_80_2include_2fuse__opt_8h_source.html#l00085">85</a> of file <a class="el" href="fuse-3_813_80_2include_2fuse__opt_8h_source.html">fuse_opt.h</a>.</p>

</div>
</div>
<a id="a49330e9bdac51625d00c0e7d49ba57ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49330e9bdac51625d00c0e7d49ba57ef">&#9670;&nbsp;</a></span>templ</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char * fuse_opt::templ</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Matching template and optional parameter formatting </p>

<p class="definition">Definition at line <a class="el" href="fuse-3_813_80_2include_2fuse__opt_8h_source.html#l00079">79</a> of file <a class="el" href="fuse-3_813_80_2include_2fuse__opt_8h_source.html">fuse_opt.h</a>.</p>

</div>
</div>
<a id="aeb76339e1ce6948ad94bd2d4d5d01e20"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeb76339e1ce6948ad94bd2d4d5d01e20">&#9670;&nbsp;</a></span>value</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int fuse_opt::value</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Value to set the variable to, or to be passed as 'key' to the processing function. Ignored if template has a format </p>

<p class="definition">Definition at line <a class="el" href="fuse-3_813_80_2include_2fuse__opt_8h_source.html#l00091">91</a> of file <a class="el" href="fuse-3_813_80_2include_2fuse__opt_8h_source.html">fuse_opt.h</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>fuse-3.13.0/include/<a class="el" href="fuse-3_813_80_2include_2fuse__opt_8h_source.html">fuse_opt.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>