[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [MiNT] Detecting serial-devices
> -----Original Message-----
> From: Katherine Ellis [mailto:kellis@leading.net]
> Sent: Thursday, October 07, 1999 7:33 PM
> To: unlisted-recipients
> Cc: mint
> Subject: Re: [MiNT] Detecting serial-devices
>
> correct, how often do you really upgrade driver? every session?
In some instances - yes. E.g. I don't always boot with HS-Modem, and
sometimes I use NVDI 4.12 instead of 5.02 etc.
> I believe in the same theory, everytime you switch ISP you
> need to edit
> your /etc/resolv.conf is that expected? I believe so.
I don't quite follow you... No, you don't *have* to edit resolv.conf when
you switch ISP although it's quite rude not to. Btw. when is this file read
anyway? During initalization or whenever the resolver is used?
Anyway, resolv.conf is a bad idea and I really hope there's some other way
of configuring DNS and domain.
> > you need some sort of API to access it. Is this easier than
> asking the
> > devices directly?
> a simple parser that can even be writen in sh or GFA basic,
> just need to
> parse the ascii file to get your info. I don't see any problem here.
And why would this be easier than using a ioctl or some other system-call?
Is it faster? Is the code more compact? Is it more reliable? Is the
information more up-to-date?
> basically, everytime you run the program it will do the same
> scan over and
> over even if you havn't updated your hardware/driver, no big deal.
Well, with your idea the same program would have to open and parse a file
every time you run it, and it will get the same information over and over
even if you haven't updated anything. And even worse, if you've forgotten to
update this file (e.g. if you boot with fserial instead of HS-Modem) the
information will be incorrect.
> That was just a proposition which makes sense in other
> OSes/environment.
I don't know of any OS that use this approach, apart from perhaps the
registry in Windows.
> Got any better idea?
First of all, supporting HS-Modem ioctls in MiNT's serialdevices would be a
good start. Frank has already done a lot of work here, soon we can ditch
HS-Modem entirely :-)
Then I think we need something like Dpathconf() that works on devices.
Something like "Ddevconf(mode, name, arg)". We would then need modes to
return type of device (e.g. SERIALPORT), it's full name ("Modem 2"),
available baudrates, handshake, DTR etc. This would have to be supported by
both the kernel and the devicedrivers ofcourse.
Btw. I guess we could use Dpathconf() instead of using another opcode,
simply by passing the name to a device ("/dev/something") instead of the
name to a filesystem.
Jo Even Skarstein