]> git.tue.mpg.de Git - paraslash.git/commitdiff
oss: Kill non-btr code.
authorAndre Noll <maan@systemlinux.org>
Wed, 13 Jan 2010 21:01:55 +0000 (22:01 +0100)
committerAndre Noll <maan@systemlinux.org>
Wed, 13 Jan 2010 21:01:55 +0000 (22:01 +0100)
oss_write.c

index c1717eb868cf6757e0aa447e9d6353273a47d89e..f64603ccc41fef8ac64cafed91ad20bd33742769 100644 (file)
@@ -46,17 +46,6 @@ struct private_oss_write_data {
        int bytes_per_frame;
 };
 
-static int oss_pre_select(struct sched *s, struct writer_node *wn)
-{
-       struct private_oss_write_data *powd = wn->private_data;
-       struct writer_node_group *wng = wn->wng;
-
-       if (*wng->loaded - wn->written < powd->bytes_per_frame)
-               return 0;
-       para_fd_set(powd->fd, &s->wfds, &s->max_fileno);
-       return 1;
-}
-
 static void oss_pre_select_btr(struct sched *s, struct task *t)
 {
        struct writer_node *wn = container_of(t, struct writer_node, task);
@@ -77,31 +66,6 @@ min_delay:
        s->timeout.tv_usec = 1;
 }
 
-static int oss_post_select(struct sched *s, struct writer_node *wn)
-{
-       int ret;
-       struct private_oss_write_data *powd = wn->private_data;
-       struct writer_node_group *wng = wn->wng;
-       size_t frames, bytes = *wng->loaded - wn->written;
-       char *data = *wng->bufp + wn->written;
-
-       if (*wng->input_error < 0 && bytes < powd->bytes_per_frame) {
-               wn->written = *wng->loaded;
-               return *wng->input_error;
-       }
-       frames = bytes / powd->bytes_per_frame;
-       if (!frames) /* less than a single frame available */
-               goto out;
-       if (!FD_ISSET(powd->fd, &s->wfds))
-               goto out;
-       ret = write_nonblock(powd->fd, data, frames * powd->bytes_per_frame, 0);
-       if (ret < 0)
-               return ret;
-       wn->written += ret;
-out:
-       return 1;
-}
-
 static void oss_close(struct writer_node *wn)
 {
        struct private_oss_write_data *powd = wn->private_data;
@@ -303,9 +267,7 @@ void oss_write_init(struct writer *w)
        oss_cmdline_parser_init(&dummy);
        w->open = oss_open;
        w->close = oss_close;
-       w->pre_select = oss_pre_select;
        w->pre_select_btr = oss_pre_select_btr;
-       w->post_select = oss_post_select;
        w->post_select_btr = oss_post_select_btr;
        w->parse_config = oss_parse_config;
        w->free_config = oss_free_config;