VirtualBox

Ignore:
Timestamp:
Feb 4, 2009 4:25:29 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
42441
Message:

OVF: add IVirtualSystemDescription::disableItem(), fix disk import

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageImport.cpp

    r16515 r16517  
    5454
    5555    Utf8Str strOvfFilename;
     56    bool fExecute = false;                  // if true, then we actually do the import (-exec argument)
    5657
    5758    for (int i = 0; i < a->argc; i++)
    5859    {
    59         if (!strOvfFilename)
     60        if (!strcmp(a->argv[i], "-exec"))
     61            fExecute = true;
     62        else if (!strOvfFilename)
    6063            strOvfFilename = a->argv[i];
    6164        else
     
    219222                }
    220223            }
    221             RTPrintf("\n");
    222         }
     224
     225            if (fExecute)
     226            {
     227                ComPtr<IProgress> progress;
     228                CHECK_ERROR_BREAK(appliance,
     229                                  ImportAppliance(progress.asOutParam()));
     230
     231                showProgress(progress);
     232
     233                if (SUCCEEDED(rc))
     234                {
     235                    progress->COMGETTER(ResultCode)(&rc);
     236                    if (FAILED (rc))
     237                    {
     238                        com::ProgressErrorInfo info(progress);
     239                        if (info.isBasicAvailable())
     240                            RTPrintf("Error: failed to import appliance. Error message: %lS\n", info.getText().raw());
     241                        else
     242                            RTPrintf("Error: failed to import appliance. No error message available!\n");
     243                    }
     244                    else
     245                        RTPrintf("Successfully imported the appliance.\n");
     246                }
     247            }
     248        } // end if (aVirtualSystemDescriptions.size() > 0)
    223249    } while (0);
    224250
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette