Messages in this thread Patch in this message | | | Date | Sun, 8 Feb 1998 08:03:32 -0500 (EST) | From | Adam Heath <> | Subject | Re: Patch: 2.1.85: Bugfix: LP device selection |
| |
On Sun, 8 Feb 1998, Tim Waugh wrote:
> On Sun, 8 Feb 1998, Adam Heath wrote: > > > When specifying lp devices to be associated with parport devices, lp.c says to > > use parport=-1,0 to make it work like 2.0. However, this doesn't work as > > advertised. It insists on makes lp0=parport0. The following *simple* patch > > fixes this, at least for me. All it does it move one line lower in the file. > > I don't think that quite gives the intended behaviour either. Below is a > patch to allow -1,0 to work as *well* as just leaving out the parameters. > > There's still a small problem with loading lp as a module in this way, in > that if you are using kerneld to load parport for you, you'll get parport0 > the first time but parport1 after parport0 goes away. > > Hope this patch works okay - it's been hand-modified to remove an > unrelated hunk. My current parport-related diffs are at > <ftp://ftp.torque.net/pub/parport/parport-diff-980208> and will soon > include this. > > Tim. > */
[diff deleted]
Like I said, it worked for me. I don't understand everything that was going on, and that simple patch fixed it. Your patch also works, and I do see the problem with parport0 changing to parport1. Below is a patch that sortof fixes this. You can now specify "parport=-1,-3,-1,-1,-3,...".
--- lp.c.orig Sun Feb 8 08:02:19 1998 +++ lp.c Sun Feb 8 07:57:37 1998 @@ -734,7 +736,14 @@ break; } } - } + }else + if(parport[count] == LP_PARPORT_AUTO) { + for (port = parport_enumerate(); port; + port = port->next) { + if(!lp_register(count, port)) + break; + } + } } break; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |