/* initialialise the print backend, registering ourselves with the ntvfs subsystem */ NTSTATUS ntvfs_print_init(void) { NTSTATUS ret; struct ntvfs_ops ops; NTVFS_CURRENT_CRITICAL_SIZES(vers); ZERO_STRUCT(ops); /* fill in the name and type */ ops.name = "default"; ops.type = NTVFS_PRINT; /* fill in all the operations */ ops.connect = print_connect; ops.disconnect = print_disconnect; ops.unlink = print_unlink; ops.ioctl = print_ioctl; /* register ourselves with the NTVFS subsystem. We register under the name 'default' as we wish to be the default backend */ ret = ntvfs_register(&ops, &vers); if (!NT_STATUS_IS_OK(ret)) { DEBUG(0,("Failed to register PRINT backend!\n")); } return ret; }
/* initialise the CIFS->CIFS backend, registering ourselves with the ntvfs subsystem */ NTSTATUS ntvfs_cifs_init(void) { NTSTATUS ret; struct ntvfs_ops ops; NTVFS_CURRENT_CRITICAL_SIZES(vers); ZERO_STRUCT(ops); /* fill in the name and type */ ops.name = "cifs"; ops.type = NTVFS_DISK; /* fill in all the operations */ ops.connect = cvfs_connect; ops.disconnect = cvfs_disconnect; ops.unlink = cvfs_unlink; ops.chkpath = cvfs_chkpath; ops.qpathinfo = cvfs_qpathinfo; ops.setpathinfo = cvfs_setpathinfo; ops.open = cvfs_open; ops.mkdir = cvfs_mkdir; ops.rmdir = cvfs_rmdir; ops.rename = cvfs_rename; ops.copy = cvfs_copy; ops.ioctl = cvfs_ioctl; ops.read = cvfs_read; ops.write = cvfs_write; ops.seek = cvfs_seek; ops.flush = cvfs_flush; ops.close = cvfs_close; ops.exit = cvfs_exit; ops.lock = cvfs_lock; ops.setfileinfo = cvfs_setfileinfo; ops.qfileinfo = cvfs_qfileinfo; ops.fsinfo = cvfs_fsinfo; ops.lpq = cvfs_lpq; ops.search_first = cvfs_search_first; ops.search_next = cvfs_search_next; ops.search_close = cvfs_search_close; ops.trans = cvfs_trans; ops.logoff = cvfs_logoff; ops.async_setup = cvfs_async_setup; ops.cancel = cvfs_cancel; ops.notify = cvfs_notify; ops.trans2 = cvfs_trans2; /* register ourselves with the NTVFS subsystem. We register under the name 'cifs'. */ ret = ntvfs_register(&ops, &vers); if (!NT_STATUS_IS_OK(ret)) { DEBUG(0,("Failed to register CIFS backend!\n")); } return ret; }
/* initialialise the POSIX disk backend, registering ourselves with the ntvfs subsystem */ NTSTATUS ntvfs_simple_init(void) { NTSTATUS ret; struct ntvfs_ops ops; NTVFS_CURRENT_CRITICAL_SIZES(vers); ZERO_STRUCT(ops); /* fill in all the operations */ ops.connect = svfs_connect; ops.disconnect = svfs_disconnect; ops.unlink = svfs_unlink; ops.chkpath = svfs_chkpath; ops.qpathinfo = svfs_qpathinfo; ops.setpathinfo = svfs_setpathinfo; ops.open = svfs_open; ops.mkdir = svfs_mkdir; ops.rmdir = svfs_rmdir; ops.rename = svfs_rename; ops.copy = svfs_copy; ops.ioctl = svfs_ioctl; ops.read = svfs_read; ops.write = svfs_write; ops.seek = svfs_seek; ops.flush = svfs_flush; ops.close = svfs_close; ops.exit = svfs_exit; ops.lock = svfs_lock; ops.setfileinfo = svfs_setfileinfo; ops.qfileinfo = svfs_qfileinfo; ops.fsinfo = svfs_fsinfo; ops.lpq = svfs_lpq; ops.search_first = svfs_search_first; ops.search_next = svfs_search_next; ops.search_close = svfs_search_close; ops.trans = svfs_trans; ops.logoff = svfs_logoff; ops.async_setup = svfs_async_setup; ops.cancel = svfs_cancel; /* register ourselves with the NTVFS subsystem. We register under names 'simple' */ ops.type = NTVFS_DISK; ops.name = "simple"; ret = ntvfs_register(&ops, &vers); if (!NT_STATUS_IS_OK(ret)) { DEBUG(0,("Failed to register simple backend with name: %s!\n", ops.name)); } return ret; }
/* initialise the CIFS->CIFS backend, registering ourselves with the ntvfs subsystem */ NTSTATUS ntvfs_smb2_init(void) { NTSTATUS ret; struct ntvfs_ops ops; NTVFS_CURRENT_CRITICAL_SIZES(vers); ZERO_STRUCT(ops); /* fill in the name and type */ ops.name = "smb2"; ops.type = NTVFS_DISK; /* fill in all the operations */ ops.connect_fn = cvfs_connect; ops.disconnect_fn = cvfs_disconnect; ops.unlink_fn = cvfs_unlink; ops.chkpath_fn = cvfs_chkpath; ops.qpathinfo_fn = cvfs_qpathinfo; ops.setpathinfo_fn = cvfs_setpathinfo; ops.open_fn = cvfs_open; ops.mkdir_fn = cvfs_mkdir; ops.rmdir_fn = cvfs_rmdir; ops.rename_fn = cvfs_rename; ops.copy_fn = cvfs_copy; ops.ioctl_fn = cvfs_ioctl; ops.read_fn = cvfs_read; ops.write_fn = cvfs_write; ops.seek_fn = cvfs_seek; ops.flush_fn = cvfs_flush; ops.close_fn = cvfs_close; ops.exit_fn = cvfs_exit; ops.lock_fn = cvfs_lock; ops.setfileinfo_fn = cvfs_setfileinfo; ops.qfileinfo_fn = cvfs_qfileinfo; ops.fsinfo_fn = cvfs_fsinfo; ops.lpq_fn = cvfs_lpq; ops.search_first_fn = cvfs_search_first; ops.search_next_fn = cvfs_search_next; ops.search_close_fn = cvfs_search_close; ops.trans_fn = cvfs_trans; ops.logoff_fn = cvfs_logoff; ops.async_setup_fn = cvfs_async_setup; ops.cancel_fn = cvfs_cancel; ops.notify_fn = cvfs_notify; /* register ourselves with the NTVFS subsystem. We register under the name 'smb2'. */ ret = ntvfs_register(&ops, &vers); if (!NT_STATUS_IS_OK(ret)) { DEBUG(0,("Failed to register SMB2 backend\n")); } return ret; }
/* initialialise the POSIX disk backend, registering ourselves with the ntvfs subsystem */ NTSTATUS ntvfs_posix_init(void) { NTSTATUS ret; struct ntvfs_ops ops; NTVFS_CURRENT_CRITICAL_SIZES(vers); ZERO_STRUCT(ops); ops.type = NTVFS_DISK; /* fill in all the operations */ ops.connect = pvfs_connect; ops.disconnect = pvfs_disconnect; ops.unlink = pvfs_unlink; ops.chkpath = pvfs_chkpath; ops.qpathinfo = pvfs_qpathinfo; ops.setpathinfo = pvfs_setpathinfo; ops.open = pvfs_open; ops.mkdir = pvfs_mkdir; ops.rmdir = pvfs_rmdir; ops.rename = pvfs_rename; ops.copy = pvfs_copy; ops.ioctl = pvfs_ioctl; ops.read = pvfs_read; ops.write = pvfs_write; ops.seek = pvfs_seek; ops.flush = pvfs_flush; ops.close = pvfs_close; ops.exit = pvfs_exit; ops.lock = pvfs_lock; ops.setfileinfo = pvfs_setfileinfo; ops.qfileinfo = pvfs_qfileinfo; ops.fsinfo = pvfs_fsinfo; ops.lpq = pvfs_lpq; ops.search_first = pvfs_search_first; ops.search_next = pvfs_search_next; ops.search_close = pvfs_search_close; ops.trans = pvfs_trans; ops.logoff = pvfs_logoff; ops.async_setup = pvfs_async_setup; ops.cancel = pvfs_cancel; ops.notify = pvfs_notify; /* register ourselves with the NTVFS subsystem. We register under the name 'default' as we wish to be the default backend, and also register as 'posix' */ ops.name = "default"; ret = ntvfs_register(&ops, &vers); if (!NT_STATUS_IS_OK(ret)) { DEBUG(0,("Failed to register POSIX backend as '%s'!\n", ops.name)); } ops.name = "posix"; ret = ntvfs_register(&ops, &vers); if (!NT_STATUS_IS_OK(ret)) { DEBUG(0,("Failed to register POSIX backend as '%s'!\n", ops.name)); } if (NT_STATUS_IS_OK(ret)) { ret = ntvfs_common_init(); } return ret; }