VirtualBox

Changeset 94208 in vbox


Ignore:
Timestamp:
Mar 13, 2022 7:48:18 PM (3 years ago)
Author:
vboxsync
Message:

doc/manual,FE/VBoxManage: Convert guestproperty command to refentry documentation, ​bugref:9186

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/Config.kmk

    r94207 r94208  
    7777        man_VBoxManage-getextradata.xml \
    7878        man_VBoxManage-setproperty.xml \
    79         man_VBoxManage-usbfilter.xml
     79        man_VBoxManage-usbfilter.xml \
     80        man_VBoxManage-guestproperty.xml
    8081
    8182## List of user manual XML files.
  • trunk/doc/manual/en_US/man_VBoxManage-guestproperty.xml

    r82969 r94208  
    2020<refentry id="vboxmanage-guestproperty" lang="en">
    2121  <refentryinfo>
    22     <pubdate>September 2019</pubdate>
     22    <pubdate>$Date$</pubdate>
    2323    <title>VBoxManage guestproperty</title>
    2424  </refentryinfo>
     
    3232    <refname>VBoxManage-guestproperty</refname>
    3333    <refpurpose>manage virtual machine guest properties</refpurpose>
    34     <refclass>Oracle VM VirtualBox</refclass>
     34    <refclass>&product-name;</refclass>
    3535  </refnamediv>
    3636
  • trunk/doc/manual/en_US/user_VBoxManage.xml

    r94207 r94208  
    11111111  <xi:include href="user_man_VBoxManage-sharedfolder.xml"   xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" />
    11121112
    1113   <sect1 id="vboxmanage-guestproperty">
    1114 
    1115     <title>VBoxManage guestproperty</title>
    1116 
    1117     <para>
    1118       The <command>guestproperty</command> commands enable you to get or
    1119       set properties of a running virtual machine. See
    1120       <xref linkend="guestadd-guestprops" />. Guest properties are
    1121       arbitrary keyword-value string pairs which can be written to and
    1122       read from by either the guest or the host, so they can be used as
    1123       a low-volume communication channel for strings, provided that a
    1124       guest is running and has the Guest Additions installed. In
    1125       addition, a number of values whose keywords begin with
    1126       <computeroutput>/VirtualBox/</computeroutput>are automatically set
    1127       and maintained by the Guest Additions.
    1128     </para>
    1129 
    1130     <para>
    1131       The following subcommands are available, where
    1132       <computeroutput>&lt;vm&gt;</computeroutput> can either be a VM
    1133       name or a VM UUID, as with the other <command>VBoxManage</command>
    1134       commands:
    1135     </para>
    1136 
    1137     <itemizedlist>
    1138 
    1139       <listitem>
    1140         <para>
    1141           <computeroutput>enumerate &lt;vm&gt; [--patterns
    1142           &lt;pattern&gt;]</computeroutput>: Lists all the guest
    1143           properties that are available for the given VM, including the
    1144           value. This list will be very limited if the guest's service
    1145           process cannot be contacted, for example because the VM is not
    1146           running or the Guest Additions are not installed.
    1147         </para>
    1148 
    1149         <para>
    1150           If <computeroutput>--patterns &lt;pattern&gt;</computeroutput>
    1151           is specified, it acts as a filter to only list properties that
    1152           match the given pattern. The pattern can contain the following
    1153           wildcard characters:
    1154         </para>
    1155 
    1156         <itemizedlist>
    1157 
    1158           <listitem>
    1159             <para>
    1160               <computeroutput>*</computeroutput> (asterisk): Represents
    1161               any number of characters. For example,
    1162               "<computeroutput>/VirtualBox*</computeroutput>" would
    1163               match all properties beginning with "/VirtualBox".
    1164             </para>
    1165           </listitem>
    1166 
    1167           <listitem>
    1168             <para>
    1169               <computeroutput>?</computeroutput> (question mark):
    1170               Represents a single arbitrary character. For example,
    1171               "<computeroutput>fo?</computeroutput>" would match both
    1172               "foo" and "for".
    1173             </para>
    1174           </listitem>
    1175 
    1176           <listitem>
    1177             <para>
    1178               <computeroutput>|</computeroutput> (pipe symbol): Can be
    1179               used to specify multiple alternative patterns. For
    1180               example, "<computeroutput>s*|t*</computeroutput>" would
    1181               match anything starting with either "s" or "t".
    1182             </para>
    1183           </listitem>
    1184 
    1185         </itemizedlist>
    1186       </listitem>
    1187 
    1188       <listitem>
    1189         <para>
    1190           <computeroutput>get &lt;vm&gt;
    1191           &lt;property&gt;</computeroutput>: Retrieves the value of a
    1192           single property only. If the property cannot be found, for
    1193           example because the guest is not running, the following
    1194           message is shown:
    1195         </para>
    1196 
    1197 <screen>No value set!</screen>
    1198       </listitem>
    1199 
    1200       <listitem>
    1201         <para>
    1202           <computeroutput>set &lt;vm&gt; &lt;property&gt; [&lt;value&gt;
    1203           [--flags &lt;flags&gt;]]</computeroutput>: Enables you to set
    1204           a guest property by specifying the keyword and value. If
    1205           <computeroutput>&lt;value&gt;</computeroutput> is omitted, the
    1206           property is deleted. With
    1207           <computeroutput>--flags</computeroutput>, you can specify
    1208           additional behavior. You can combine several flags by
    1209           separating them with commas.
    1210         </para>
    1211 
    1212         <itemizedlist>
    1213 
    1214           <listitem>
    1215             <para>
    1216               <computeroutput>TRANSIENT</computeroutput>: The value will
    1217               not be stored with the VM data when the VM exits.
    1218             </para>
    1219           </listitem>
    1220 
    1221           <listitem>
    1222             <para>
    1223               <computeroutput>TRANSRESET</computeroutput>: The value
    1224               will be deleted as soon as the VM restarts or exits.
    1225             </para>
    1226           </listitem>
    1227 
    1228           <listitem>
    1229             <para>
    1230               <computeroutput>RDONLYGUEST</computeroutput>: The value
    1231               can only be changed by the host, but the guest can only
    1232               read it.
    1233             </para>
    1234           </listitem>
    1235 
    1236           <listitem>
    1237             <para>
    1238               <computeroutput>RDONLYHOST</computeroutput>: The value can
    1239               only be changed by the guest, but the host can only read
    1240               it.
    1241             </para>
    1242           </listitem>
    1243 
    1244           <listitem>
    1245             <para>
    1246               <computeroutput>READONLY</computeroutput>: The value
    1247               cannot be changed at all.
    1248             </para>
    1249           </listitem>
    1250 
    1251         </itemizedlist>
    1252       </listitem>
    1253 
    1254       <listitem>
    1255         <para>
    1256           <computeroutput>wait &lt;vm&gt; &lt;pattern&gt; --timeout
    1257           &lt;timeout&gt;</computeroutput>: Waits for a particular value
    1258           described by the pattern string to change or to be deleted or
    1259           created. The pattern rules are the same as for the
    1260           <command>enumerate</command> subcommand.
    1261         </para>
    1262       </listitem>
    1263 
    1264       <listitem>
    1265         <para>
    1266           <computeroutput>delete &lt;vm&gt;
    1267           &lt;property&gt;</computeroutput>: Deletes a guest property
    1268           which has been set previously.
    1269         </para>
    1270       </listitem>
    1271 
    1272     </itemizedlist>
    1273 
    1274   </sect1>
     1113  <xi:include href="user_man_VBoxManage-guestproperty.xml"  xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" />
    12751114
    12761115  <sect1 id="vboxmanage-guestcontrol">
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r94207 r94208  
    232232    { "sharedfolder",       USAGE_S_NEWCMD, HELP_CMD_SHAREDFOLDER, handleSharedFolder,         0 },
    233233#ifdef VBOX_WITH_GUEST_PROPS
    234     { "guestproperty",      USAGE_GUESTPROPERTY,    VBMG_CMD_TODO, handleGuestProperty,        0 },
     234    { "guestproperty",      USAGE_S_NEWCMD,HELP_CMD_GUESTPROPERTY, handleGuestProperty,        0 },
    235235#endif
    236236#ifdef VBOX_WITH_GUEST_CONTROL
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h

    r94207 r94208  
    109109    USAGE_I_MODUNINSTALL,
    110110    USAGE_I_RENAMEVMDK,
    111 #ifdef VBOX_WITH_GUEST_PROPS
    112     USAGE_GUESTPROPERTY,
    113 #endif  /* VBOX_WITH_GUEST_PROPS defined */
    114111    USAGE_I_CONVERTTORAW,
    115112    USAGE_METRICS,
     
    255252RTEXITCODE handleDebugVM(HandlerArg *a);
    256253
    257 /* VBoxManageGuestProp.cpp */
    258 extern void usageGuestProperty(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2);
    259 
    260254/* VBoxManageGuestCtrl.cpp */
    261255extern void usageGuestControl(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2, uint64_t fSubcommandScope);
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageGuestProp.cpp

    r94184 r94208  
    5454
    5555
    56 void usageGuestProperty(PRTSTREAM pStrm, const char *pcszSep1, const char *pcszSep2)
    57 {
    58     RTStrmPrintf(pStrm, "%s guestproperty %s   get <uuid|vmname>\n"
    59                   "                            <property> [--verbose]\n"
    60                   "\n", pcszSep1, pcszSep2);
    61     RTStrmPrintf(pStrm, "%s guestproperty %s   set <uuid|vmname>\n"
    62                   "                            <property> [<value> [--flags <flags>]]\n"
    63                   "\n", pcszSep1, pcszSep2);
    64     RTStrmPrintf(pStrm, "%s guestproperty %s   delete|unset <uuid|vmname>\n"
    65                   "                            <property>\n"
    66                   "\n", pcszSep1, pcszSep2);
    67     RTStrmPrintf(pStrm, "%s guestproperty %s   enumerate <uuid|vmname>\n"
    68                   "                            [--patterns <patterns>]\n"
    69                   "\n", pcszSep1, pcszSep2);
    70     RTStrmPrintf(pStrm, "%s guestproperty %s   wait <uuid|vmname> <patterns>\n"
    71                   "                            [--timeout <msec>] [--fail-on-timeout]\n"
    72                   "\n", pcszSep1, pcszSep2);
    73 }
    74 
    7556#ifndef VBOX_ONLY_DOCS
    7657
     
    7859{
    7960    HRESULT rc = S_OK;
     61
     62    setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_GET);
    8063
    8164    bool verbose = false;
     
    8568        verbose = true;
    8669    else if (a->argc != 2)
    87         return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters"));
     70        return errorSyntax(GuestProp::tr("Incorrect parameters"));
    8871
    8972    ComPtr<IMachine> machine;
     
    121104    HRESULT rc = S_OK;
    122105
     106    setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_SET);
     107
    123108    /*
    124109     * Check the syntax.  We can deduce the correct syntax from the number of
     
    144129        usageOK = false;
    145130    if (!usageOK)
    146         return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters"));
     131        return errorSyntax(GuestProp::tr("Incorrect parameters"));
    147132    /* This is always needed. */
    148133    pszName = a->argv[1];
     
    179164    HRESULT rc = S_OK;
    180165
     166    setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_UNSET);
     167
    181168    /*
    182169     * Check the syntax.  We can deduce the correct syntax from the number of
     
    188175        usageOK = false;
    189176    if (!usageOK)
    190         return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters"));
     177        return errorSyntax(GuestProp::tr("Incorrect parameters"));
    191178    /* This is always needed. */
    192179    pszName = a->argv[1];
     
    221208static RTEXITCODE handleEnumGuestProperty(HandlerArg *a)
    222209{
     210    setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_ENUMERATE);
     211
    223212    /*
    224213     * Check the syntax.  We can deduce the correct syntax from the number of
     
    230219             && strcmp(a->argv[1], "--patterns")
    231220             && strcmp(a->argv[1], "-patterns")))
    232         return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters"));
     221        return errorSyntax(GuestProp::tr("Incorrect parameters"));
    233222
    234223    /*
     
    283272static RTEXITCODE handleWaitGuestProperty(HandlerArg *a)
    284273{
     274    setCurrentSubcommand(HELP_SCOPE_GUESTPROPERTY_WAIT);
     275
    285276    /*
    286277     * Handle arguments
     
    317308    }
    318309    if (!usageOK)
    319         return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters"));
     310        return errorSyntax(GuestProp::tr("Incorrect parameters"));
    320311
    321312    /*
     
    420411
    421412    if (a->argc == 0)
    422         return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters"));
     413        return errorSyntax(GuestProp::tr("Incorrect parameters"));
    423414
    424415    /* switch (cmd) */
     
    435426
    436427    /* default: */
    437     return errorSyntax(USAGE_GUESTPROPERTY, GuestProp::tr("Incorrect parameters"));
     428    return errorSyntax(GuestProp::tr("Incorrect parameters"));
    438429}
    439430
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp

    r94207 r94208  
    639639                     "\n", SEP);
    640640
    641 #ifdef VBOX_WITH_GUEST_PROPS
    642     if (enmCommand == USAGE_GUESTPROPERTY || enmCommand == USAGE_S_ALL)
    643         usageGuestProperty(pStrm, SEP);
    644 #endif /* VBOX_WITH_GUEST_PROPS defined */
    645 
    646641#ifdef VBOX_WITH_GUEST_CONTROL
    647642    if (enmCommand == USAGE_GUESTCONTROL || enmCommand == USAGE_S_ALL)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette