forked from pool/initviocons
28 lines
645 B
Diff
28 lines
645 B
Diff
---
|
|
main.c | 12 ++++++++++++
|
|
1 file changed, 12 insertions(+)
|
|
|
|
Index: initviocons-0.4/main.c
|
|
===================================================================
|
|
--- initviocons-0.4.orig/main.c
|
|
+++ initviocons-0.4/main.c
|
|
@@ -157,6 +157,18 @@ int main(int argc, char *argv[])
|
|
int cols = DEFAULT_COLS;
|
|
int lines = DEFAULT_ROWS;
|
|
char lines_s[4], cols_s[4];
|
|
+ char model[42];
|
|
+
|
|
+ fd = open("/proc/device-tree/model", O_RDONLY);
|
|
+ if (fd >=0) {
|
|
+ opt = read(fd, model, sizeof(model) - 1);
|
|
+ if (opt > 0) {
|
|
+ model[opt] = '\0';
|
|
+ if (strcmp("PLAYSTATION 3", model) == 0)
|
|
+ exit(0);
|
|
+ }
|
|
+ close(fd);
|
|
+ }
|
|
|
|
Debug = 0;
|
|
Quiet = 0;
|