VirtualBox

Changeset 84636 in vbox


Ignore:
Timestamp:
Jun 2, 2020 12:34:44 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
138384
Message:

bugref:9637. fixing drm client path. now we use full path rather than a relative one.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp

    r84586 r84636  
    5656#include <iprt/err.h>
    5757#include <iprt/file.h>
     58#include <iprt/path.h>
    5859#include <iprt/string.h>
    5960#include <iprt/thread.h>
     
    6566#define MILLIS_PER_INCH (25.4)
    6667#define DEFAULT_DPI (96.0)
    67 
    6868
    6969/** Maximum number of supported screens.  DRM and X11 both limit this to 32. */
     
    156156static X11CONTEXT x11Context;
    157157
    158 #define MAX_MODE_NAME_LEN 64
    159 #define MAX_COMMAND_LINE_LEN 512
    160 #define MAX_MODE_LINE_LEN 512
     158#define BUFFER_SIZE 1024
    161159
    162160struct RANDROUTPUT
     
    690688        char* argv[] = {NULL};
    691689        char* env[] = {NULL};
    692         execve("./VBoxDRMClient", argv, env);
    693         perror("Could not start the DRM Client.");
     690        char szDRMClientPath[BUFFER_SIZE];
     691        RTPathExecDir(szDRMClientPath, BUFFER_SIZE);
     692        RTPathAppend(szDRMClientPath, BUFFER_SIZE, "VBoxDRMClient");
     693        int rc = execve(szDRMClientPath, argv, env);
     694        if (rc == -1)
     695            VBClLogFatalError("execve for % returns the following error %d %s\n", szDRMClientPath, errno, strerror(errno));
     696        /* This is reached only when execve fails. */
    694697        return false;
    695698    }
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