VirtualBox

Changeset 52547 in vbox


Ignore:
Timestamp:
Sep 1, 2014 9:05:45 AM (10 years ago)
Author:
vboxsync
Message:

Devices/Samples/DrvStorageFilter.cpp: adapt to deal properly with optional functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Samples/DrvStorageFilter.cpp

    r40379 r52547  
    11/* $Id$ */
    22/** @file
    3  * VBox Sample Driver.
    4  */
    5 
    6 /*
    7  * Copyright (C) 2012 Oracle Corporation
     3 * VBox storage filter driver sample.
     4 */
     5
     6/*
     7 * Copyright (C) 2012-2014 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    340340
    341341    AssertLogRelReturn(pThis->pIMediaBelow, VERR_PDM_MISSING_INTERFACE_BELOW);
     342
     343    if (!pThis->pIMediaBelow->pfnDiscard)
     344        pThis->IMedia.pfnDiscard = NULL;
     345    if (!pThis->pIMediaAsyncBelow || !pThis->pIMediaAsyncBelow->pfnStartDiscard)
     346        pThis->IMediaAsync.pfnStartDiscard = NULL;
    342347
    343348    return VINF_SUCCESS;
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