+# type: =head1
+#: ../src/guestfs.pod:1153
+msgid "CALLS WITH OPTIONAL ARGUMENTS"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1155
+msgid ""
+"A recent feature of the API is the introduction of calls which take optional "
+"arguments. In C these are declared 3 ways. The main way is as a call which "
+"takes variable arguments (ie. C<...>), as in this example:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1160
+#, no-wrap
+msgid ""
+" int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1162
+msgid ""
+"Call this with a list of optional arguments, terminated by C<-1>. So to "
+"call with no optional arguments specified:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1165
+#, no-wrap
+msgid ""
+" guestfs_add_drive_opts (g, filename, -1);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1167
+msgid "With a single optional argument:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1169
+#, no-wrap
+msgid ""
+" guestfs_add_drive_opts (g, filename,\n"
+" GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
+" -1);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1173
+msgid "With two:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1175
+#, no-wrap
+msgid ""
+" guestfs_add_drive_opts (g, filename,\n"
+" GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
+" GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
+" -1);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1180
+msgid ""
+"and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
+"happen!"
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1183
+msgid "USING va_list FOR OPTIONAL ARGUMENTS"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1185
+msgid ""
+"The second variant has the same name with the suffix C<_va>, which works the "
+"same way but takes a C<va_list>. See the C manual for details. For the "
+"example function, this is declared:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1189
+#, no-wrap
+msgid ""
+" int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
+" va_list args);\n"
+"\n"
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1192
+msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1194
+msgid ""
+"The third variant is useful where you need to construct these calls. You "
+"pass in a structure where you fill in the optional fields. The structure "
+"has a bitmask as the first element which you must set to indicate which "
+"fields you have filled in. For our example function the structure and call "
+"are declared:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1200
+#, no-wrap
+msgid ""
+" struct guestfs_add_drive_opts_argv {\n"
+" uint64_t bitmask;\n"
+" int readonly;\n"
+" const char *format;\n"
+" /* ... */\n"
+" };\n"
+" int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
+" const struct guestfs_add_drive_opts_argv *optargs);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1209
+msgid "You could call it like this:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1211
+#, no-wrap
+msgid ""
+" struct guestfs_add_drive_opts_argv optargs = {\n"
+" .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
+" GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
+" .readonly = 1,\n"
+" .format = \"qcow2\"\n"
+" };\n"
+" \n"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1218
+#, no-wrap
+msgid ""
+" guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1220 ../src/guestfs-actions.pod:11 ../src/guestfs-actions.pod:1842 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1255
+msgid "Notes:"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1226
+msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1231
+msgid "You do not need to fill in all fields of the structure."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1235
+msgid ""
+"There must be a one-to-one correspondence between fields of the structure "
+"that are filled in, and bits set in the bitmask."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1240
+msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1242
+msgid ""
+"In other languages, optional arguments are expressed in the way that is "
+"natural for that language. We refer you to the language-specific "
+"documentation for more details on that."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1246
+msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
+msgstr ""
+