mirror of
https://github.com/libfuse/libfuse.git
synced 2024-11-23 12:14:15 +08:00
Renamed fuse_lowlevel_new() to fuse_session_new().
This commit is contained in:
parent
38ec9a4c2c
commit
f164e9b8ca
@ -1,6 +1,9 @@
|
|||||||
Unreleased Changes
|
Unreleased Changes
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
* The `fuse_lowlevel_new` function has been renamed to
|
||||||
|
`fuse_session_new`.
|
||||||
|
|
||||||
* There are now new `fuse_session_unmount` and `fuse_session_mount`
|
* There are now new `fuse_session_unmount` and `fuse_session_mount`
|
||||||
functions that should be used in the low-level API. The
|
functions that should be used in the low-level API. The
|
||||||
`fuse_mount` and `fuse_unmount` functions should be used with the
|
`fuse_mount` and `fuse_unmount` functions should be used with the
|
||||||
|
@ -471,7 +471,7 @@ int main(int argc, char *argv[])
|
|||||||
if (fuse_parse_cmdline(&args, &mountpoint, NULL, NULL) != -1 &&
|
if (fuse_parse_cmdline(&args, &mountpoint, NULL, NULL) != -1 &&
|
||||||
(ch = fuse_session_mount(mountpoint, &args)) != NULL) {
|
(ch = fuse_session_mount(mountpoint, &args)) != NULL) {
|
||||||
struct fuse_session *se;
|
struct fuse_session *se;
|
||||||
se = fuse_lowlevel_new(&args, &lo_oper, sizeof(lo_oper), &lo);
|
se = fuse_session_new(&args, &lo_oper, sizeof(lo_oper), &lo);
|
||||||
if (se != NULL) {
|
if (se != NULL) {
|
||||||
if (fuse_set_signal_handlers(se) != -1) {
|
if (fuse_set_signal_handlers(se) != -1) {
|
||||||
fuse_session_add_chan(se, ch);
|
fuse_session_add_chan(se, ch);
|
||||||
|
@ -194,7 +194,7 @@ int main(int argc, char *argv[])
|
|||||||
(ch = fuse_session_mount(mountpoint, &args)) != NULL) {
|
(ch = fuse_session_mount(mountpoint, &args)) != NULL) {
|
||||||
struct fuse_session *se;
|
struct fuse_session *se;
|
||||||
|
|
||||||
se = fuse_lowlevel_new(&args, &hello_ll_oper,
|
se = fuse_session_new(&args, &hello_ll_oper,
|
||||||
sizeof(hello_ll_oper), NULL);
|
sizeof(hello_ll_oper), NULL);
|
||||||
if (se != NULL) {
|
if (se != NULL) {
|
||||||
if (fuse_set_signal_handlers(se) != -1) {
|
if (fuse_set_signal_handlers(se) != -1) {
|
||||||
|
@ -170,7 +170,7 @@ struct fuse_lowlevel_ops {
|
|||||||
*
|
*
|
||||||
* There's no reply to this function
|
* There's no reply to this function
|
||||||
*
|
*
|
||||||
* @param userdata the user data passed to fuse_lowlevel_new()
|
* @param userdata the user data passed to fuse_session_new()
|
||||||
*/
|
*/
|
||||||
void (*init) (void *userdata, struct fuse_conn_info *conn);
|
void (*init) (void *userdata, struct fuse_conn_info *conn);
|
||||||
|
|
||||||
@ -181,7 +181,7 @@ struct fuse_lowlevel_ops {
|
|||||||
*
|
*
|
||||||
* There's no reply to this function
|
* There's no reply to this function
|
||||||
*
|
*
|
||||||
* @param userdata the user data passed to fuse_lowlevel_new()
|
* @param userdata the user data passed to fuse_session_new()
|
||||||
*/
|
*/
|
||||||
void (*destroy) (void *userdata);
|
void (*destroy) (void *userdata);
|
||||||
|
|
||||||
@ -1502,7 +1502,7 @@ int fuse_lowlevel_notify_retrieve(struct fuse_session *se, fuse_ino_t ino,
|
|||||||
* Get the userdata from the request
|
* Get the userdata from the request
|
||||||
*
|
*
|
||||||
* @param req request handle
|
* @param req request handle
|
||||||
* @return the user data passed to fuse_lowlevel_new()
|
* @return the user data passed to fuse_session_new()
|
||||||
*/
|
*/
|
||||||
void *fuse_req_userdata(fuse_req_t req);
|
void *fuse_req_userdata(fuse_req_t req);
|
||||||
|
|
||||||
@ -1602,17 +1602,18 @@ struct fuse_chan *fuse_session_mount(const char *mountpoint,
|
|||||||
* prints the requsted information to stdout and returns NULL.
|
* prints the requsted information to stdout and returns NULL.
|
||||||
*
|
*
|
||||||
* @param args argument vector
|
* @param args argument vector
|
||||||
* @param op the low level filesystem operations
|
* @param op the (low-level) filesystem operations
|
||||||
* @param op_size sizeof(struct fuse_lowlevel_ops)
|
* @param op_size sizeof(struct fuse_lowlevel_ops)
|
||||||
* @param userdata user data
|
* @param userdata user data
|
||||||
* @return the created session object, or NULL on failure
|
*
|
||||||
|
* @return the fuse session on success, NULL on failure
|
||||||
*
|
*
|
||||||
* Example: See hello_ll.c:
|
* Example: See hello_ll.c:
|
||||||
* \snippet hello_ll.c doxygen_fuse_lowlevel_usage
|
* \snippet hello_ll.c doxygen_fuse_lowlevel_usage
|
||||||
*/
|
**/
|
||||||
struct fuse_session *fuse_lowlevel_new(struct fuse_args *args,
|
struct fuse_session *fuse_session_new(struct fuse_args *args,
|
||||||
const struct fuse_lowlevel_ops *op,
|
const struct fuse_lowlevel_ops *op,
|
||||||
size_t op_size, void *userdata);
|
size_t op_size, void *userdata);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assign a channel to a session
|
* Assign a channel to a session
|
||||||
|
@ -170,7 +170,7 @@ struct fuse_session *cuse_lowlevel_new(struct fuse_args *args,
|
|||||||
lop.ioctl = clop->ioctl ? cuse_fll_ioctl : NULL;
|
lop.ioctl = clop->ioctl ? cuse_fll_ioctl : NULL;
|
||||||
lop.poll = clop->poll ? cuse_fll_poll : NULL;
|
lop.poll = clop->poll ? cuse_fll_poll : NULL;
|
||||||
|
|
||||||
se = fuse_lowlevel_new(args, &lop, sizeof(lop), userdata);
|
se = fuse_session_new(args, &lop, sizeof(lop), userdata);
|
||||||
if (!se) {
|
if (!se) {
|
||||||
free(cd);
|
free(cd);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -4719,7 +4719,7 @@ struct fuse *fuse_new(struct fuse_chan *ch, struct fuse_args *args,
|
|||||||
|
|
||||||
/* This function will return NULL if there is an --help
|
/* This function will return NULL if there is an --help
|
||||||
or --version argument in `args` */
|
or --version argument in `args` */
|
||||||
f->se = fuse_lowlevel_new(args, &llop, sizeof(llop), f);
|
f->se = fuse_session_new(args, &llop, sizeof(llop), f);
|
||||||
if (f->se == NULL) {
|
if (f->se == NULL) {
|
||||||
if (f->conf.help)
|
if (f->conf.help)
|
||||||
fuse_lib_help_modules();
|
fuse_lib_help_modules();
|
||||||
|
@ -2871,9 +2871,9 @@ restart:
|
|||||||
|
|
||||||
#define MIN_BUFSIZE 0x21000
|
#define MIN_BUFSIZE 0x21000
|
||||||
|
|
||||||
struct fuse_session *fuse_lowlevel_new(struct fuse_args *args,
|
struct fuse_session *fuse_session_new(struct fuse_args *args,
|
||||||
const struct fuse_lowlevel_ops *op,
|
const struct fuse_lowlevel_ops *op,
|
||||||
size_t op_size, void *userdata)
|
size_t op_size, void *userdata)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
struct fuse_ll *f;
|
struct fuse_ll *f;
|
||||||
|
@ -39,7 +39,7 @@ FUSE_3.0 {
|
|||||||
fuse_daemonize;
|
fuse_daemonize;
|
||||||
fuse_get_session;
|
fuse_get_session;
|
||||||
fuse_interrupted;
|
fuse_interrupted;
|
||||||
fuse_lowlevel_new;
|
fuse_session_new;
|
||||||
fuse_main_real;
|
fuse_main_real;
|
||||||
fuse_mount;
|
fuse_mount;
|
||||||
fuse_session_mount;
|
fuse_session_mount;
|
||||||
|
Loading…
Reference in New Issue
Block a user