Lines Matching refs:index
35 static chan_t *create_new_channel(unsigned char index) in create_new_channel() argument
41 if (fdset[i].index == NODEV) { in create_new_channel()
43 channel->index = index; in create_new_channel()
57 if ((fd < 0) || (fd >= NR_CHANS) || (fdset[fd].index == NODEV)) { in fd_to_channel()
97 int index; in next() local
104 index = 0; in next()
108 if (index == NAMELEN) { in next()
111 token[index++] = *cursor++; in next()
114 token[index] = '\0'; in next()
125 int index; in get_device_index() local
128 for (index = 0, dp = devtab; *dp && (*dp)->id != id; ++dp) { in get_device_index()
129 index++; in get_device_index()
136 return index; in get_device_index()
146 channel->index = NODEV; in channel_clear()
195 static chan_t *mount_point_to_channel(int index, qid_t qid) in mount_point_to_channel() argument
206 if ((channel->index == index) && (channel->qid == qid)) { in mount_point_to_channel()
220 int index = get_device_index(id); in attach() local
222 if (index < 0) { in attach()
226 return devtab[index]->attach(id, dev); in attach()
236 int index; in devattach() local
238 index = get_device_index(id); in devattach()
239 if (index < 0) { in devattach()
243 channel = create_new_channel(index); in devattach()
306 if (devtab[channel->index]->walk(channel, elem) < 0) { in path_to_channel()
311 mnt = mount_point_to_channel(channel->index, channel->qid); in path_to_channel()
336 if (c->index == NODEV) { in clone()
340 return devtab[c->index]->clone(c, nc); in clone()
355 new_channel = create_new_channel(channel->index); in devclone()
365 new_channel->index = channel->index; in devclone()
449 dir->index = channel->index; in make_dir_entry()
538 mnt = mount_point_to_channel(dir->index, dir->qid); in devstat()
541 dir->index = mnt->index; in devstat()
544 if ((dir->qid != c->qid) || (dir->index != c->index)) { in devstat()
597 r = devtab[channel->index]->stat(channel, path, dir); in stat()
625 return devtab[channel->index]->read(channel, buf, n); in read()
650 return devtab[channel->index]->write(channel, buf, n); in write()
670 return devtab[channel->index]->seek(channel, off, whence); in seek()
801 mount_point_chan = devtab[channel->index]->mount(channel, spec); in mount()