Commit b9b02aa6 authored by Natanael Copa's avatar Natanael Copa

testing/devicemaster-linux-grsec: new aport

NS-Link Device Drivers 7.06 for linux-grsec
http://www.comtrol.com/resources/product-resources-white-papers/ns-link-device-drivers

fixes #761
parent 5862b6a3
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_flavor=grsec
_kpkg=linux-$_flavor
_kver=3.14.22
_kpkgrel=1
_mypkgrel=0
_kpkgver="$_kver-r$_kpkgrel"
_abi_release=${_kver}-${_kpkgrel}-${_flavor}
_realname=devicemaster-linux
pkgname=${_realname}-${_flavor}
pkgver=$_kver
# when changing _realver we *must* bump _mypkgrel
_realver=7.06
pkgrel=$(( $_kpkgrel + $_mypkgrel ))
pkgdesc="NS-Link Device Drivers $_realver for linux-$_flavor"
url="http://www.comtrol.com/resources/product-resources-white-papers/ns-link-device-drivers"
arch="all"
license="GPL"
depends="linux-${_flavor}=${_kpkgver}"
makedepends="linux-${_flavor}-dev=${_kpkgver}"
install=
install_if="$_kpkg=$_kpkgver $_realname"
subpackages=""
source="ftp://ftp.comtrol.com/dev_mstr/rts/drivers/linux/devicemaster-linux-$_realver.tar.gz
nslink.patch
"
prepare() {
# verify the kernel version
(if [ -f ../../main/linux-${_flavor}/APKBUILD ]; then
_name=$pkgname
. ../../main/linux-${_flavor}/APKBUILD
pkgname=$_name
[ "$_kver" != "$pkgver" ] \
&& die "please update _kver to $pkgver"
[ "$_kpkgrel" != "$pkgrel" ] \
&& die "please update _kpkgrel to $pkgrel"
fi) || return 1
cd "$srcdir/$_realname-$_realver"
for i in $source; do
case $i in
*.patch|*.diff)
msg "Applying $i"
patch -p1 -i "$srcdir"/$i || return 1
;;
esac
done
}
build() {
cd "$srcdir/$_realname-$_realver"
make -C /lib/modules/$_abi_release/build SUBDIRS="$PWD" modules \
|| return 1
}
package() {
cd "$srcdir/$_realname-$_realver"
mkdir -p "$pkgdir/lib/modules/${_abi_release}/misc/"
cp *.ko "$pkgdir/lib/modules/${_abi_release}/misc/" || return 1
}
md5sums="deded30023c8135c9beb06696e8c578f devicemaster-linux-7.06.tar.gz
a15ebdcb005256e223febe1d2dba42b6 nslink.patch"
sha256sums="6b11295952d1d74a6102a295a6ed5651ec040a0d8c30838cd23a1f3f7c95a4e7 devicemaster-linux-7.06.tar.gz
60c0106d23126ed8053b46547eed030414cadac940e2b69f76cfc3e74575a1e1 nslink.patch"
sha512sums="496144ee40464c96442ce655424db886cb5b4df1701e30cc8d059fc918e8916cb6c3b0b57cead2d0e9d50e4618ee13efa5f3630765545ea45e29f8080101800b devicemaster-linux-7.06.tar.gz
7fe4e5482cd5900e0795bf4a5cb52924453fa21e2b94ffabe5f53dc61fc421e7e96cd5df241721a122c5b01c0ef159aa6082d6f2e93329012ebcf63a55c32825 nslink.patch"
--- ./nslink.c.orig
+++ ./nslink.c
@@ -2864,7 +2864,7 @@
info = nrp_table[line];
- DebugOpen("ttySI%d (count=%d) enter\n", line, info->port.count);
+ DebugOpen("ttySI%d (count=%d) enter\n", line, info->port.count.counter);
if (!info->si) {
DebugOpenErr("ttySI%d info->si==NULL: return -ENODEV\n", line);
@@ -2880,9 +2880,9 @@
ret = tty_port_open(&info->port, tty, filp);
if (ret && ret != -ERESTARTSYS)
- DebugOpenErr("ttySI%d (count=%d) return %d\n", line, info->port.count,ret);
+ DebugOpenErr("ttySI%d (count=%d) return %d\n", line, info->port.count.counter,ret);
else
- DebugOpen("ttySI%d (count=%d) return %d\n", line, info->port.count,ret);
+ DebugOpen("ttySI%d (count=%d) return %d\n", line, info->port.count.counter,ret);
return ret;
}
@@ -2925,9 +2925,9 @@
static void nrp_close(struct tty_struct *tty, struct file *filp)
{
struct nr_port *info = (struct nr_port *) tty->driver_data;
- DebugOpen("ttySI%d (count=%d) enter\n", info->line, info->port.count);
+ DebugOpen("ttySI%d (count=%d) enter\n", info->line, info->port.count.counter);
tty_port_close(&info->port, tty, filp);
- DebugOpen("ttySI%d (count=%d) return\n", info->line, info->port.count);
+ DebugOpen("ttySI%d (count=%d) return\n", info->line, info->port.count.counter);
}
static void nrp_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
@@ -4786,7 +4786,7 @@
info = nrp_table[i + si->base_port];
if (!info)
continue;
- if (info->port.count) {
+ if (info->port.count.counter) {
DebugOpenErr("Attempt to free_si_box() with port open\n");
return -EBUSY;
}
@@ -5008,7 +5008,7 @@
for (i=0; i<NumElements(nrp_table); ++i) {
struct nr_port *info = nrp_table[i];
if (info) {
- seq_printf(m,"%3d %4d %02x %6d ", i, info->port.count, info->rsmode, info->baud_rate);
+ seq_printf(m,"%3d %4d %02x %6d ", i, info->port.count.counter, info->rsmode, info->baud_rate);
// Ctrl ...
seq_printf(m, (info->control_settings & SC_DATABITS_7) ? "7" : "8");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment