VirtualBox

Changeset 6215 in vbox for trunk


Ignore:
Timestamp:
Dec 28, 2007 5:41:03 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
27018
Message:

Added cmd "getversion" to VBoxControl.

Location:
trunk/src/VBox/Additions/WINNT/VBoxControl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxControl/Makefile.kmk

    r5999 r6215  
    2929        VBoxControl.rc
    3030
     31# VBoxControl.cpp uses VBOX_SVN_REV.
     32VBoxControl.cpp_DEFS += VBOX_SVN_REV=$(VBOX_SVN_REV)
     33VBoxControl.cpp_DEPS = $(VBOX_SVN_REV_KMK)
     34
    3135include $(PATH_KBUILD)/subfooter.kmk
    3236
  • trunk/src/VBox/Additions/WINNT/VBoxControl/VBoxControl.cpp

    r5999 r6215  
    1919#include <malloc.h>
    2020
     21#include <VBox/VBoxGuest.h>
     22#include <VBox/version.h>
     23
    2124void printHelp()
    2225{
    23     printf("VBoxControl   getvideoacceleration\n"
     26    printf("VBoxControl   getversion\n"
     27           "\n"
     28           "VBoxControl   getvideoacceleration\n"
    2429           "\n"
    2530           "VBoxControl   setvideoacceleration <on|off>\n"
     
    3237           "\n"
    3338           "VBoxControl   setvideomode <width> <height> <bpp> <screen>\n");
     39}
     40
     41void printVersion()
     42{
     43    printf("%d.%d.%dr%d\n", VBOX_VERSION_MAJOR, VBOX_VERSION_MINOR, VBOX_VERSION_BUILD, VBOX_SVN_REV);
    3444}
    3545
     
    775785    }
    776786
     787    /* todo: add better / stable command line handling here! */
     788
    777789    /* determine which command */
    778     if (strcmp(argv[1], "getvideoacceleration") == 0)
     790    if ((stricmp(argv[1], "getversion") == 0) ||
     791        (stricmp(argv[1], "-v") == 0) ||
     792        (stricmp(argv[1], "--version") == 0) ||
     793        (stricmp(argv[1], "-version") == 0))
     794    {
     795        printVersion();
     796    }
     797    else if (stricmp(argv[1], "getvideoacceleration") == 0)
    779798    {
    780799        handleGetVideoAcceleration(argc - 2, &argv[2]);
    781800    }
    782     else if (strcmp(argv[1], "setvideoacceleration") == 0)
     801    else if (stricmp(argv[1], "setvideoacceleration") == 0)
    783802    {
    784803        handleSetVideoAcceleration(argc - 2, &argv[2]);
    785804    }
    786     else if (strcmp(argv[1], "listcustommodes") == 0)
     805    else if (stricmp(argv[1], "listcustommodes") == 0)
    787806    {
    788807        handleListCustomModes(argc - 2, &argv[2]);
    789808    }
    790     else if (strcmp(argv[1], "addcustommode") == 0)
     809    else if (stricmp(argv[1], "addcustommode") == 0)
    791810    {
    792811        handleAddCustomMode(argc - 2, &argv[2]);
    793812    }
    794     else if (strcmp(argv[1], "removecustommode") == 0)
     813    else if (stricmp(argv[1], "removecustommode") == 0)
    795814    {
    796815        handleRemoveCustomMode(argc - 2, &argv[2]);
    797816    }
    798     else if (strcmp(argv[1], "setvideomode") == 0)
     817    else if (stricmp(argv[1], "setvideomode") == 0)
    799818    {
    800819        handleSetVideoMode(argc - 2, &argv[2]);
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