X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/676c017ecfced2e37aeec176f8aa6b9df90024f3..0251db4d4bb07fa5400c8d73411269a04e31674d:/package/busybox/patches/340-lock_util.patch diff --git a/package/busybox/patches/340-lock_util.patch b/package/busybox/patches/340-lock_util.patch index f5c0c2e89..ad594e68d 100644 --- a/package/busybox/patches/340-lock_util.patch +++ b/package/busybox/patches/340-lock_util.patch @@ -1,3 +1,6 @@ + + Copyright (C) 2006 OpenWrt.org + diff -urN busybox.old/include/applets.h busybox.dev/include/applets.h --- busybox.old/include/applets.h 2006-04-05 01:06:29.000000000 +0200 +++ busybox.dev/include/applets.h 2006-04-05 01:19:09.000000000 +0200 @@ -39,7 +42,12 @@ diff -urN busybox.old/miscutils/Makefile.in busybox.dev/miscutils/Makefile.in diff -urN busybox.old/miscutils/lock.c busybox.dev/miscutils/lock.c --- busybox.old/miscutils/lock.c 1970-01-01 01:00:00.000000000 +0100 +++ busybox.dev/miscutils/lock.c 2006-04-05 01:07:12.000000000 +0200 -@@ -0,0 +1,125 @@ +@@ -0,0 +1,133 @@ ++/* ++ * Copyright (C) 2006 Felix Fietkau ++ * ++ * This is free software, licensed under the GNU General Public License v2. ++ */ +#include +#include +#include @@ -77,10 +85,13 @@ diff -urN busybox.old/miscutils/lock.c busybox.dev/miscutils/lock.c + FILE *f; + int i; + -+ f = fopen(file, "r"); ++ if ((f = fopen(file, "r")) == NULL) ++ return 0; ++ + fscanf(f, "%d", &i); + if (i > 0) + kill(i, SIGTERM); ++ + fclose(f); + + return 0;