Changeset View
Changeset View
Standalone View
Standalone View
stand/common/devopen.c
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | devopen(struct open_file *f, const char *fname, const char **file) | ||||
result = archsw.arch_getdev((void **)&dev, fname, file); | result = archsw.arch_getdev((void **)&dev, fname, file); | ||||
if (result) | if (result) | ||||
return (result); | return (result); | ||||
/* point to device-specific data so that device open can use it */ | /* point to device-specific data so that device open can use it */ | ||||
f->f_dev = dev->d_dev; | f->f_dev = dev->d_dev; | ||||
f->f_devdata = dev; | f->f_devdata = dev; | ||||
result = dev->d_dev->dv_open(f, dev); | result = dev->d_dev->dv_open(f); | ||||
imp: Love this change. | |||||
if (result != 0) { | if (result != 0) { | ||||
f->f_devdata = NULL; | f->f_devdata = NULL; | ||||
f->f_dev = NULL; | f->f_dev = NULL; | ||||
free(dev); | free(dev); | ||||
return (result); | return (result); | ||||
} | } | ||||
#ifdef LOADER_GELI_SUPPORT | #ifdef LOADER_GELI_SUPPORT | ||||
Show All 18 Lines |
Love this change.