Plan 9 from Bell Labs’s /usr/web/sources/patch/sorry/doc-man-4-usb-usbstart-usbprinter/usbprinter

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc

if (! test -e /dev/usb)
	bind -b '#U' /dev

for(i in /dev/usb?/[0-9]*){
	if (grep -s 'Enabled 0x020107' $i/status){
		echo -n 'ep 2 bulk w 64 32' >$i/ctl
		bind $i/ep2data /n/lp
		exit ''
	}
}
exit 'no printer'

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.