mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-20 21:02:59 +00:00
quick_dump: Fix the danvet fallout.
quick_dump built fine, but it could actually run, since a lot of the linking happens at run time. There is one hack where we redefine the environment stuff, since depending on igt_aux means we have to pull in libdrm, which I do not want to do. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <pciaccess.h>
|
||||
#include "intel_chipset.h"
|
||||
|
||||
@@ -31,3 +33,15 @@ unsigned short pcidev_to_devid(struct pci_device *pdev)
|
||||
{
|
||||
return pdev->device_id;
|
||||
}
|
||||
|
||||
bool igt_check_boolean_env_var(const char *env_var, bool default_value)
|
||||
{
|
||||
char *val;
|
||||
|
||||
val = getenv(env_var);
|
||||
if (!val)
|
||||
return default_value;
|
||||
|
||||
return atoi(val) != 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user