[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: replacing makedev

This was my initial solution (${device/-/_}); however, this requires
(afaict) doing that to the device arg, doing it for every possible
character that might be used in a device name, and means that the
actual entry in /dev will have that name (unless specifically worked
around).  Basically, it's a hack on top of another hack..  At some
point, doing things properly will be necessary.

On Sun, Jul 07, 2002 at 07:22:27PM -0400, Clint Adams wrote:
> > 1) It does a nasty 'eval "major_$device=$major"', where $device and
> > $major come from /proc/devices, for every single device listed.  This
> > breaks with devices that have names that aren't allowed as shell
> > variable names, such as "device-mapper".  This is also apparent in bug
> > #104254.  It wouldn't be as annoying if it only happened when trying to
> > create said devices, but breakage occurs when trying to use makedev at
> > all.
> This can be fixed without a rewrite; to deal with the hyphen, one could
> change $device to ${device/-/_}.  As for the % stuff (does this ever
> happen when devfs isn't compiled in?), one could change $device to
> ${device%%/*}.

Broad surveillance is a mark of bad security.
	-- Bruce Schneier

To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: