-/**
- * lttng_metadata_cmd - lttng control through object descriptors
- *
- * @objd: the object descriptor
- * @cmd: the command
- * @arg: command arg
- *
- * This object descriptor implements lttng commands:
- * LTTNG_UST_STREAM
- * Returns an event stream file descriptor or failure.
- *
- * Channel and event file descriptors also hold a reference on the session.
- */
-static
-long lttng_metadata_cmd(int objd, unsigned int cmd, unsigned long arg)
-{
- struct ltt_channel *channel = objd_private(objd);
-
- switch (cmd) {
- case LTTNG_UST_STREAM:
- {
- struct lttng_ust_stream *stream;
-
- stream = (struct lttng_ust_stream *) arg;
- /* stream used as output */
- return lttng_abi_open_stream(objd, stream);
- }
- case LTTNG_UST_FLUSH_BUFFER:
- return channel->ops->flush_buffer(channel->chan, channel->handle);
- default:
- return -EINVAL;
- }
-}
-
-#if 0
-/**
- * lttng_channel_poll - lttng stream addition/removal monitoring
- *
- * @file: the file
- * @wait: poll table
- */
-unsigned int lttng_channel_poll(struct file *file, poll_table *wait)
-{
- struct ltt_channel *channel = file->private_data;
- unsigned int mask = 0;
-
- if (file->f_mode & FMODE_READ) {
- poll_wait_set_exclusive(wait);
- poll_wait(file, channel->ops->get_hp_wait_queue(channel->chan),
- wait);
-
- if (channel->ops->is_disabled(channel->chan))
- return POLLERR;
- if (channel->ops->is_finalized(channel->chan))
- return POLLHUP;
- if (channel->ops->buffer_has_read_closed_stream(channel->chan))
- return POLLIN | POLLRDNORM;
- return 0;
- }
- return mask;
-
-}
-#endif //0
-