tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: I can't generate a kernel crash core.
christos%astron.com@localhost (Christos Zoulas) writes:
>It is not easy to go from dev_t -> device_t to exclude...
Ideally its impossible because both aren't related. But
the common idiom is to search for the device with the
same name.
Something like:
bool is_the_dump_device(device_t dev)
{
const char *driver;
device_t d;
if (bdev_type(dumpdev) != D_DISK)
return false;
driver = devswblk2name(major(dumpdev));
d = device_find_by_driver_unit(driver, DISKUNIT(dumpdev));
return d == dev;
}
--
--
Michael van Elst
Internet: mlelstv%serpens.de@localhost
"A potential Snark may lurk in every tree."
Home |
Main Index |
Thread Index |
Old Index