summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am6
-rwxr-xr-xautogen.sh2
-rw-r--r--configure.ac3
-rw-r--r--mount-deprecated/.gitignore (renamed from mount/.gitignore)0
-rw-r--r--mount-deprecated/Makemodule.am99
-rw-r--r--mount-deprecated/devname.c (renamed from mount/devname.c)1
-rw-r--r--mount-deprecated/devname.h (renamed from mount/devname.h)0
-rw-r--r--mount-deprecated/fsprobe.c (renamed from mount/fsprobe.c)1
-rw-r--r--mount-deprecated/fsprobe.h (renamed from mount/fsprobe.h)0
-rw-r--r--mount-deprecated/fstab.c (renamed from mount/fstab.c)3
-rw-r--r--mount-deprecated/fstab.h (renamed from mount/fstab.h)0
-rw-r--r--mount-deprecated/getusername.c (renamed from mount/getusername.c)0
-rw-r--r--mount-deprecated/getusername.h (renamed from mount/getusername.h)0
-rw-r--r--mount-deprecated/mount.8 (renamed from mount/mount.8)5
-rw-r--r--mount-deprecated/mount.c (renamed from mount/mount.c)2
-rw-r--r--mount-deprecated/mount_constants.h (renamed from mount/mount_constants.h)0
-rw-r--r--mount-deprecated/mount_mntent.c (renamed from mount/mount_mntent.c)0
-rw-r--r--mount-deprecated/mount_mntent.h (renamed from mount/mount_mntent.h)0
-rw-r--r--mount-deprecated/sundries.c (renamed from mount/sundries.c)3
-rw-r--r--mount-deprecated/sundries.h (renamed from mount/sundries.h)1
-rw-r--r--mount-deprecated/umount.8 (renamed from mount/umount.8)0
-rw-r--r--mount-deprecated/umount.c (renamed from mount/umount.c)0
-rw-r--r--mount/Makefile.am108
-rwxr-xr-xtools/config-gen2
24 files changed, 108 insertions, 128 deletions
diff --git a/Makefile.am b/Makefile.am
index 96af99d26..b8c2b13d9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -48,11 +48,6 @@ if BUILD_PARTX
SUBDIRS += partx
endif
-if BUILD_MOUNT
-SUBDIRS += mount
-endif
-
-
AUTOMAKE_OPTIONS = gnu
ACLOCAL_AMFLAGS = -I m4
@@ -74,6 +69,7 @@ include schedutils/Makemodule.am
include text-utils/Makemodule.am
include term-utils/Makemodule.am
include login-utils/Makemodule.am
+include mount-deprecated/Makemodule.am
# Arrange so that .tarball-version appears only in the distribution
# tarball, and never in a checked-out repository.
diff --git a/autogen.sh b/autogen.sh
index 14a795ffd..2bcbda758 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -14,7 +14,7 @@ cd $srcdir
DIE=0
HAS_GTKDOC=1
-test -f mount/mount.c || {
+test -f sys-utils/mount.c || {
echo
echo "You must run this script in the top-level util-linux directory"
echo
diff --git a/configure.ac b/configure.ac
index b1a2f848c..1e9134fdf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,7 +11,7 @@ AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wn
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
-AC_CONFIG_SRCDIR(mount/mount.c)
+AC_CONFIG_SRCDIR(sys-utils/mount.c)
AC_PREFIX_DEFAULT([/usr])
dnl version details from <major>.<minor>[-<suffix>]
@@ -1316,7 +1316,6 @@ libuuid/uuid.pc
man/ru/Makefile
misc-utils/Makefile
misc-utils/uuidd.service
-mount/Makefile
partx/Makefile
po/Makefile.in
sys-utils/Makefile
diff --git a/mount/.gitignore b/mount-deprecated/.gitignore
index 8be9aceb7..8be9aceb7 100644
--- a/mount/.gitignore
+++ b/mount-deprecated/.gitignore
diff --git a/mount-deprecated/Makemodule.am b/mount-deprecated/Makemodule.am
new file mode 100644
index 000000000..03fe51341
--- /dev/null
+++ b/mount-deprecated/Makemodule.am
@@ -0,0 +1,99 @@
+if BUILD_MOUNT
+
+bin_PROGRAMS += mount umount
+dist_man_MANS += \
+ mount-deprecated/mount.8 \
+ mount-deprecated/umount.8
+
+mount_common_sources = \
+ mount-deprecated/sundries.c \
+ mount-deprecated/sundries.h \
+ mount-deprecated/fstab.h \
+ mount-deprecated/mount_mntent.h \
+ mount-deprecated/mount_constants.h \
+ mount-deprecated/getusername.h \
+ mount-deprecated/fsprobe.h \
+ mount-deprecated/devname.c \
+ mount-deprecated/devname.h \
+ mount-deprecated/fstab.c \
+ mount-deprecated/getusername.c \
+ mount-deprecated/mount_mntent.c \
+ mount-deprecated/fsprobe.c \
+ \
+ lib/canonicalize.c \
+ lib/at.c \
+ lib/blkdev.c \
+ lib/env.c \
+ lib/linux_version.c \
+ lib/loopdev.c \
+ lib/mangle.c \
+ lib/strutils.c \
+ lib/xgetpass.c \
+ lib/sysfs.c
+
+mount_SOURCES = \
+ mount-deprecated/mount.c \
+ $(mount_common_sources) \
+ lib/setproctitle.c
+mount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -I$(ul_libblkid_incdir)
+mount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
+mount_LDADD = libblkid.la
+
+umount_SOURCES = \
+ mount-deprecated/umount.c \
+ $(mount_common_sources)
+umount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -I$(ul_libblkid_incdir)
+umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
+umount_LDADD = libblkid.la
+
+
+
+mount_static_LDADD =
+
+if HAVE_STATIC_MOUNT
+bin_PROGRAMS += mount.static
+mount_static_SOURCES = $(mount_SOURCES)
+mount_static_CFLAGS = $(mount_CFLAGS)
+mount_static_LDFLAGS = -all-static
+mount_static_LDADD += libblkid.la
+endif
+
+if HAVE_STATIC_UMOUNT
+bin_PROGRAMS += umount.static
+umount_static_SOURCES = $(umount_SOURCES)
+umount_static_CFLAGS = $(umount_CFLAGS)
+umount_static_LDFLAGS = -all-static
+umount_static_LDADD = libblkid.la
+endif
+
+if HAVE_SELINUX
+mount_LDADD += $(SELINUX_LIBS)
+mount_static_LDADD += $(SELINUX_LIBS_STATIC)
+endif
+
+# hybrid mount -- old mount + new code from libmount for mtab management
+#
+if BUILD_LIBMOUNT_MOUNT
+mount_LDADD += libmount.la
+mount_CFLAGS += $(AM_CFLAGS) -I$(ul_libmount_incdir)
+umount_LDADD += libmount.la
+umount_CFLAGS += $(AM_CFLAGS) -I$(ul_libmount_incdir)
+if HAVE_STATIC_MOUNT
+mount_static_LDADD += libmount.la
+mount_static_CFLAGS += -I$(ul_libmount_incdir)
+endif
+if HAVE_STATIC_UMOUNT
+umount_static_LDADD += libmount.la
+umount_static_CFLAGS += -I$(ul_libmount_incdir)
+endif
+endif
+
+if MAKEINSTALL_DO_SETUID
+install-exec-hook-mount:
+ chmod 4755 $(DESTDIR)$(bindir)/mount
+ chmod 4755 $(DESTDIR)$(bindir)/umount
+
+INSTALL_EXEC_HOOKS += install-exec-hook-mount
+endif
+
+endif # BUILD_MOUNT
diff --git a/mount/devname.c b/mount-deprecated/devname.c
index 05da092f9..76dfe91ef 100644
--- a/mount/devname.c
+++ b/mount-deprecated/devname.c
@@ -12,4 +12,3 @@ spec_to_devname(const char *spec)
return xstrdup(spec);
return fsprobe_get_devname_by_spec(spec);
}
-
diff --git a/mount/devname.h b/mount-deprecated/devname.h
index d6adeff7d..d6adeff7d 100644
--- a/mount/devname.h
+++ b/mount-deprecated/devname.h
diff --git a/mount/fsprobe.c b/mount-deprecated/fsprobe.c
index 1cfc975c6..80c25669f 100644
--- a/mount/fsprobe.c
+++ b/mount-deprecated/fsprobe.c
@@ -139,4 +139,3 @@ fsprobe_get_devname_by_label(const char *label)
{
return blkid_evaluate_tag("LABEL", label, &blcache);
}
-
diff --git a/mount/fsprobe.h b/mount-deprecated/fsprobe.h
index d9c1dc494..d9c1dc494 100644
--- a/mount/fsprobe.h
+++ b/mount-deprecated/fsprobe.h
diff --git a/mount/fstab.c b/mount-deprecated/fstab.c
index a39459138..90c8032fb 100644
--- a/mount/fstab.c
+++ b/mount-deprecated/fstab.c
@@ -349,7 +349,7 @@ is_mounted_once(const char *name) {
return (ct == 1);
}
-/* Given the name FILE, try to find the option "loop=FILE" in mtab. */
+/* Given the name FILE, try to find the option "loop=FILE" in mtab. */
struct mntentchn *
getmntoptfile (const char *file) {
struct mntentchn *mc, *mc0;
@@ -1168,4 +1168,3 @@ main(int argc, char **argv)
exit(EXIT_SUCCESS);
}
#endif
-
diff --git a/mount/fstab.h b/mount-deprecated/fstab.h
index bbef33b51..bbef33b51 100644
--- a/mount/fstab.h
+++ b/mount-deprecated/fstab.h
diff --git a/mount/getusername.c b/mount-deprecated/getusername.c
index 9835768ca..9835768ca 100644
--- a/mount/getusername.c
+++ b/mount-deprecated/getusername.c
diff --git a/mount/getusername.h b/mount-deprecated/getusername.h
index 808ac9b88..808ac9b88 100644
--- a/mount/getusername.h
+++ b/mount-deprecated/getusername.h
diff --git a/mount/mount.8 b/mount-deprecated/mount.8
index 053715914..91dcc24f2 100644
--- a/mount/mount.8
+++ b/mount-deprecated/mount.8
@@ -528,8 +528,8 @@ This is necessary for example when
.I /etc
is on a read-only filesystem.
.IP "\fB\-\-no\-canonicalize\fP"
-Don't canonicalize paths. The mount command canonicalizes all paths
-(from command line or fstab) and stores canonicalized paths to the
+Don't canonicalize paths. The mount command canonicalizes all paths
+(from command line or fstab) and stores canonicalized paths to the
.IR /etc/mtab
file. This option can be used together with the
.B \-f
@@ -2855,4 +2855,3 @@ command existed in Version 5 AT&T UNIX.
.SH AVAILABILITY
The mount command is part of the util-linux package and is available from
ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
-
diff --git a/mount/mount.c b/mount-deprecated/mount.c
index 4ebcc1154..2e9b2a4e3 100644
--- a/mount/mount.c
+++ b/mount-deprecated/mount.c
@@ -2300,7 +2300,7 @@ do_mount_all (char *types, char *options, char *test_opts) {
}
}
-
+
/* now do everything */
for (cp = childhead.nxt; cp; cp = cp->nxt) {
pid_t p = -1;
diff --git a/mount/mount_constants.h b/mount-deprecated/mount_constants.h
index ce51887dd..ce51887dd 100644
--- a/mount/mount_constants.h
+++ b/mount-deprecated/mount_constants.h
diff --git a/mount/mount_mntent.c b/mount-deprecated/mount_mntent.c
index 88dab1025..88dab1025 100644
--- a/mount/mount_mntent.c
+++ b/mount-deprecated/mount_mntent.c
diff --git a/mount/mount_mntent.h b/mount-deprecated/mount_mntent.h
index 3b7421535..3b7421535 100644
--- a/mount/mount_mntent.h
+++ b/mount-deprecated/mount_mntent.h
diff --git a/mount/sundries.c b/mount-deprecated/sundries.c
index 58f7b5de7..9bff99753 100644
--- a/mount/sundries.c
+++ b/mount-deprecated/sundries.c
@@ -223,7 +223,7 @@ matching_opts (const char *options, const char *test_opts) {
q = alloca(len+1);
if (q == NULL)
die (EX_SYSERR, _("not enough memory"));
-
+
for (p = test_opts; p < test_opts+len; p++) {
r = strchr(p, ',');
if (r) {
@@ -298,4 +298,3 @@ char *canonicalize (const char *path)
die(EX_SYSERR, _("not enough memory"));
return res;
}
-
diff --git a/mount/sundries.h b/mount-deprecated/sundries.h
index 5e3ddc3a9..e58fa4975 100644
--- a/mount/sundries.h
+++ b/mount-deprecated/sundries.h
@@ -53,4 +53,3 @@ char *canonicalize_spec (const char *path);
#define EX_SOMEOK 64 /* some mount succeeded */
#endif /* SUNDRIES_H */
-
diff --git a/mount/umount.8 b/mount-deprecated/umount.8
index 1c7d59aa7..1c7d59aa7 100644
--- a/mount/umount.8
+++ b/mount-deprecated/umount.8
diff --git a/mount/umount.c b/mount-deprecated/umount.c
index d3375df83..d3375df83 100644
--- a/mount/umount.c
+++ b/mount-deprecated/umount.c
diff --git a/mount/Makefile.am b/mount/Makefile.am
deleted file mode 100644
index d0514674c..000000000
--- a/mount/Makefile.am
+++ /dev/null
@@ -1,108 +0,0 @@
-include $(top_srcdir)/config/include-Makefile.am
-
-bin_PROGRAMS = mount umount
-dist_man_MANS = mount.8 umount.8
-
-# generic sources for all programs (mount, umount)
-srcs_common = \
- sundries.c \
- $(top_srcdir)/lib/canonicalize.c \
- sundries.h
-
-# generic header for mount and umount
-hdrs_mount = fstab.h mount_mntent.h mount_constants.h getusername.h fsprobe.h
-
-# generic sources for mount and umount
-srcs_mount = \
- $(srcs_common) \
- $(hdrs_mount) \
- devname.c \
- devname.h \
- fstab.c \
- getusername.c \
- mount_mntent.c \
- fsprobe.c \
- $(top_srcdir)/lib/at.c \
- $(top_srcdir)/lib/blkdev.c \
- $(top_srcdir)/lib/env.c \
- $(top_srcdir)/lib/linux_version.c \
- $(top_srcdir)/lib/loopdev.c \
- $(top_srcdir)/lib/mangle.c \
- $(top_srcdir)/lib/strutils.c \
- $(top_srcdir)/lib/xgetpass.c \
- $(top_srcdir)/lib/sysfs.c
-
-# generic flags for all programs
-# -- note that pkg-config autoconf macros (pkg.m4) does not differentiate
-# between CFLAGS and CPPFLAGS, we follow this behaviour and use CFLAGS only.
-ldadd_common = $(ul_libblkid_la)
-ldadd_static = $(ul_libblkid_la)
-cflags_common = $(AM_CFLAGS) -I$(ul_libblkid_incdir)
-ldflags_static = -all-static
-
-mount_SOURCES = \
- mount.c \
- $(srcs_mount) \
- $(top_srcdir)/lib/setproctitle.c
-mount_CFLAGS = $(SUID_CFLAGS) $(cflags_common)
-mount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
-mount_LDADD = $(ldadd_common)
-
-umount_SOURCES = umount.c $(srcs_mount)
-umount_CFLAGS = $(SUID_CFLAGS) $(cflags_common)
-umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
-umount_LDADD = $(ldadd_common)
-
-mount_static_LDADD =
-
-if HAVE_STATIC_MOUNT
-bin_PROGRAMS += mount.static
-mount_static_SOURCES = $(mount_SOURCES)
-mount_static_CFLAGS = $(cflags_common)
-mount_static_LDFLAGS = $(ldflags_static)
-mount_static_LDADD += $(ldadd_static)
-endif
-
-if HAVE_STATIC_UMOUNT
-bin_PROGRAMS += umount.static
-umount_static_SOURCES = $(umount_SOURCES)
-umount_static_CFLAGS = $(cflags_common)
-umount_static_LDFLAGS = $(ldflags_static)
-umount_static_LDADD = $(ldadd_static)
-endif
-
-if HAVE_SELINUX
-mount_LDADD += $(SELINUX_LIBS)
-mount_static_LDADD += $(SELINUX_LIBS_STATIC)
-endif
-
-if BUILD_LIBMOUNT_MOUNT
-mount_LDADD += $(ul_libmount_la)
-mount_CFLAGS += $(AM_CFLAGS) -I$(ul_libmount_incdir)
-umount_LDADD += $(ul_libmount_la)
-umount_CFLAGS += $(AM_CFLAGS) -I$(ul_libmount_incdir)
-if HAVE_STATIC_MOUNT
-mount_static_LDADD += $(ul_libmount_la)
-mount_static_CFLAGS += -I$(ul_libmount_incdir)
-endif
-if HAVE_STATIC_UMOUNT
-umount_static_LDADD += $(ul_libmount_la)
-umount_static_CFLAGS += -I$(ul_libmount_incdir)
-endif
-endif
-
-if !BUILD_LIBMOUNT_MOUNT
-noinst_PROGRAMS = mtab_lock_test
-mtab_lock_test_SOURCES = \
- fstab.c \
- $(hdrs_mount) \
- $(srcs_common) \
- $(top_srcdir)/lib/strutils.c
-mtab_lock_test_CPPFLAGS = -DMAIN_TEST_MTABLOCK $(AM_CPPFLAGS)
-endif
-
-install-exec-hook:
-if MAKEINSTALL_DO_SETUID
- chmod 4755 $(DESTDIR)$(bindir)/mount
- chmod 4755 $(DESTDIR)$(bindir)/umount
-endif
diff --git a/tools/config-gen b/tools/config-gen
index 720c5a7dd..72cefc9bc 100755
--- a/tools/config-gen
+++ b/tools/config-gen
@@ -3,7 +3,7 @@
# Copyright (C) 2011 Karel Zak <kzak@redhat.com>
#
-test -f mount/mount.c || {
+test -f sys-utils/mount.c || {
echo
echo "You must run this script in the top-level util-linux directory"
echo