rem: int err = 0;
context: devfs_seek(fs_cookie _fs, fs_vnode _v, file_cookie _cookie, off_t pos, int st){	struct devfs *fs = _fs;	struct devfs_vnode *v = _v;	struct devfs_cookie *cookie = _cookie;	int err = 0;	TRACE(("devfs_seek: vnode 0x%x, cookie 0x%x, pos 0x%x 0x%x, seek_type %d\n", v, cookie, pos, st));	switch(cookie->s->type) {		case STREAM_TYPE_DIR:			mutex_lock(&fs->lock);			switch(st) {				// only valid args are seek_type SEEK_SET, pos 0.				// this rewinds to beginning of directory				case SEEK_SET:					if(pos == 0) {						cookie->u.dir.ptr = cookie->s->u.dir.dir_head;					} else {						err = ESPIPE;					}					break;				case SEEK_CUR:				case SEEK_END:				default:					err = EINVAL;			}			mutex_unlock(&fs->lock);			break;		case STREAM_TYPE_DEVICE:			dprintf("seek not supported!\n");			//err = v->stream.u.dev.calls->dev_seek(cookie->u.dev.dcookie, pos, st);			break;		default:			err = EINVAL;	}	return err;}