libfuse: remove deprecated fuse_read_cmd(), fuse_process_cmd()
authorMiklos Szeredi <mszeredi@suse.cz>
Fri, 8 Feb 2013 07:03:02 +0000 (08:03 +0100)
committerMiklos Szeredi <mszeredi@suse.cz>
Fri, 8 Feb 2013 07:03:02 +0000 (08:03 +0100)
ChangeLog
include/fuse.h
lib/fuse.c
lib/fuse_versionscript

index 832ecf77f850779bbdb195d4c0ca813b13a0c419..434d1000cfdf9e4d488b6a78d61e14bdaec34e47 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,8 @@
        - fuse_invalidate()
        - fuse_set_getcontext_func()
        - fuse_loop_mt_proc()
+       - fuse_read_cmd()
+       - fuse_process_cmd()
 
 2013-02-06  Miklos Szeredi <miklos@szeredi.hu>
 
index 07282ab4a4d6b604b5bfe845031b96cc5f993d96..361beface180b0fc21ad77a544b8a8f3dd6be86d 100644 (file)
@@ -942,9 +942,6 @@ void fuse_register_module(struct fuse_module *mod);
 /* NOTE: the following functions are deprecated, and will be removed
    from the 3.0 API.  Use the lowlevel session functions instead */
 
-/** Function type used to process commands */
-typedef void (*fuse_processor_t)(struct fuse *, struct fuse_cmd *, void *);
-
 /** This is the part of fuse_main() before the event loop */
 struct fuse *fuse_setup(int argc, char *argv[],
                        const struct fuse_operations *op, size_t op_size,
@@ -954,12 +951,6 @@ struct fuse *fuse_setup(int argc, char *argv[],
 /** This is the part of fuse_main() after the event loop */
 void fuse_teardown(struct fuse *fuse, char *mountpoint);
 
-/** Read a single command.  If none are read, return NULL */
-struct fuse_cmd *fuse_read_cmd(struct fuse *f);
-
-/** Process a single command */
-void fuse_process_cmd(struct fuse *f, struct fuse_cmd *cmd);
-
 /** Return the exited flag, which indicates if fuse_exit() has been
     called */
 int fuse_exited(struct fuse *f);
index c6865169d927e9d6dae0e70a760b5bddcee7aeeb..be06fba820fa41388d4e6bf7c6eb7709fdd52658 100644 (file)
@@ -4048,18 +4048,6 @@ int fuse_notify_poll(struct fuse_pollhandle *ph)
        return fuse_lowlevel_notify_poll(ph);
 }
 
-static void free_cmd(struct fuse_cmd *cmd)
-{
-       free(cmd->buf);
-       free(cmd);
-}
-
-void fuse_process_cmd(struct fuse *f, struct fuse_cmd *cmd)
-{
-       fuse_session_process(f->se, cmd->buf, cmd->buflen, cmd->ch);
-       free_cmd(cmd);
-}
-
 int fuse_exited(struct fuse *f)
 {
        return fuse_session_exited(f->se);
@@ -4070,41 +4058,6 @@ struct fuse_session *fuse_get_session(struct fuse *f)
        return f->se;
 }
 
-static struct fuse_cmd *fuse_alloc_cmd(size_t bufsize)
-{
-       struct fuse_cmd *cmd = (struct fuse_cmd *) malloc(sizeof(*cmd));
-       if (cmd == NULL) {
-               fprintf(stderr, "fuse: failed to allocate cmd\n");
-               return NULL;
-       }
-       cmd->buf = (char *) malloc(bufsize);
-       if (cmd->buf == NULL) {
-               fprintf(stderr, "fuse: failed to allocate read buffer\n");
-               free(cmd);
-               return NULL;
-       }
-       return cmd;
-}
-
-struct fuse_cmd *fuse_read_cmd(struct fuse *f)
-{
-       struct fuse_chan *ch = fuse_session_next_chan(f->se, NULL);
-       size_t bufsize = fuse_chan_bufsize(ch);
-       struct fuse_cmd *cmd = fuse_alloc_cmd(bufsize);
-       if (cmd != NULL) {
-               int res = fuse_chan_recv(&ch, cmd->buf, bufsize);
-               if (res <= 0) {
-                       free_cmd(cmd);
-                       if (res < 0 && res != -EINTR && res != -EAGAIN)
-                               fuse_exit(f);
-                       return NULL;
-               }
-               cmd->buflen = res;
-               cmd->ch = ch;
-       }
-       return cmd;
-}
-
 static int fuse_session_loop_remember(struct fuse *f)
 {
        struct fuse_session *se = f->se;
index 20d84f97dc90860bc543f38ca84526df7c6d6129..6e72dd63007afe581c5a5d0c8a3fd94ee5ae5623 100644 (file)
@@ -6,8 +6,6 @@ FUSE_3.0 {
                fuse_loop;
                fuse_loop_mt;
                fuse_main;
-               fuse_process_cmd;
-               fuse_read_cmd;
                fuse_chan_bufsize;
                fuse_chan_data;
                fuse_chan_destroy;