Browse Source

Plan 9 from Bell Labs 2010-10-22

David du Colombier 13 years ago
parent
commit
ecdb0ddbbf
4 changed files with 11 additions and 6 deletions
  1. 2 0
      sys/src/9/port/devproc.c
  2. 1 1
      sys/src/9/port/portdat.h
  3. 2 0
      sys/src/cmd/usb/usbd/mkdev
  4. 6 5
      sys/src/cmd/usb/usbd/usbdb

+ 2 - 0
sys/src/9/port/devproc.c

@@ -239,6 +239,7 @@ procgen(Chan *c, char *name, Dirtab *tab, int, int s, Dir *dp)
 	tab = &procdir[s];
 	path = c->qid.path&~(((1<<QSHIFT)-1));	/* slot component */
 
+	/* p->procmode determines default mode for files in /proc */
 	p = proctab(SLOT(c->qid));
 	perm = tab->perm;
 	if(perm == 0)
@@ -495,6 +496,7 @@ procwstat(Chan *c, uchar *db, int n)
 		else
 			kstrdup(&p->user, d->uid);
 	}
+	/* p->procmode determines default mode for files in /proc */
 	if(d->mode != ~0UL)
 		p->procmode = d->mode&0777;
 

+ 1 - 1
sys/src/9/port/portdat.h

@@ -667,7 +667,7 @@ struct Proc
 
 	QLock	debug;		/* to access debugging elements of User */
 	Proc	*pdbg;		/* the debugging process */
-	ulong	procmode;	/* proc device file mode */
+	ulong	procmode;	/* proc device default file mode */
 	ulong	privatemem;	/* proc does not let anyone read mem */
 	int	hang;		/* hang at next exec for debug */
 	int	procctl;	/* Control for /proc debugging */

+ 2 - 0
sys/src/cmd/usb/usbd/mkdev

@@ -19,6 +19,7 @@ cat<<EOF
 EOF
 
 awk '
+/^#|^$/	{ next }
 collect && /^[^ \t]/{
 	collect = 0;
 }
@@ -38,6 +39,7 @@ cat <<EOF
 Devtab devtab[] = {
 	/* device, entrypoint, {csp, csp, csp csp}, vid, did */
 EOF
+
 awk '
 /^#|^$/	{ next }
 collect && /^[^ \t]/{

+ 6 - 5
sys/src/cmd/usb/usbd/usbdb

@@ -1,10 +1,11 @@
-# only kb,  disk, and ether  are prepared for embedding.
-# others are not yet converted to sit in the usbd device driver library
+# only kb, disk, and ether are prepared for embedding.
+# others are not yet converted to sit in the usbd device driver library.
 embed
 	kb	csp=0x010103 csp=0x020103	args=
 	disk	class=storage			args=
-	ether	class=255 csp=0x00ffff		args=
+	ether	class=255 csp=0x00ffff vid=0x0b95		args=
 	serial	class=255 csp=0xffffff vid=0x9e88 did=0x9e8f	args=
-#	wifi	class=0 csp=0 vid=0x0bda did=0x8192	args=
-#	wifi	class=0 csp=0 vid=0x148f did=0x2870	args=
+	serial	class=255 csp=0xffffff vid=0x0403		args=
+#	wifi	class=0 csp=0 vid=0x0bda did=0x8192		args=
+#	wifi	class=0 csp=0 vid=0x148f did=0x2870		args=
 auto