This commit is contained in:
parent
def32bd35e
commit
edfb09862e
@ -1,74 +0,0 @@
|
||||
main.c | 18 +++++++++++++-----
|
||||
usage.c | 4 +++-
|
||||
2 files changed, 16 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: main.c
|
||||
===================================================================
|
||||
--- main.c.orig
|
||||
+++ main.c
|
||||
@@ -146,6 +146,7 @@ int main(int argc, char *argv[])
|
||||
int opt; /* for getopt() */
|
||||
int should_init = 1; /* shall we do any initialization? */
|
||||
int output_for_eval = 0; /* print output for eval? */
|
||||
+ int csh_user = 0; /* the eval oputput belongs to csh */
|
||||
int fd;
|
||||
struct stat statbuf;
|
||||
|
||||
@@ -161,7 +162,7 @@ int main(int argc, char *argv[])
|
||||
Quiet = 0;
|
||||
Igncr = 0;
|
||||
|
||||
- while ((opt = getopt(argc, argv, "dqpeF:h")) != -1) {
|
||||
+ while ((opt = getopt(argc, argv, "dqpeF:ch")) != -1) {
|
||||
switch (opt) {
|
||||
case 'd': Debug++; break;
|
||||
case 'q': Quiet++; break;
|
||||
@@ -169,6 +170,7 @@ int main(int argc, char *argv[])
|
||||
case 'e': output_for_eval++; break;
|
||||
case 'F': sprintf(device, "%s", optarg); break;
|
||||
case ':': printf("option needs a value\n"); break;
|
||||
+ case 'c': csh_user++; break;
|
||||
case 'h': usage(); break;
|
||||
case '?': usage(); break;
|
||||
}
|
||||
@@ -382,10 +384,16 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* to be evaled by the shell */
|
||||
if (output_for_eval) {
|
||||
- printf ("\nTERM=%s;\n", termstr);
|
||||
- printf ("COLUMNS=%d;\n", cols);
|
||||
- printf ("LINES=%d;\n", lines);
|
||||
- printf ("export COLUMNS LINES;\n");
|
||||
+ if (csh_user) {
|
||||
+ printf ("setenv TERM %s;\n", termstr);
|
||||
+ printf ("setenv COLUMNS %d;\n", cols);
|
||||
+ printf ("setenv LINES %d\n", lines);
|
||||
+ } else {
|
||||
+ printf ("TERM=%s;\n", termstr);
|
||||
+ printf ("COLUMNS=%d;\n", cols);
|
||||
+ printf ("LINES=%d;\n", lines);
|
||||
+ printf ("export COLUMNS LINES\n");
|
||||
+ }
|
||||
}
|
||||
|
||||
/* FIXME: signal handling */
|
||||
Index: usage.c
|
||||
===================================================================
|
||||
--- usage.c.orig
|
||||
+++ usage.c
|
||||
@@ -1,5 +1,6 @@
|
||||
+#include <stdlib.h>
|
||||
+#include <stdio.h>
|
||||
#include "viocons.h"
|
||||
-#include "stdio.h"
|
||||
|
||||
void usage(void)
|
||||
{
|
||||
@@ -12,6 +13,7 @@ Usage: " PROGRAM " [-d] [-q] [-p] [-e] [
|
||||
-e\twrite COLUMNS, LINES and TERM to stdout to be evaled\n\
|
||||
\t(does not need to imply -q because informational output goes to stderr)\n\
|
||||
-F\tspecify the terminal device, e.g. /dev/tty1\n\
|
||||
+-c\toutput C shell code for eval\n\
|
||||
-h\tshow usage info\n\
|
||||
\n\
|
||||
", VERSION);
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:db2731c967f8f6298695fec37938b41113600deaf6ca3eede74dab00648d2511
|
||||
size 51270
|
3
initviocons-0.5.tar.bz2
Normal file
3
initviocons-0.5.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3d7889e9b2c413adf55663021d87497e19849b32eb20d2b1d0f65ccc719d8b22
|
||||
size 18398
|
@ -1,3 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 19 07:28:29 CEST 2007 - poeml@suse.de
|
||||
|
||||
- update to 0.5 (svn r24)
|
||||
- support for mlterm and Terminal.app
|
||||
- prefer Terminal.app over kterm (which responds in the same
|
||||
way). kterm is not widely used anymore, it was an old xterm
|
||||
fork but it isn't UTF-8 capable.
|
||||
- make it compile on Darwin 8.6
|
||||
- fold in patches initviocons-0.4.dif (c shell eval mode)
|
||||
initviocons.minimal-termsize.patch [#140383]
|
||||
initviocons.ps3-hack.patch
|
||||
initviocons.ps3-matching.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 17 12:22:22 CEST 2007 - sassmann@suse.de
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
main.c | 9 +++++++++
|
||||
1 files changed, 9 insertions(+)
|
||||
|
||||
Index: initviocons-0.4/main.c
|
||||
===================================================================
|
||||
--- initviocons-0.4.orig/main.c
|
||||
+++ initviocons-0.4/main.c
|
||||
@@ -245,6 +245,15 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
if (Debug) printf ("%d cols, %d lines \n", cols, lines);
|
||||
|
||||
+ /*
|
||||
+ * a terminal size smaller than the defaults doesnt make sense
|
||||
+ * this will happen on the POWER4/POWER5 hvc console
|
||||
+ */
|
||||
+ if (DEFAULT_COLS >= cols)
|
||||
+ cols = DEFAULT_COLS;
|
||||
+ if (DEFAULT_ROWS >= lines)
|
||||
+ lines = DEFAULT_ROWS;
|
||||
+
|
||||
|
||||
/* get more info to discriminate terminals */
|
||||
switch (foundterm) {
|
@ -1,27 +0,0 @@
|
||||
---
|
||||
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;
|
@ -1,22 +0,0 @@
|
||||
Index: initviocons-0.4/main.c
|
||||
===================================================================
|
||||
--- initviocons-0.4.orig/main.c
|
||||
+++ initviocons-0.4/main.c
|
||||
@@ -159,6 +159,7 @@ int main(int argc, char *argv[])
|
||||
char lines_s[4], cols_s[4];
|
||||
char model[42];
|
||||
|
||||
+ /* initviocons breaks fb on ps3, so disable it */
|
||||
fd = open("/proc/device-tree/model", O_RDONLY);
|
||||
if (fd >=0) {
|
||||
opt = read(fd, model, sizeof(model) - 1);
|
||||
@@ -166,6 +167,9 @@ int main(int argc, char *argv[])
|
||||
model[opt] = '\0';
|
||||
if (strcmp("PLAYSTATION 3", model) == 0)
|
||||
exit(0);
|
||||
+ if (strcmp("SonyPS3", model) == 0) {
|
||||
+ exit(0);
|
||||
+ }
|
||||
}
|
||||
close(fd);
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package initviocons (Version 0.4)
|
||||
# spec file for package initviocons (Version 0.5)
|
||||
#
|
||||
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
@ -11,19 +11,15 @@
|
||||
# norootforbuild
|
||||
|
||||
Name: initviocons
|
||||
URL: http://www.iseries.de/
|
||||
Version: 0.4
|
||||
Release: 364
|
||||
Summary: Terminal Initialization for the iSeries Virtual Console
|
||||
URL: http://svn.poeml.de/viewcvs/initviocons/
|
||||
Version: 0.5
|
||||
Release: 1
|
||||
Summary: Terminal Initialization, e.g. for the iSeries Virtual Console
|
||||
License: GPL v2 or later
|
||||
Group: System/Console
|
||||
Autoreqprov: on
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Source: initviocons-%{version}.tar.bz2
|
||||
Patch: initviocons-%{version}.dif
|
||||
Patch1: initviocons.minimal-termsize.patch
|
||||
Patch3: initviocons.ps3-hack.patch
|
||||
Patch4: initviocons.ps3-matching.patch
|
||||
|
||||
%description
|
||||
Initviocons can be used on the iSeries platform to recognize terminal
|
||||
@ -43,14 +39,12 @@ Authors:
|
||||
|
||||
%prep
|
||||
%setup -n initviocons-%{version}
|
||||
%patch0
|
||||
%patch1 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
./configure --prefix=/ --mandir=%{_mandir}
|
||||
make CFLAGS="$RPM_OPT_FLAGS -Wall"
|
||||
export CFLAGS="$RPM_OPT_FLAGS -Wall"
|
||||
autoreconf -fi
|
||||
%configure --bindir=/bin
|
||||
make
|
||||
|
||||
%install
|
||||
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
|
||||
@ -65,6 +59,17 @@ cp -p termprobes $RPM_BUILD_ROOT/usr/bin/
|
||||
/usr/bin/*
|
||||
|
||||
%changelog
|
||||
* Thu Jul 19 2007 - poeml@suse.de
|
||||
- update to 0.5 (svn r24)
|
||||
- support for mlterm and Terminal.app
|
||||
- prefer Terminal.app over kterm (which responds in the same
|
||||
way). kterm is not widely used anymore, it was an old xterm
|
||||
fork but it isn't UTF-8 capable.
|
||||
- make it compile on Darwin 8.6
|
||||
- fold in patches initviocons-0.4.dif (c shell eval mode)
|
||||
initviocons.minimal-termsize.patch [#140383]
|
||||
initviocons.ps3-hack.patch
|
||||
initviocons.ps3-matching.patch
|
||||
* Tue Jul 17 2007 - sassmann@suse.de
|
||||
- added new /proc/device-tree/model matching for ps3 detection
|
||||
* Tue Apr 24 2007 - olh@suse.de
|
||||
|
Loading…
Reference in New Issue
Block a user