DragonFly BSD
DragonFly kernel List (threaded) for 2004-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

cdevsw_add() vs make_dev()


From: Chuck Tuffli <chuck_tuffli@xxxxxxxxxxx>
Date: Tue, 5 Oct 2004 09:33:37 -0700

In my continuing quest to port a driver from Free to DFly, I've run
into something I don't understand with the device structures. In Free,
if the driver exported an ioctl interface, it defined the ioctl
handler in struct cdevsw and called something like

make_dev(&svd_cdevsw, device_get_unit(dev), UID_ROOT,
	GID_OPERATOR, 0600, "%s", device_get_nameunit(dev));

Doing this on DFly doesn't seem sufficient. Apps making an ioctl to
this device error out on the open with a 'Device not configured' error
message. Investigating a little, I found that other drivers added a
call to

cdevsw_add(&svd_cdevsw, -1, device_get_unit(dev));

What is this call doing differently than what make_dev provides?

-- 
Chuck Tuffli
Agilent Technologies



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