VirtualBox

Changeset 44433 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Jan 28, 2013 4:12:29 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
83414
Message:

Main/Medium: improve the error handling for medium UUID change failures, e.g. when the medium is readonly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/MediumImpl.cpp

    r44409 r44433  
    55
    66/*
    7  * Copyright (C) 2008-2012 Oracle Corporation
     7 * Copyright (C) 2008-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    15461546    {
    15471547        ULONG temp = m->variant;
    1548         temp &= 1<<i; 
     1548        temp &= 1<<i;
    15491549        variants [i] = (MediumVariant_T)temp;
    15501550    }
     
    56945694                    vrc = VDSetUuid(hdd, 0, m->uuidImage.raw());
    56955695                    alock.release();
    5696                     ComAssertRCThrow(vrc, E_FAIL);
     5696                    if (RT_FAILURE(vrc))
     5697                    {
     5698                        lastAccessError = Utf8StrFmt(tr("Could not update the UUID of medium '%s'%s"),
     5699                                         location.c_str(), vdError(vrc).c_str());
     5700                        throw S_OK;
     5701                    }
    56975702                    mediumId = m->uuidImage;
    56985703                }
     
    57025707                    vrc = VDSetParentUuid(hdd, 0, m->uuidParentImage.raw());
    57035708                    alock.release();
    5704                     ComAssertRCThrow(vrc, E_FAIL);
     5709                    if (RT_FAILURE(vrc))
     5710                    {
     5711                        lastAccessError = Utf8StrFmt(tr("Could not update the parent UUID of medium '%s'%s"),
     5712                                         location.c_str(), vdError(vrc).c_str());
     5713                        throw S_OK;
     5714                    }
    57055715                }
    57065716                /* zap the information, these are no long-term members */
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