VirtualBox

Changeset 104640 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
May 15, 2024 1:16:55 PM (9 months ago)
Author:
vboxsync
Message:

Main/Guest Additions Auto Update: Implemented support for logging guest process output to the release log. That way it will be much easier to diagnose what's happening on the guest side while updating.

Location:
trunk/src/VBox/Main/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/GuestProcessImpl.h

    r104178 r104640  
    248248    int terminate(uint32_t uTimeoutMS, int *pvrcGuest);
    249249
     250    int wait(int *pvrcGuest);
     251
     252public:
     253
     254    virtual int onOutputCallback(uint32_t uHandle, const std::vector<Utf8Str> &vecData);
     255
     256    virtual int onOutputCallback(uint32_t uHandle, const BYTE *pbData, size_t cbData);
     257
     258    virtual int onInputCallback(uint32_t uHandle, std::vector<Utf8Str> &vecData);
     259
    250260protected:
    251261
  • trunk/src/VBox/Main/include/GuestSessionImplTasks.h

    r104636 r104640  
    354354
    355355/**
     356 * Implementation for a Guest Additions update process for logging process output to the release log.
     357 */
     358class UpdateAdditionsProcess : public GuestProcessWrapper
     359{
     360public:
     361
     362    UpdateAdditionsProcess(void) { }
     363
     364    virtual ~UpdateAdditionsProcess();
     365
     366    int onOutputCallback(uint32_t uHandle, const BYTE *pbData, size_t cbData);
     367
     368protected:
     369
     370    /** Current line of stdout. */
     371    Utf8Str mLineStdOut;
     372    /** Current line of stderr. */
     373    Utf8Str mLineStdErr;
     374};
     375
     376/**
     377 * Tweaked startup info for a guest Guest Additions update process.
     378 */
     379class UpdateAdditionsStartupInfo : public GuestProcessStartupInfo
     380{
     381public:
     382
     383    UpdateAdditionsStartupInfo(void)
     384    {
     385        /* We want to have stdout / stderr handled by default for update processes. */
     386        mFlags = ProcessCreateFlag_WaitForStdOut | ProcessCreateFlag_WaitForStdErr;
     387    }
     388};
     389
     390/**
    356391 * Guest session task for automatically updating the Guest Additions on the guest.
    357392 */
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