Skip to contentSkip to conversation

tslib: fix use of open()

PATCH New luca at lucaceresoli.net 2 participants 2 messages Apr 23, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tslib: fix use of open()

From: Luca Ceresoli <[email protected]>

Fixes error: "open with O_CREAT in second argument needs 3 arguments".

Original patch: svn://svn.berlios.de/tslib/trunk/tslib r72.

---
 ...b-1.0-open-with-O_CREAT-needs-3-arguments.patch |   25 ++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)
 create mode 100644 package/tslib/tslib-1.0-open-with-O_CREAT-needs-3-arguments.patch
package/tslib/tslib-1.0-open-with-O_CREAT-needs-3-arguments.patch new file +25 -0
new file mode 100644
index 0000000..92b33f8
@@ -0,0 +1,25 @@
+diff -ur a/tests/ts_calibrate.c b/tests/ts_calibrate.c
+--- a/tests/ts_calibrate.c	2010-04-22 17:36:33.000000000 +0200
++++ b/tests/ts_calibrate.c	2010-04-22 17:38:09.000000000 +0200
+@@ -21,6 +21,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+ #include <sys/time.h>
++#include <sys/stat.h>
+ #include <linux/kd.h>
+ #include <linux/vt.h>
+ #include <linux/fb.h>
+@@ -224,9 +225,11 @@
+ 		for (i = 0; i < 7; i++) printf("%d ", cal.a [i]);
+ 		printf("\n");
+ 		if ((calfile = getenv("TSLIB_CALIBFILE")) != NULL) {
+-			cal_fd = open (calfile, O_CREAT | O_RDWR);
++		  cal_fd = open (calfile, O_CREAT | O_RDWR,
++		                 S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ 		} else {
+-			cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR);
++			cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR,
++		                 S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ 		}
+ 		sprintf (cal_buffer,"%d %d %d %d %d %d %d",
+ 			 cal.a[1], cal.a[2], cal.a[0],
Signature · 1 line
1.6.3.3
#1 lore raw

PATCH 1/1 tslib: fix use of open()

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"luca" == luca <[email protected]> writes:

luca> From: Luca Ceresoli <[email protected]>
luca> Fixes error: "open with O_CREAT in second argument needs 3 arguments".

luca> Original patch: svn://svn.berlios.de/tslib/trunk/tslib r72.

Thanks, committed - I grabbed the original patch for commit message / attribution though.

Signature · 1 line
Bye, Peter Korsgaard