mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
libcoolstream: Add boxarch to hw_caps
Origin commit data
------------------
Branch: ni/coolstream
Commit: 514d6344a6
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2016-01-25 (Mon, 25 Jan 2016)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include <global.h>
|
#include <global.h>
|
||||||
#include <zapit/femanager.h>
|
#include <zapit/femanager.h>
|
||||||
|
#include <sys/utsname.h>
|
||||||
#include "hardware_caps.h"
|
#include "hardware_caps.h"
|
||||||
|
|
||||||
static int initialized = 0;
|
static int initialized = 0;
|
||||||
@@ -22,6 +23,7 @@ hw_caps_t *get_hwcaps(void)
|
|||||||
if (initialized && frontend_check)
|
if (initialized && frontend_check)
|
||||||
return ∩︀
|
return ∩︀
|
||||||
|
|
||||||
|
struct utsname u;
|
||||||
unsigned int system_rev = cs_get_revision();
|
unsigned int system_rev = cs_get_revision();
|
||||||
|
|
||||||
CFEManager* fem = CFEManager::getInstance();
|
CFEManager* fem = CFEManager::getInstance();
|
||||||
@@ -74,6 +76,11 @@ hw_caps_t *get_hwcaps(void)
|
|||||||
|
|
||||||
strcpy(caps.chipset, "Nevis");
|
strcpy(caps.chipset, "Nevis");
|
||||||
|
|
||||||
|
if (! uname(&u))
|
||||||
|
strncpy(caps.boxarch, u.machine, sizeof(caps.boxarch));
|
||||||
|
else
|
||||||
|
fprintf(stderr, "%s: uname() failed: %m\n", __func__);
|
||||||
|
|
||||||
initialized = 1;
|
initialized = 1;
|
||||||
return ∩︀
|
return ∩︀
|
||||||
}
|
}
|
||||||
|
@@ -36,6 +36,7 @@ typedef struct hw_caps {
|
|||||||
int can_set_display_brightness;
|
int can_set_display_brightness;
|
||||||
char boxvendor[64];
|
char boxvendor[64];
|
||||||
char boxname[64];
|
char boxname[64];
|
||||||
|
char boxarch[64];
|
||||||
char chipset[64];
|
char chipset[64];
|
||||||
char frontend[64];
|
char frontend[64];
|
||||||
} hw_caps_t;
|
} hw_caps_t;
|
||||||
|
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include <global.h>
|
#include <global.h>
|
||||||
#include <zapit/femanager.h>
|
#include <zapit/femanager.h>
|
||||||
|
#include <sys/utsname.h>
|
||||||
#include "hardware_caps.h"
|
#include "hardware_caps.h"
|
||||||
|
|
||||||
static int initialized = 0;
|
static int initialized = 0;
|
||||||
@@ -89,6 +90,7 @@ hw_caps_t *get_hwcaps(void)
|
|||||||
if (initialized)
|
if (initialized)
|
||||||
return ∩︀
|
return ∩︀
|
||||||
|
|
||||||
|
struct utsname u;
|
||||||
unsigned int system_rev = cs_get_revision();
|
unsigned int system_rev = cs_get_revision();
|
||||||
|
|
||||||
caps.has_fan = 0;
|
caps.has_fan = 0;
|
||||||
@@ -158,6 +160,11 @@ hw_caps_t *get_hwcaps(void)
|
|||||||
}
|
}
|
||||||
strcpy(caps.chipset, chipset);
|
strcpy(caps.chipset, chipset);
|
||||||
|
|
||||||
|
if (! uname(&u))
|
||||||
|
strncpy(caps.boxarch, u.machine, sizeof(caps.boxarch));
|
||||||
|
else
|
||||||
|
fprintf(stderr, "%s: uname() failed: %m\n", __func__);
|
||||||
|
|
||||||
initialized = 1;
|
initialized = 1;
|
||||||
return ∩︀
|
return ∩︀
|
||||||
}
|
}
|
||||||
|
@@ -36,6 +36,7 @@ typedef struct hw_caps {
|
|||||||
int can_set_display_brightness;
|
int can_set_display_brightness;
|
||||||
char boxvendor[64];
|
char boxvendor[64];
|
||||||
char boxname[64];
|
char boxname[64];
|
||||||
|
char boxarch[64];
|
||||||
char chipset[64];
|
char chipset[64];
|
||||||
char frontend[64];
|
char frontend[64];
|
||||||
} hw_caps_t;
|
} hw_caps_t;
|
||||||
|
Reference in New Issue
Block a user