mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
VFS: cleaned up smbfs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru> Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
67d6ebfd16
commit
9b89d60522
@ -535,16 +535,11 @@ AC_SUBST(LIBS)
|
|||||||
dnl Libraries used only when building the mc binary
|
dnl Libraries used only when building the mc binary
|
||||||
AC_SUBST(MCLIBS)
|
AC_SUBST(MCLIBS)
|
||||||
|
|
||||||
if test -n "$use_smbfs"; then
|
|
||||||
AC_CONFIG_SUBDIRS([lib/vfs/mc-vfs/samba])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AM_CONDITIONAL(USE_MAINTAINER_MODE, [test x"$USE_MAINTAINER_MODE" = xyes])
|
AM_CONDITIONAL(USE_MAINTAINER_MODE, [test x"$USE_MAINTAINER_MODE" = xyes])
|
||||||
AM_CONDITIONAL(USE_SCREEN_SLANG, [test x"$with_screen" = xslang])
|
AM_CONDITIONAL(USE_SCREEN_SLANG, [test x"$with_screen" = xslang])
|
||||||
AM_CONDITIONAL(USE_EDIT, [test -n "$use_edit"])
|
AM_CONDITIONAL(USE_EDIT, [test -n "$use_edit"])
|
||||||
AM_CONDITIONAL(USE_DIFF, [test -n "$use_diff"])
|
AM_CONDITIONAL(USE_DIFF, [test -n "$use_diff"])
|
||||||
AM_CONDITIONAL(ENABLE_VFS_NET, [test x"$use_net_code" = xtrue])
|
AM_CONDITIONAL(ENABLE_VFS_NET, [test x"$use_net_code" = xtrue])
|
||||||
AM_CONDITIONAL(USE_SAMBA_FS, [test -n "$use_smbfs"])
|
|
||||||
AM_CONDITIONAL(CHARSET, [test -n "$have_charset"])
|
AM_CONDITIONAL(CHARSET, [test -n "$have_charset"])
|
||||||
AM_CONDITIONAL(CONS_SAVER, [test -n "$cons_saver"])
|
AM_CONDITIONAL(CONS_SAVER, [test -n "$cons_saver"])
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
if USE_SAMBA_FS
|
if ENABLE_VFS_SMB
|
||||||
SAMBA_CFLAGS = -DCONFIGDIR=\""@configdir@"\"
|
SAMBA_CFLAGS = -DCONFIGDIR=\""@configdir@"\"
|
||||||
SAMBA_SUBDIRS = samba
|
SAMBA_SUBDIRS = samba
|
||||||
endif
|
endif
|
||||||
@ -61,7 +61,7 @@ endif
|
|||||||
if ENABLE_VFS_FISH
|
if ENABLE_VFS_FISH
|
||||||
libvfs_mc_la_SOURCES += $(FISHFILES)
|
libvfs_mc_la_SOURCES += $(FISHFILES)
|
||||||
endif
|
endif
|
||||||
if USE_SAMBA_FS
|
if ENABLE_VFS_SMB
|
||||||
libvfs_mc_la_SOURCES += $(SMBFILES)
|
libvfs_mc_la_SOURCES += $(SMBFILES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -1973,7 +1973,7 @@ vfs_smb_authinfo_new (const char *host, const char *share, const char *domain,
|
|||||||
auth->share = g_strdup (share);
|
auth->share = g_strdup (share);
|
||||||
auth->domain = g_strdup (domain);
|
auth->domain = g_strdup (domain);
|
||||||
auth->user = g_strdup (user);
|
auth->user = g_strdup (user);
|
||||||
auth->password = g_strdup (password);
|
auth->password = g_strdup (pass);
|
||||||
}
|
}
|
||||||
|
|
||||||
return auth;
|
return auth;
|
||||||
|
@ -68,7 +68,9 @@
|
|||||||
#ifdef ENABLE_VFS_FTP
|
#ifdef ENABLE_VFS_FTP
|
||||||
#include "ftpfs.h"
|
#include "ftpfs.h"
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_VFS_SMB
|
||||||
#include "smbfs.h"
|
#include "smbfs.h"
|
||||||
|
#endif
|
||||||
#include "local.h"
|
#include "local.h"
|
||||||
|
|
||||||
#if defined(_AIX) && !defined(NAME_MAX)
|
#if defined(_AIX) && !defined(NAME_MAX)
|
||||||
@ -1416,7 +1418,9 @@ static const struct
|
|||||||
{ "sh://", 5, "/#sh:" },
|
{ "sh://", 5, "/#sh:" },
|
||||||
{ "ssh://", 6, "/#sh:" },
|
{ "ssh://", 6, "/#sh:" },
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_VFS_SMB
|
||||||
{ "smb://", 6, "/#smb:" },
|
{ "smb://", 6, "/#smb:" },
|
||||||
|
#endif
|
||||||
{ "a:", 2, "/#a" }
|
{ "a:", 2, "/#a" }
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
};
|
};
|
||||||
|
@ -65,9 +65,6 @@ AC_DEFUN([AC_MC_VFS_CHECKS],[
|
|||||||
vfs_type="Midnight Commander Virtual Filesystem"
|
vfs_type="Midnight Commander Virtual Filesystem"
|
||||||
|
|
||||||
AC_MSG_NOTICE([Enabling VFS code])
|
AC_MSG_NOTICE([Enabling VFS code])
|
||||||
|
|
||||||
AC_MC_VFS_SAMBA
|
|
||||||
|
|
||||||
MC_WITH_VFS
|
MC_WITH_VFS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -78,6 +75,7 @@ AC_DEFUN([AC_MC_VFS_CHECKS],[
|
|||||||
AC_MC_VFS_UNDELFS
|
AC_MC_VFS_UNDELFS
|
||||||
AC_MC_VFS_FTP
|
AC_MC_VFS_FTP
|
||||||
AC_MC_VFS_FISH
|
AC_MC_VFS_FISH
|
||||||
|
AC_MC_VFS_SMB
|
||||||
|
|
||||||
AM_CONDITIONAL(ENABLE_VFS, [test x"$enable_vfs" = x"yes"])
|
AM_CONDITIONAL(ENABLE_VFS, [test x"$enable_vfs" = x"yes"])
|
||||||
])
|
])
|
||||||
|
@ -1,49 +1,47 @@
|
|||||||
AC_DEFUN([AC_MC_VFS_SAMBA],
|
dnl Samba support
|
||||||
|
AC_DEFUN([AC_MC_VFS_SMB],
|
||||||
[
|
[
|
||||||
|
AC_ARG_ENABLE([vfs-smb],
|
||||||
|
AC_HELP_STRING([--enable-vfs-smb], [Support for SMB filesystem [[no]]]))
|
||||||
|
if test "$enable_vfs" != "no" -a x"$enable_vfs_smb" != x"no"; then
|
||||||
|
enable_vfs_smb="yes"
|
||||||
|
AC_MC_VFS_ADDNAME([smb])
|
||||||
|
AC_DEFINE([ENABLE_VFS_SMB], [1], [Define to enable VFS over SMB])
|
||||||
|
|
||||||
dnl
|
|
||||||
dnl Samba support
|
|
||||||
dnl
|
|
||||||
use_smbfs=
|
|
||||||
AC_ARG_WITH(samba,
|
|
||||||
[ --with-samba Support smb virtual file system [[no]]],
|
|
||||||
[if test x"$withval" != x"no"; then
|
|
||||||
AC_DEFINE(ENABLE_VFS_SMB, 1, [Define to enable VFS over SMB])
|
|
||||||
vfs_flags="$vfs_flags, smbfs"
|
|
||||||
use_smbfs=yes
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
if test -n "$use_smbfs"; then
|
|
||||||
#################################################
|
|
||||||
# set Samba configuration directory location
|
# set Samba configuration directory location
|
||||||
configdir="/etc"
|
configdir="/etc"
|
||||||
AC_ARG_WITH(configdir,
|
AC_ARG_WITH([smb-configdir],
|
||||||
[ --with-configdir=DIR Where the Samba configuration files are [[/etc]]],
|
AC_HELP_STRING([--with-smb-configdir=DIR], [Where the Samba configuration files are [[/etc]]]),
|
||||||
[ case "$withval" in
|
[ case "$withval" in
|
||||||
yes|no)
|
yes|no)
|
||||||
#
|
|
||||||
# Just in case anybody does it
|
# Just in case anybody does it
|
||||||
#
|
AC_MSG_WARN([--with-smb-configdir called without argument - will use default])
|
||||||
AC_MSG_WARN([--with-configdir called without argument - will use default])
|
|
||||||
;;
|
;;
|
||||||
* )
|
*)
|
||||||
configdir="$withval"
|
configdir="$withval"
|
||||||
;;
|
;;
|
||||||
esac]
|
esac
|
||||||
)
|
])
|
||||||
AC_SUBST(configdir)
|
|
||||||
|
|
||||||
AC_ARG_WITH(codepagedir,
|
AC_ARG_WITH([smb-codepagedir],
|
||||||
[ --with-codepagedir=DIR Where the Samba codepage files are],
|
AC_HELP_STRING([--with-smb-codepagedir=DIR], [Where the Samba codepage files are]),
|
||||||
[ case "$withval" in
|
[ case "$withval" in
|
||||||
yes|no)
|
yes|no)
|
||||||
#
|
|
||||||
# Just in case anybody does it
|
# Just in case anybody does it
|
||||||
#
|
AC_MSG_WARN([--with-smb-codepagedir called without argument - will use default])
|
||||||
AC_MSG_WARN([--with-codepagedir called without argument - will use default])
|
|
||||||
;;
|
;;
|
||||||
esac]
|
*)
|
||||||
)
|
codepagedir="$withval"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
AC_SUBST(configdir)
|
||||||
|
AC_SUBST(codepagedir)
|
||||||
|
|
||||||
|
AC_CONFIG_SUBDIRS([lib/vfs/mc-vfs/samba])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AM_CONDITIONAL([ENABLE_VFS_SMB], [test x"$enable_vfs_smb" = x"yes"])
|
||||||
])
|
])
|
||||||
|
@ -48,7 +48,7 @@ mc_LDADD = \
|
|||||||
$(MCLIBS) $(SLANGLIB) $(GLIB_LIBS) \
|
$(MCLIBS) $(SLANGLIB) $(GLIB_LIBS) \
|
||||||
$(PCRE_LIBS) $(LIBICONV) $(INTLLIBS)
|
$(PCRE_LIBS) $(LIBICONV) $(INTLLIBS)
|
||||||
|
|
||||||
if USE_SAMBA_FS
|
if ENABLE_VFS_SMB
|
||||||
# this is a hack for linking with own samba library in simple way
|
# this is a hack for linking with own samba library in simple way
|
||||||
mc_LDADD += ../lib/vfs/mc-vfs/samba/libsamba.a
|
mc_LDADD += ../lib/vfs/mc-vfs/samba/libsamba.a
|
||||||
endif
|
endif
|
||||||
|
@ -34,7 +34,9 @@
|
|||||||
#include "lib/tty/mouse.h"
|
#include "lib/tty/mouse.h"
|
||||||
#include "lib/strutil.h"
|
#include "lib/strutil.h"
|
||||||
#include "lib/vfs/mc-vfs/vfs.h"
|
#include "lib/vfs/mc-vfs/vfs.h"
|
||||||
|
#ifdef ENABLE_VFS_SMB
|
||||||
#include "lib/vfs/mc-vfs/smbfs.h" /* smbfs_set_debugf() */
|
#include "lib/vfs/mc-vfs/smbfs.h" /* smbfs_set_debugf() */
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "src/main.h"
|
#include "src/main.h"
|
||||||
#include "src/textconf.h"
|
#include "src/textconf.h"
|
||||||
|
@ -46,9 +46,9 @@
|
|||||||
#ifdef ENABLE_VFS_FTP
|
#ifdef ENABLE_VFS_FTP
|
||||||
#include "lib/vfs/mc-vfs/ftpfs.h"
|
#include "lib/vfs/mc-vfs/ftpfs.h"
|
||||||
#endif /* ENABLE_VFS_FTP */
|
#endif /* ENABLE_VFS_FTP */
|
||||||
#ifdef USE_NETCODE
|
#ifdef ENABLE_VFS_SMB
|
||||||
#include "lib/vfs/mc-vfs/smbfs.h"
|
#include "lib/vfs/mc-vfs/smbfs.h"
|
||||||
#endif
|
#endif /* ENABLE_VFS_SMB */
|
||||||
|
|
||||||
#include "dialog.h" /* The nice dialog manager */
|
#include "dialog.h" /* The nice dialog manager */
|
||||||
#include "widget.h" /* The widgets for the nice dialog manager */
|
#include "widget.h" /* The widgets for the nice dialog manager */
|
||||||
|
@ -23,7 +23,9 @@ void ftplink_cmd (void);
|
|||||||
#ifdef ENABLE_VFS_FISH
|
#ifdef ENABLE_VFS_FISH
|
||||||
void fishlink_cmd (void);
|
void fishlink_cmd (void);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_VFS_SMB
|
||||||
void smblink_cmd (void);
|
void smblink_cmd (void);
|
||||||
|
#endif
|
||||||
void undelete_cmd (void);
|
void undelete_cmd (void);
|
||||||
void help_cmd (void);
|
void help_cmd (void);
|
||||||
void smart_dirsize_cmd (void);
|
void smart_dirsize_cmd (void);
|
||||||
|
@ -381,9 +381,9 @@ static name_keymap_t command_names[] = {
|
|||||||
{ "CmdReverseSelection", CK_ReverseSelectionCmd },
|
{ "CmdReverseSelection", CK_ReverseSelectionCmd },
|
||||||
{ "CmdSaveSetup", CK_SaveSetupCmd },
|
{ "CmdSaveSetup", CK_SaveSetupCmd },
|
||||||
{ "CmdSelect", CK_SelectCmd },
|
{ "CmdSelect", CK_SelectCmd },
|
||||||
#if defined (USE_NETCODE) && defined (ENABLE_VFS_SMB)
|
#ifdef ENABLE_VFS_SMB
|
||||||
{ "CmdSmblinkCmd", CK_SmblinkCmd },
|
{ "CmdSmblinkCmd", CK_SmblinkCmd },
|
||||||
#endif /* USE_NETCODE || ENABLE_VFS_SMB */
|
#endif
|
||||||
{ "CmdSwapPanel", CK_SwapCmd },
|
{ "CmdSwapPanel", CK_SwapCmd },
|
||||||
{ "CmdSymlink", CK_SymlinkCmd },
|
{ "CmdSymlink", CK_SymlinkCmd },
|
||||||
{ "CmdTree", CK_TreeCmd },
|
{ "CmdTree", CK_TreeCmd },
|
||||||
|
@ -672,7 +672,7 @@ create_panel_menu (void)
|
|||||||
#ifdef HAVE_CHARSET
|
#ifdef HAVE_CHARSET
|
||||||
entries = g_list_append (entries, menu_entry_create (_("&Encoding..."), CK_PanelSetPanelEncoding));
|
entries = g_list_append (entries, menu_entry_create (_("&Encoding..."), CK_PanelSetPanelEncoding));
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_NETCODE
|
#if defined(ENABLE_VFS_FTP) || defined(ENABLE_VFS_FISH) || defined(ENABLE_VFS_SMB)
|
||||||
entries = g_list_append (entries, menu_separator_create ());
|
entries = g_list_append (entries, menu_separator_create ());
|
||||||
#ifdef ENABLE_VFS_FTP
|
#ifdef ENABLE_VFS_FTP
|
||||||
entries = g_list_append (entries, menu_entry_create (_("FT&P link..."), CK_FtplinkCmd));
|
entries = g_list_append (entries, menu_entry_create (_("FT&P link..."), CK_FtplinkCmd));
|
||||||
@ -683,7 +683,7 @@ create_panel_menu (void)
|
|||||||
#ifdef ENABLE_VFS_SMB
|
#ifdef ENABLE_VFS_SMB
|
||||||
entries = g_list_append (entries, menu_entry_create (_("SM&B link..."), CK_SmblinkCmd));
|
entries = g_list_append (entries, menu_entry_create (_("SM&B link..."), CK_SmblinkCmd));
|
||||||
#endif /* ENABLE_VFS_SMB */
|
#endif /* ENABLE_VFS_SMB */
|
||||||
#endif /* USE_NETCODE */
|
#endif /* ENABLE_VFS_FTP || ENABLE_VFS_FISH || ENABLE_VFS_SMB */
|
||||||
entries = g_list_append (entries, menu_separator_create ());
|
entries = g_list_append (entries, menu_separator_create ());
|
||||||
entries = g_list_append (entries, menu_entry_create (_("&Rescan"), CK_RereadCmd));
|
entries = g_list_append (entries, menu_entry_create (_("&Rescan"), CK_RereadCmd));
|
||||||
|
|
||||||
@ -1369,11 +1369,11 @@ midnight_execute_cmd (Widget * sender, unsigned long command)
|
|||||||
case CK_SingleDirsizeCmd:
|
case CK_SingleDirsizeCmd:
|
||||||
smart_dirsize_cmd ();
|
smart_dirsize_cmd ();
|
||||||
break;
|
break;
|
||||||
#if defined (USE_NETCODE) && defined (ENABLE_VFS_SMB)
|
#ifdef ENABLE_VFS_SMB
|
||||||
case CK_SmblinkCmd:
|
case CK_SmblinkCmd:
|
||||||
smblink_cmd ();
|
smblink_cmd ();
|
||||||
break;
|
break;
|
||||||
#endif /* USE_NETCODE && ENABLE_VFS_SMB */
|
#endif /* ENABLE_VFS_SMB */
|
||||||
case CK_Sort:
|
case CK_Sort:
|
||||||
sort_cmd ();
|
sort_cmd ();
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user