diff options
author | Karel Kočí <cynerd@email.cz> | 2017-10-29 21:32:07 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-10-29 21:37:57 +0100 |
commit | cc62363ea73e4b268dc6e45810fba56941ea8c16 (patch) | |
tree | 36ddb2631e674393d42cdbf52d8c443360765ce6 /net-dialup/sterm/files/Print-more-descriptive-error-message.patch | |
parent | 4b2fcc7552989911b9401837966eececdc106ad1 (diff) | |
download | gentoo-personal-overlay-cc62363ea73e4b268dc6e45810fba56941ea8c16.tar.gz gentoo-personal-overlay-cc62363ea73e4b268dc6e45810fba56941ea8c16.tar.bz2 gentoo-personal-overlay-cc62363ea73e4b268dc6e45810fba56941ea8c16.zip |
Update sterm
Diffstat (limited to 'net-dialup/sterm/files/Print-more-descriptive-error-message.patch')
-rw-r--r-- | net-dialup/sterm/files/Print-more-descriptive-error-message.patch | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/net-dialup/sterm/files/Print-more-descriptive-error-message.patch b/net-dialup/sterm/files/Print-more-descriptive-error-message.patch deleted file mode 100644 index 9db1dad..0000000 --- a/net-dialup/sterm/files/Print-more-descriptive-error-message.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 613b8407347b063320ebf408d06bb120293c6c3a Mon Sep 17 00:00:00 2001 -From: Michal Sojka <sojkam1@fel.cvut.cz> -Date: Thu, 4 May 2017 00:00:10 +0200 -Subject: [PATCH] Print more descriptive error message - ---- - sterm.c | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/sterm.c b/sterm.c -index b375caf..ea86573 100644 ---- a/sterm.c -+++ b/sterm.c -@@ -31,6 +31,7 @@ - - #define _BSD_SOURCE - #define _DEFAULT_SOURCE -+#define _GNU_SOURCE - #include <sys/ioctl.h> - #include <sys/types.h> - #include <unistd.h> -@@ -44,6 +45,7 @@ - #include <string.h> - #include <signal.h> - #include <lockdev.h> -+#include <errno.h> - - #define STRINGIFY(val) #val - #define TOSTRING(val) STRINGIFY(val) -@@ -269,7 +271,12 @@ int main(int argc, char *argv[]) - fprintf(stderr, "%s is used by PID %d\n", dev, pid); - exit(1); - } else if (pid < 0) { -- perror("dev_lock()"); -+ char *msg; -+ asprintf(&msg, "dev_lock('%s')", dev); /* No free() because we exit() immediately */ -+ if (errno) -+ perror(msg); -+ else -+ fprintf(stderr, "%s: Error\n", msg); - exit(1); - } - atexit(unlock); --- -2.13.0 - |