VFS: fixups of UNDELFS VFS switch on/off.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Этот коммит содержится в:
родитель
7d765e4050
Коммит
5df06e7630
@ -116,7 +116,9 @@ void init_extfs (void);
|
||||
void init_fish (void);
|
||||
void init_sfs (void);
|
||||
void init_tarfs (void);
|
||||
#ifdef ENABLE_VFS_UNDELFS
|
||||
void init_undelfs (void);
|
||||
#endif
|
||||
|
||||
#endif /* ENABLE_VFS */
|
||||
|
||||
|
@ -1338,9 +1338,9 @@ vfs_init (void)
|
||||
init_tarfs ();
|
||||
init_cpiofs ();
|
||||
|
||||
#ifdef USE_EXT2FSLIB
|
||||
#ifdef ENABLE_VFS_UNDELFS
|
||||
init_undelfs ();
|
||||
#endif /* USE_EXT2FSLIB */
|
||||
#endif /* ENABLE_VFS_UNDELFS */
|
||||
|
||||
#ifdef USE_NETCODE
|
||||
init_ftpfs ();
|
||||
|
@ -72,7 +72,6 @@ AC_DEFUN([AC_MC_VFS_CHECKS],[
|
||||
AC_MC_VFS_FISH
|
||||
AC_MC_VFS_EXTFS
|
||||
AC_MC_VFS_SFS
|
||||
AC_MC_VFS_UNDELFS
|
||||
AC_MC_VFS_SAMBA
|
||||
|
||||
MC_WITH_VFS
|
||||
@ -85,8 +84,9 @@ AC_DEFUN([AC_MC_VFS_CHECKS],[
|
||||
AM_CONDITIONAL(ENABLE_VFS_FISH, [false])
|
||||
AM_CONDITIONAL(ENABLE_VFS_EXTFS, [false])
|
||||
AM_CONDITIONAL(ENABLE_VFS_SFS, [false])
|
||||
AM_CONDITIONAL(ENABLE_VFS_UNDELFS, [false])
|
||||
fi
|
||||
|
||||
AC_MC_VFS_UNDELFS
|
||||
|
||||
AM_CONDITIONAL(ENABLE_VFS, [test x"$enable_vfs" = x"yes"])
|
||||
])
|
||||
|
@ -1,7 +1,7 @@
|
||||
dnl MC_UNDELFS_CHECKS
|
||||
dnl Check for ext2fs undel support.
|
||||
dnl Set shell variable ext2fs_undel to "yes" if we have it,
|
||||
dnl "no" otherwise. May define USE_EXT2FSLIB for cpp.
|
||||
dnl "no" otherwise. May define ENABLE_VFS_UNDELFS for cpp.
|
||||
dnl Will set EXT2FS_UNDEL_LIBS to required libraries.
|
||||
|
||||
AC_DEFUN([MC_UNDELFS_CHECKS], [
|
||||
@ -20,8 +20,6 @@ AC_DEFUN([MC_UNDELFS_CHECKS], [
|
||||
#endif
|
||||
])
|
||||
if test x"$ext2fs_ext2fs_h" = xyes; then
|
||||
AC_DEFINE(USE_EXT2FSLIB, 1,
|
||||
[Define to enable undelete support on ext2])
|
||||
ext2fs_undel=yes
|
||||
EXT2FS_UNDEL_LIBS="-lext2fs -lcom_err"
|
||||
AC_CHECK_TYPE(ext2_ino_t, ,
|
||||
@ -49,14 +47,13 @@ dnl Ext2fs undelete support
|
||||
dnl
|
||||
AC_DEFUN([AC_MC_VFS_UNDELFS],
|
||||
[
|
||||
AC_ARG_ENABLE([undelfs],
|
||||
[ --enable-vfs-undelfs Support for ext2 undelete filesystem])
|
||||
|
||||
if test x"$enable_vfs_undelfs" = x"yes" ; then
|
||||
AC_ARG_ENABLE([vfs-undelfs],
|
||||
AC_HELP_STRING([--enable-vfs-undelfs], [Support for ext2 undelete filesystem]))
|
||||
|
||||
if test x"$enable_vfs" != x"no" -a x"$enable_vfs_undelfs" != x"no"; then
|
||||
MC_UNDELFS_CHECKS
|
||||
|
||||
if test x"$ext2fs_undel" = xyes; then
|
||||
if test x"$ext2fs_undel" = x"yes"; then
|
||||
enable_vfs_undelfs="yes"
|
||||
AC_MC_VFS_ADDNAME([undelfs])
|
||||
AC_DEFINE(ENABLE_VFS_UNDELFS, [1], [Support for ext2 undelfs])
|
||||
|
@ -1222,7 +1222,7 @@ get_random_hint (int force)
|
||||
return result;
|
||||
}
|
||||
|
||||
#if defined(USE_NETCODE) || defined(USE_EXT2FSLIB)
|
||||
#if defined(USE_NETCODE) || defined(ENABLE_VFS_UNDELFS)
|
||||
static void
|
||||
nice_cd (const char *text, const char *xtext, const char *help,
|
||||
const char *history_name, const char *prefix, int to_home)
|
||||
@ -1252,7 +1252,7 @@ nice_cd (const char *text, const char *xtext, const char *help,
|
||||
g_free (cd_path);
|
||||
g_free (machine);
|
||||
}
|
||||
#endif /* USE_NETCODE || USE_EXT2FSLIB */
|
||||
#endif /* USE_NETCODE || ENABLE_VFS_UNDELFS */
|
||||
|
||||
|
||||
#ifdef USE_NETCODE
|
||||
@ -1284,7 +1284,7 @@ smblink_cmd (void)
|
||||
#endif /* ENABLE_VFS_SMB */
|
||||
#endif /* USE_NETCODE */
|
||||
|
||||
#ifdef USE_EXT2FSLIB
|
||||
#ifdef ENABLE_VFS_UNDELFS
|
||||
void
|
||||
undelete_cmd (void)
|
||||
{
|
||||
@ -1292,7 +1292,7 @@ undelete_cmd (void)
|
||||
_("Enter device (without /dev/) to undelete\nfiles on: (F1 for details)"),
|
||||
"[Undelete File System]", ":undelete_cmd: Undel on ext2 fs ", "/#undel:", 0);
|
||||
}
|
||||
#endif /* USE_EXT2FSLIB */
|
||||
#endif /* ENABLE_VFS_UNDELFS */
|
||||
|
||||
void
|
||||
quick_cd_cmd (void)
|
||||
|
@ -386,7 +386,7 @@ static name_keymap_t command_names[] = {
|
||||
{ "CmdSymlink", CK_SymlinkCmd },
|
||||
{ "CmdTree", CK_TreeCmd },
|
||||
{ "CmdTreeBox", CK_TreeBoxCmd },
|
||||
#ifdef USE_EXT2FSLIB
|
||||
#ifdef ENABLE_VFS_UNDELFS
|
||||
{ "CmdUndelete", CK_UndeleteCmd },
|
||||
#endif
|
||||
{ "CmdUnselect", CK_UnselectCmd },
|
||||
|
@ -757,7 +757,7 @@ create_command_menu (void)
|
||||
#endif
|
||||
entries = g_list_append (entries, menu_entry_create (_("Screen lis&t"), CK_DialogListCmd));
|
||||
entries = g_list_append (entries, menu_separator_create ());
|
||||
#ifdef USE_EXT2FSLIB
|
||||
#ifdef ENABLE_VFS_UNDELFS
|
||||
entries =
|
||||
g_list_append (entries,
|
||||
menu_entry_create (_("&Undelete files (ext2fs only)"), CK_UndeleteCmd));
|
||||
@ -766,7 +766,7 @@ create_command_menu (void)
|
||||
entries =
|
||||
g_list_append (entries, menu_entry_create (_("&Listing format edit"), CK_ListmodeCmd));
|
||||
#endif
|
||||
#if defined (USE_EXT2FSLIB) || defined (LISTMODE_EDITOR)
|
||||
#if defined (ENABLE_VFS_UNDELFS) || defined (LISTMODE_EDITOR)
|
||||
entries = g_list_append (entries, menu_separator_create ());
|
||||
#endif
|
||||
entries =
|
||||
@ -1398,7 +1398,7 @@ midnight_execute_cmd (Widget * sender, unsigned long command)
|
||||
case CK_TreeBoxCmd:
|
||||
treebox_cmd ();
|
||||
break;
|
||||
#ifdef USE_EXT2FSLIB
|
||||
#ifdef ENABLE_VFS_UNDELFS
|
||||
case CK_UndeleteCmd:
|
||||
undelete_cmd ();
|
||||
break;
|
||||
|
@ -36,6 +36,9 @@ static const char *const vfs_supported[] = {
|
||||
"tarfs",
|
||||
"extfs",
|
||||
"cpiofs",
|
||||
#ifdef ENABLE_VFS_UNDELFS
|
||||
"undelfs",
|
||||
#endif
|
||||
#ifdef USE_NETCODE
|
||||
"ftpfs",
|
||||
"fish",
|
||||
@ -43,9 +46,6 @@ static const char *const vfs_supported[] = {
|
||||
"smbfs",
|
||||
# endif /* ENABLE_VFS_SMB */
|
||||
#endif /* USE_NETCODE */
|
||||
#ifdef USE_EXT2FSLIB
|
||||
"undelfs",
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
#endif /* ENABLE_VFS */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user