Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Webb arachsys

View GitHub Profile
@arachsys
arachsys / detach.c
Last active Feb 6, 2022
Run programs on a pty and capture stdout
View detach.c
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <pty.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char **argv) {
char buffer[BUFSIZ];
@arachsys
arachsys / fmt.patch
Created Jul 21, 2021
Disable double spaces between sentences in GNU fmt
View fmt.patch
diff --git a/src/fmt.c b/src/fmt.c
index d1e3bc3..6c5f982 100644
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -40,7 +40,7 @@
"best". Adjust to taste, subject to the caveats given. */
/* Default longest permitted line length (max_width). */
-#define WIDTH 75
+#define WIDTH 76
@arachsys
arachsys / proto-qmi.diff
Created Feb 27, 2020
Fix openwrt /lib/netifd/proto/qmi.sh to allow direct address configuration of qmi interfaces
View proto-qmi.diff
diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
index 8cbe9e97e7..4aadd57813 100755
--- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
+++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
@@ -19,6 +19,7 @@ proto_qmi_init_config() {
proto_config_add_string modes
proto_config_add_string pdptype
proto_config_add_int profile
+ proto_config_add_boolean dhcp
proto_config_add_boolean dhcpv6
@arachsys
arachsys / uqmi.patch
Created Feb 20, 2020
Locking fix for git://git.openwrt.org/project/uqmi.git
View uqmi.patch
diff --git a/dev.c b/dev.c
index bd10207..d14255a 100644
--- a/dev.c
+++ b/dev.c
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <sys/file.h>
#include "uqmi.h"
@arachsys
arachsys / openwrt.patch
Created Feb 20, 2020
My local openwrt diff: cosmetics, uqmi bug-fix, and usleep command in ash
View openwrt.patch
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index cf5166772d..f325630bd7 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -147,13 +147,9 @@ define Package/base-files/install
)
$(VERSION_SED_SCRIPT) \
- $(1)/etc/banner \
- $(1)/etc/openwrt_version \
@arachsys
arachsys / 8N70OS_.PGM
Last active Jul 18, 2021
Obtaining a shell on Yamaha Montage
@arachsys
arachsys / khadas-edge.patch
Created Jul 29, 2019
U-Boot device tree and configuration for Khadas Edge
View khadas-edge.patch
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index e985884d9a..c7bb110389 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -108,6 +108,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3399) += \
rk3399-ficus.dtb \
rk3399-firefly.dtb \
rk3399-gru-bob.dtb \
+ rk3399-khadas-edge.dtb \
rk3399-nanopc-t4.dtb \
@arachsys
arachsys / 8N70OS_.PGM
Last active Jul 18, 2021
Fixing CFX PopStudioGrand on Yamaha Montage
@arachsys
arachsys / siginfo.patch
Created Jul 6, 2012
Fix gdb to use siginfo_t instead of struct siginfo
View siginfo.patch
From 0bcbef9314d6679d1fbbb0114683d06de0196623 Mon Sep 17 00:00:00 2001
Message-Id: <0bcbef9314d6679d1fbbb0114683d06de0196623.1341578007.git.chris@arachsys.com>
From: Chris Webb <chris@arachsys.com>
Date: Fri, 6 Jul 2012 13:18:58 +0100
Subject: [PATCH] Replace struct siginfo with siginfo_t
Glibc 2.16.0 removes the undocumented definition of 'struct siginfo' from
<bits/siginfo.h>. This struct is also available as the POSIX-defined
siginfo_t, so replace all uses of struct siginfo with siginfo_t.
@arachsys
arachsys / README
Last active Jul 3, 2022
Notes on making a signed software release
View README
Making a new-style signed git tag
=================================
With git configured to use ssh-ed25519 signing, create a signed tag called
NAME-VERSION with
git tag --message=NAME-VERSION --sign NAME-VERSION
Making an old-style signed software release