[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: fn key on lombard (and up) powerbooks...



Josh Huber <huber@debian.org> writes:

> It seems to work fine on my powerbook, which is great.

It works fine for me too on my TiBook.

> So, my real question is this...how should this be integrated with
> pmud-utils/pmud. (I think it should somehow be put in Debian)

I think it should be integrated too, after applying the attached
patch.  Doesn't anyone else compile with -Wall?

cd ~/c/
diff -u /home/walters/c/fnset.c\~ /home/walters/c/fnset.c
--- /home/walters/c/fnset.c~	Tue Oct  9 21:45:38 2001
+++ /home/walters/c/fnset.c	Tue Oct  9 21:48:39 2001
@@ -18,6 +18,8 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
 #include <linux/adb.h>
 #include <linux/pmu.h>
 
@@ -61,7 +63,7 @@
 
     if (debug) {
 	int i;
-	fprintf(stderr, "writing %ld bytes: {", sz);
+	fprintf(stderr, "writing %ld bytes: {", (long) sz);
 	for (i = 0; i < sz; i++) {
 	    fprintf(stderr, " 0x%02x", data[i]);
 	}
@@ -75,7 +77,7 @@
 		    prog, strerror(errno));
 	} else {
 	    fprintf(stderr, "%s: write(): expected %ld got %ld\n",
-		    prog, sz, n);
+		    prog, (long) sz, (long) n);
 	}
 	return -1;
     }
@@ -96,7 +98,7 @@
 
     if (debug) {
 	int i;
-	fprintf(stderr, "read %ld bytes", n);
+	fprintf(stderr, "read %d bytes", n);
 	if (n > 0) {
 	    fputs(": {", stderr);
 	    for (i = 0; i < n; i++) {
@@ -129,7 +131,7 @@
 	return -1;
     }
     if (n != 2) {
-	fprintf(stderr, "%s: read(): expected 2 got %ld\n",
+	fprintf(stderr, "%s: read(): expected 2 got %d\n",
 		prog, n);
 	return -1;
     }
@@ -258,7 +260,6 @@
 main(int argc, char *argv[], char *envp[])
 {
     const char *adb = "/dev/adb";
-    unsigned char data[32];
     const char *optlet = "dvhsubvP:";
 
     extern char *optarg;
@@ -365,7 +366,7 @@
 
     if (bitpos && !force) {
 	fprintf(stderr,
-		"%: WARNING: use of bit offset other than 0 (-P option)"
+		"%s: WARNING: use of bit offset other than 0 (-P option)"
 		"requires force (-f option) since it may damage hardware!\n",
 		prog);
     }

Diff finished at Tue Oct  9 21:48:53

Reply to: