VirtualBox

Changeset 8351 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Apr 24, 2008 9:32:22 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
30129
Message:

Additions/common: moved guest cap disabling into common VBoxGuest.

Location:
trunk/src/VBox/Additions/common/VBoxGuest
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c

    r8318 r8351  
    3535
    3636#include "VBoxGuestInternal.h"
    37 #include <VBox/VBoxDev.h>       /* for VMMDEV_GUEST_SUPPORTS_GRAPHICS */
    3837#include <VBox/log.h>
    3938#include <iprt/assert.h>
     
    332331                                    if (RT_SUCCESS(rc))
    333332                                    {
    334                                         /*
    335                                          * Disable graphics capability explicitly for Solaris guests.
    336                                          */
    337                                         rc = VBoxGuestSetGuestCapabilities(0, VMMDEV_GUEST_SUPPORTS_GRAPHICS);
    338                                         if (RT_SUCCESS(rc))
     333                                        rc = ddi_create_minor_node(pDip, DEVICE_NAME, S_IFCHR, instance, DDI_PSEUDO, 0);
     334                                        if (rc == DDI_SUCCESS)
    339335                                        {
    340                                             rc = ddi_create_minor_node(pDip, DEVICE_NAME, S_IFCHR, instance, DDI_PSEUDO, 0);
    341                                             if (rc == DDI_SUCCESS)
    342                                             {
    343                                                 g_pDip = pDip;
    344                                                 ddi_set_driver_private(pDip, pState);
    345                                                 pci_config_teardown(&PciHandle);
    346                                                 ddi_report_dev(pDip);
    347                                                 return DDI_SUCCESS;
    348                                             }
    349 
    350                                             LogRel((DEVICE_NAME ":ddi_create_minor_node failed.\n"));
     336                                            g_pDip = pDip;
     337                                            ddi_set_driver_private(pDip, pState);
     338                                            pci_config_teardown(&PciHandle);
     339                                            ddi_report_dev(pDip);
     340                                            return DDI_SUCCESS;
    351341                                        }
    352                                         else
    353                                             LogRel((DEVICE_NAME ":VBoxGuestSetGuestCapabilities failed. rc=%d\n", rc));
     342
     343                                        LogRel((DEVICE_NAME ":ddi_create_minor_node failed.\n"));
    354344                                    }
    355345                                    else
     
    499489
    500490    /*
    501      * Verify we are being opened as a character device
     491     * Verify we are being opened as a character device.
    502492     */
    503493    if (fType != OTYP_CHR)
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp

    r8328 r8351  
    220220                if (RT_SUCCESS(rc))
    221221                {
    222                     vboxGuestInitFixateGuestMappings(pDevExt);
    223                     Log(("VBoxGuestInitDevExt: returns success\n"));
    224                     return VINF_SUCCESS;
     222                    /*
     223                     * Disable guest graphics capability by default. The guest specific
     224                     * graphics driver will re-enable this when it is necessary.
     225                     */
     226                    rc = VBoxGuestSetGuestCapabilities(0, VMMDEV_GUEST_SUPPORTS_GRAPHICS);
     227                    if (RT_SUCCESS(rc))
     228                    {
     229                        vboxGuestInitFixateGuestMappings(pDevExt);
     230                        Log(("VBoxGuestInitDevExt: returns success\n"));
     231                        return VINF_SUCCESS;
     232                    }
    225233                }
    226234            }
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