mpath
char *driver, *mpath, *fullpath;
if ((mpath = di_devfs_minor_path(m)) == NULL) {
if (asprintf(&fullpath, "/devices/%s", mpath) == -1) {
warn("failed to construct /devices path from %s", mpath);
if (isblk && strcmp(mpath(cp), "") != 0) {
(void) printf(" %s\n", mpath(file));
static char *mpath(char *);
char apath[MAXPATHLEN], mpath[MAXPATHLEN];
if (snprintf(mpath, sizeof (mpath), "%s%s", rootdir,
TMPMAP) >= sizeof (mpath))
mpathp = mpath;
walk_cache_minor(di_devlink_handle_t hdp, const char *mpath, link_desc_t *linkp)
assert(mpath);
if ((cmnp = lookup_minor(hdp, mpath, NULL, TYPE_CACHE)) != NULL) {
devlink_dprintf(DBG_ERR, "lookup minor failed: %s\n", mpath);
static void walk_cache_minor(di_devlink_handle_t hdp, const char *mpath,
char *mpath = di_devfs_minor_path(m);
if (mpath == NULL) {
di_devfs_path_free(mpath);
int fd = openat(hdl->ih_devfd, mpath + 1, O_RDONLY);
di_devfs_path_free(mpath);
"open device path '/devices%s: %s", mpath,
di_devfs_path_free(mpath);
char *mpath = zpool_vdev_name(zhp->zpool_hdl, zhp,
boolean_t result = (strcmp(mpath, spath) == 0);
free(mpath);
free(mpath);
mpath = di_devfs_minor_path(minor);
if (mpath == NULL) {
if (snprintf(path, sizeof (path), "/devices%s", mpath) >=
"%s: snprintf buffer would have overflowed", mpath);
di_devfs_path_free(mpath);
char name[128], *mpath, path[PATH_MAX];
static char mpath[MAXPATHLEN];
if (plat_devpath("mouse8042", mpath) == NULL)
return (mpath);
struct msu_path *mpath;
mpath = (struct msu_path *)kmem_zalloc((size_t)len, KM_SLEEP);
mpath->num = 1;
mdev = (struct msu_dev *)(mpath + 1);
if ((oplmsu_config_del(mpath)) == 0) {
kmem_free(mpath, (size_t)len);
struct msu_path *mpath;
mpath = (struct msu_path *)kmem_zalloc((size_t)len, KM_SLEEP);
mpath->num = 1;
mdev = (struct msu_dev *)(mpath + 1);
rval = oplmsu_config_del(mpath);
kmem_free(mpath, (size_t)len);
struct msu_path *mpath;
mpath = (struct msu_path *)kmem_zalloc((size_t)size, KM_SLEEP);
mdev = (struct msu_dev *)(mpath + 1);
kmem_free(mpath, size);
mpath->num = connected;
rval = oplmsu_config_new(mpath);
kmem_free(mpath, size);
rval = oplmsu_config_del(mpath);
kmem_free(mpath, size);
oplmsu_config_new(struct msu_path *mpath)
ASSERT(mpath);
if (mpath->num == 0) {
"Number of paths = %d", mpath->num);
mdev = (struct msu_dev *)(mpath + 1);
for (i = 0; i < mpath->num; i++) {
oplmsu_uinst->path_num = mpath->num;
oplmsu_config_del(struct msu_path *mpath)
ASSERT(mpath);
mdev = (struct msu_dev *)(mpath + 1);
for (i = 0; i < mpath->num; i++) {