Re: ANNOUNCE: /dev/bios - flash rom bios driver

chip@atlantic.net
Wed, 11 Feb 1998 10:33:48 -0500 (EST)


According to Stefan Reinauer:
> > I agree. Perhaps the device should require that writing take place
> > at an offset greater than zero ("dd oskip=1k"?), and attempts to
> > write at offset zero should result in an immediate EINVAL or some
> > such error?
>
> I don't like that idea very much as it wouldn't map the hardware to a
> simple logical model. IMHO that is exactly what a hardware driver should
> do.

I can see that. But since writing the BIOS is so seldom useful, and
is almost always dangerous, limiting the device interface to reading
and requiring an ioctl for writing should be adequate.

If the ioctl _enabled_ writing until the next close, rather than
performing it, then you could even make a utility that only calls
ioctl() on stdout, and then you could still use dd:

(enable_bios_write; dd if=bios.image) >/dev/bios

-- 
Chip Salzenberg               - a.k.a. -                <chip@pobox.com>
         "Nice shooting, Zanthar!"  "Thanks, Denise."  // MST3K

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu