~ubuntu-branches/ubuntu/vivid/virtualbox-ose/vivid

« back to all changes in this revision

Viewing changes to src/VBox/Additions/common/VBoxService/VBoxServiceUtils.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2010-03-11 17:16:37 UTC
  • mfrom: (0.3.4 upstream) (0.4.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100311171637-43z64ia3ccpj8vqn
Tags: 3.1.4-dfsg-2ubuntu1
* Merge from Debian unstable (LP: #528561), remaining changes:
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
  - Replace *-source packages with transitional packages for *-dkms
* Fix crash in vboxvideo_drm with kernel 2.6.33 / backported drm code
  (LP: #535297)
* Add a list of linux-headers packages to the apport hook
* Update debian/patches/u02-lp-integration.dpatch with a
  DEP-3 compliant header
* Add ${misc:Depends} to virtualbox-ose-source and virtualbox-ose-guest-source
  Depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
        if (   RT_SUCCESS(rc)
138
138
            && (*pu32 < u32Min || *pu32 > u32Max))
139
139
        {
140
 
            VBoxServiceError("The guest property value %s = %RU32 is out of range [%RU32..%RU32].\n",
141
 
                             pszPropName, *pu32, u32Min, u32Max);
 
140
            rc = VBoxServiceError("The guest property value %s = %RU32 is out of range [%RU32..%RU32].\n",
 
141
                                  pszPropName, *pu32, u32Min, u32Max);
142
142
        }
143
143
        RTStrFree(pszValue);
144
144
    }
155
155
 * @param   u32ClientId     The HGCM client ID for the guest property session.
156
156
 * @param   pszName         The property name.
157
157
 * @param   pszValueFormat  The property format string.  If this is NULL then
158
 
 *                          the property will be removed.
 
158
 *                          the property will be deleted (if possible).
159
159
 * @param   ...             Format arguments.
160
160
 */
161
161
int VBoxServiceWritePropF(uint32_t u32ClientId, const char *pszName, const char *pszValueFormat, ...)
162
162
{
 
163
    AssertPtr(pszName);
163
164
    int rc;
164
165
    if (pszValueFormat != NULL)
165
166
    {
166
 
        /** @todo Log the value as well? just copy the guts of
167
 
         *        VbglR3GuestPropWriteValueV. */
168
 
        VBoxServiceVerbose(3, "Writing guest property \"%s\"\n", pszName);
169
167
        va_list va;
170
168
        va_start(va, pszValueFormat);
 
169
 
 
170
        char *pszValue = RTStrAPrintf2V(pszValueFormat, va);
 
171
        AssertPtr(pszValue);
 
172
        VBoxServiceVerbose(3, "Writing guest property \"%s\" = \"%s\"\n", pszName, pszValue);
 
173
        RTStrFree(pszValue);
 
174
 
171
175
        rc = VbglR3GuestPropWriteValueV(u32ClientId, pszName, pszValueFormat, va);
172
176
        va_end(va);
173
177
        if (RT_FAILURE(rc))
175
179
    }
176
180
    else
177
181
    {
 
182
        VBoxServiceVerbose(3, "Deleting guest property \"%s\"\n", pszName);   
178
183
        rc = VbglR3GuestPropWriteValue(u32ClientId, pszName, NULL);
179
184
        if (RT_FAILURE(rc))
180
 
            VBoxServiceError("Error removing guest property \"%s\" (rc=%Rrc)\n", pszName, rc);
 
185
            VBoxServiceError("Error deleting guest property \"%s\" (rc=%Rrc)\n", pszName, rc);
181
186
    }
182
187
    return rc;
183
188
}