summaryrefslogtreecommitdiff
path: root/mount
diff options
context:
space:
mode:
Diffstat (limited to 'mount')
-rw-r--r--mount/Makefile.am96
-rw-r--r--mount/Makefile.in2142
-rw-r--r--mount/README.mount11
-rw-r--r--mount/devname.c15
-rw-r--r--mount/devname.h6
-rw-r--r--mount/fstab.5214
-rw-r--r--mount/fstab.c1016
-rw-r--r--mount/fstab.h33
-rw-r--r--mount/getusername.c14
-rw-r--r--mount/getusername.h1
-rw-r--r--mount/lomount.c1188
-rw-r--r--mount/lomount.h12
-rw-r--r--mount/loop.h69
-rw-r--r--mount/losetup.8185
-rw-r--r--mount/mount.82614
-rw-r--r--mount/mount.c2305
-rw-r--r--mount/mount_constants.h73
-rw-r--r--mount/mount_mntent.c221
-rw-r--r--mount/mount_mntent.h28
-rw-r--r--mount/rmd160.c532
-rw-r--r--mount/rmd160.h9
-rw-r--r--mount/sundries.c292
-rw-r--r--mount/sundries.h53
-rw-r--r--mount/swap_constants.h15
-rw-r--r--mount/swapoff.81
-rw-r--r--mount/swapon.8191
-rw-r--r--mount/swapon.c796
-rw-r--r--mount/umount.8163
-rw-r--r--mount/umount.c714
-rw-r--r--mount/xmalloc.c48
-rw-r--r--mount/xmalloc.h14
31 files changed, 13071 insertions, 0 deletions
diff --git a/mount/Makefile.am b/mount/Makefile.am
new file mode 100644
index 0000000..5628cc0
--- /dev/null
+++ b/mount/Makefile.am
@@ -0,0 +1,96 @@
+include $(top_srcdir)/config/include-Makefile.am
+
+EXTRA_DIST = README.mount
+
+bin_PROGRAMS = mount umount
+sbin_PROGRAMS = losetup swapon
+dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8
+
+# generic sources for all programs (mount, umount, losetup)
+srcs_common = sundries.c xmalloc.c ../lib/canonicalize.c sundries.h xmalloc.h rmd160.c
+
+# generic header for mount and umount
+hdrs_mount = fstab.h mount_mntent.h mount_constants.h \
+ lomount.h getusername.h loop.h
+
+# generic sources for mount and umount
+srcs_mount = fstab.c mount_mntent.c getusername.c lomount.c devname.c devname.h \
+ $(srcs_common) $(hdrs_mount) ../lib/env.c ../lib/linux_version.c \
+ ../lib/blkdev.c ../lib/fsprobe.c
+
+# generic flags for all programs (except losetup)
+# -- 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 =
+ldadd_static =
+cflags_common =
+
+# generic libtool options for all static programs
+ldflags_static ="-all-static"
+
+mount_SOURCES = mount.c $(srcs_mount) ../lib/setproctitle.c
+mount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) $(cflags_common)
+mount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
+mount_LDADD = $(ldadd_common)
+
+umount_SOURCES = umount.c $(srcs_mount)
+umount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) $(cflags_common)
+umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
+umount_LDADD = $(ldadd_common)
+
+swapon_SOURCES = swapon.c swap_constants.h ../lib/linux_version.c \
+ ../lib/blkdev.c ../lib/fsprobe.c ../lib/canonicalize.c
+swapon_CFLAGS = $(cflags_common)
+swapon_LDADD = $(ldadd_common)
+
+losetup_SOURCES = lomount.c $(srcs_common) loop.h lomount.h
+losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS)
+
+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_STATIC_LOSETUP
+bin_PROGRAMS += losetup.static
+losetup_static_SOURCES = $(losetup_SOURCES)
+losetup_static_LDFLAGS = $(ldflags_static)
+losetup_static_CPPFLAGS = -DMAIN $(AM_CPPFLAGS)
+endif
+
+if BUILD_LIBBLKID
+ldadd_common += $(ul_libblkid_la)
+ldadd_static += $(ul_libblkid_la)
+cflags_common += -I$(ul_libblkid_srcdir)
+else
+ldadd_common += $(BLKID_LIBS)
+ldadd_static += $(BLKID_LIBS_STATIC)
+cflags_common += $(BLKID_CFLAGS)
+endif
+
+if HAVE_SELINUX
+mount_LDADD += $(SELINUX_LIBS)
+mount_static_LDADD += $(SELINUX_LIBS_STATIC)
+endif
+
+noinst_PROGRAMS = mtab_lock_test
+mtab_lock_test_SOURCES = fstab.c $(srcs_common) $(hdrs_mount)
+mtab_lock_test_CPPFLAGS = -DMAIN_TEST_MTABLOCK $(AM_CPPFLAGS)
+
+install-exec-hook:
+ chmod 4755 $(DESTDIR)$(bindir)/mount
+ chmod 4755 $(DESTDIR)$(bindir)/umount
+ cd $(DESTDIR)$(sbindir) && ln -sf swapon swapoff
diff --git a/mount/Makefile.in b/mount/Makefile.in
new file mode 100644
index 0000000..8e621ea
--- /dev/null
+++ b/mount/Makefile.in
@@ -0,0 +1,2142 @@
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = $(dist_man_MANS) $(dist_noinst_DATA) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/config/include-Makefile.am
+bin_PROGRAMS = mount$(EXEEXT) umount$(EXEEXT) $(am__EXEEXT_1) \
+ $(am__EXEEXT_2) $(am__EXEEXT_3)
+sbin_PROGRAMS = losetup$(EXEEXT) swapon$(EXEEXT)
+@HAVE_STATIC_MOUNT_TRUE@am__append_1 = mount.static
+@HAVE_STATIC_MOUNT_TRUE@am__append_2 = $(ldadd_static)
+@HAVE_STATIC_UMOUNT_TRUE@am__append_3 = umount.static
+@HAVE_STATIC_LOSETUP_TRUE@am__append_4 = losetup.static
+@BUILD_LIBBLKID_TRUE@am__append_5 = $(ul_libblkid_la)
+@BUILD_LIBBLKID_TRUE@am__append_6 = $(ul_libblkid_la)
+@BUILD_LIBBLKID_TRUE@am__append_7 = -I$(ul_libblkid_srcdir)
+@BUILD_LIBBLKID_FALSE@am__append_8 = $(BLKID_LIBS)
+@BUILD_LIBBLKID_FALSE@am__append_9 = $(BLKID_LIBS_STATIC)
+@BUILD_LIBBLKID_FALSE@am__append_10 = $(BLKID_CFLAGS)
+@HAVE_SELINUX_TRUE@am__append_11 = $(SELINUX_LIBS)
+@HAVE_SELINUX_TRUE@am__append_12 = $(SELINUX_LIBS_STATIC)
+noinst_PROGRAMS = mtab_lock_test$(EXEEXT)
+subdir = mount
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+ $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
+ $(top_srcdir)/m4/tls.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+@HAVE_STATIC_MOUNT_TRUE@am__EXEEXT_1 = mount.static$(EXEEXT)
+@HAVE_STATIC_UMOUNT_TRUE@am__EXEEXT_2 = umount.static$(EXEEXT)
+@HAVE_STATIC_LOSETUP_TRUE@am__EXEEXT_3 = losetup.static$(EXEEXT)
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \
+ "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) $(sbin_PROGRAMS)
+am__objects_1 = losetup-sundries.$(OBJEXT) losetup-xmalloc.$(OBJEXT) \
+ losetup-canonicalize.$(OBJEXT) losetup-rmd160.$(OBJEXT)
+am_losetup_OBJECTS = losetup-lomount.$(OBJEXT) $(am__objects_1)
+losetup_OBJECTS = $(am_losetup_OBJECTS)
+losetup_LDADD = $(LDADD)
+am__losetup_static_SOURCES_DIST = lomount.c sundries.c xmalloc.c \
+ ../lib/canonicalize.c sundries.h xmalloc.h rmd160.c loop.h \
+ lomount.h
+am__objects_2 = losetup_static-sundries.$(OBJEXT) \
+ losetup_static-xmalloc.$(OBJEXT) \
+ losetup_static-canonicalize.$(OBJEXT) \
+ losetup_static-rmd160.$(OBJEXT)
+am__objects_3 = losetup_static-lomount.$(OBJEXT) $(am__objects_2)
+@HAVE_STATIC_LOSETUP_TRUE@am_losetup_static_OBJECTS = \
+@HAVE_STATIC_LOSETUP_TRUE@ $(am__objects_3)
+losetup_static_OBJECTS = $(am_losetup_static_OBJECTS)
+losetup_static_LDADD = $(LDADD)
+losetup_static_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(losetup_static_LDFLAGS) $(LDFLAGS) -o $@
+am__objects_4 = mount-sundries.$(OBJEXT) mount-xmalloc.$(OBJEXT) \
+ mount-canonicalize.$(OBJEXT) mount-rmd160.$(OBJEXT)
+am__objects_5 =
+am__objects_6 = mount-fstab.$(OBJEXT) mount-mount_mntent.$(OBJEXT) \
+ mount-getusername.$(OBJEXT) mount-lomount.$(OBJEXT) \
+ mount-devname.$(OBJEXT) $(am__objects_4) $(am__objects_5) \
+ mount-env.$(OBJEXT) mount-linux_version.$(OBJEXT) \
+ mount-blkdev.$(OBJEXT) mount-fsprobe.$(OBJEXT)
+am_mount_OBJECTS = mount-mount.$(OBJEXT) $(am__objects_6) \
+ mount-setproctitle.$(OBJEXT)
+mount_OBJECTS = $(am_mount_OBJECTS)
+am__DEPENDENCIES_1 =
+@BUILD_LIBBLKID_FALSE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
+am__DEPENDENCIES_3 = $(am__append_5) $(am__DEPENDENCIES_2)
+@HAVE_SELINUX_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1)
+mount_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4)
+mount_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(mount_CFLAGS) $(CFLAGS) $(mount_LDFLAGS) \
+ $(LDFLAGS) -o $@
+am__mount_static_SOURCES_DIST = mount.c fstab.c mount_mntent.c \
+ getusername.c lomount.c devname.c devname.h sundries.c \
+ xmalloc.c ../lib/canonicalize.c sundries.h xmalloc.h rmd160.c \
+ fstab.h mount_mntent.h mount_constants.h lomount.h \
+ getusername.h loop.h ../lib/env.c ../lib/linux_version.c \
+ ../lib/blkdev.c ../lib/fsprobe.c ../lib/setproctitle.c
+am__objects_7 = mount_static-sundries.$(OBJEXT) \
+ mount_static-xmalloc.$(OBJEXT) \
+ mount_static-canonicalize.$(OBJEXT) \
+ mount_static-rmd160.$(OBJEXT)
+am__objects_8 = mount_static-fstab.$(OBJEXT) \
+ mount_static-mount_mntent.$(OBJEXT) \
+ mount_static-getusername.$(OBJEXT) \
+ mount_static-lomount.$(OBJEXT) mount_static-devname.$(OBJEXT) \
+ $(am__objects_7) $(am__objects_5) mount_static-env.$(OBJEXT) \
+ mount_static-linux_version.$(OBJEXT) \
+ mount_static-blkdev.$(OBJEXT) mount_static-fsprobe.$(OBJEXT)
+am__objects_9 = mount_static-mount.$(OBJEXT) $(am__objects_8) \
+ mount_static-setproctitle.$(OBJEXT)
+@HAVE_STATIC_MOUNT_TRUE@am_mount_static_OBJECTS = $(am__objects_9)
+mount_static_OBJECTS = $(am_mount_static_OBJECTS)
+am__DEPENDENCIES_5 = $(am__append_6) $(am__DEPENDENCIES_2)
+@HAVE_STATIC_MOUNT_TRUE@am__DEPENDENCIES_6 = $(am__DEPENDENCIES_5)
+mount_static_DEPENDENCIES = $(am__DEPENDENCIES_6) \
+ $(am__DEPENDENCIES_4)
+mount_static_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(mount_static_CFLAGS) \
+ $(CFLAGS) $(mount_static_LDFLAGS) $(LDFLAGS) -o $@
+am__objects_10 = mtab_lock_test-sundries.$(OBJEXT) \
+ mtab_lock_test-xmalloc.$(OBJEXT) \
+ mtab_lock_test-canonicalize.$(OBJEXT) \
+ mtab_lock_test-rmd160.$(OBJEXT)
+am_mtab_lock_test_OBJECTS = mtab_lock_test-fstab.$(OBJEXT) \
+ $(am__objects_10) $(am__objects_5)
+mtab_lock_test_OBJECTS = $(am_mtab_lock_test_OBJECTS)
+mtab_lock_test_LDADD = $(LDADD)
+am_swapon_OBJECTS = swapon-swapon.$(OBJEXT) \
+ swapon-linux_version.$(OBJEXT) swapon-blkdev.$(OBJEXT) \
+ swapon-fsprobe.$(OBJEXT) swapon-canonicalize.$(OBJEXT)
+swapon_OBJECTS = $(am_swapon_OBJECTS)
+swapon_DEPENDENCIES = $(am__DEPENDENCIES_3)
+swapon_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(swapon_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+am__objects_11 = umount-sundries.$(OBJEXT) umount-xmalloc.$(OBJEXT) \
+ umount-canonicalize.$(OBJEXT) umount-rmd160.$(OBJEXT)
+am__objects_12 = umount-fstab.$(OBJEXT) umount-mount_mntent.$(OBJEXT) \
+ umount-getusername.$(OBJEXT) umount-lomount.$(OBJEXT) \
+ umount-devname.$(OBJEXT) $(am__objects_11) $(am__objects_5) \
+ umount-env.$(OBJEXT) umount-linux_version.$(OBJEXT) \
+ umount-blkdev.$(OBJEXT) umount-fsprobe.$(OBJEXT)
+am_umount_OBJECTS = umount-umount.$(OBJEXT) $(am__objects_12)
+umount_OBJECTS = $(am_umount_OBJECTS)
+umount_DEPENDENCIES = $(am__DEPENDENCIES_3)
+umount_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(umount_CFLAGS) $(CFLAGS) \
+ $(umount_LDFLAGS) $(LDFLAGS) -o $@
+am__umount_static_SOURCES_DIST = umount.c fstab.c mount_mntent.c \
+ getusername.c lomount.c devname.c devname.h sundries.c \
+ xmalloc.c ../lib/canonicalize.c sundries.h xmalloc.h rmd160.c \
+ fstab.h mount_mntent.h mount_constants.h lomount.h \
+ getusername.h loop.h ../lib/env.c ../lib/linux_version.c \
+ ../lib/blkdev.c ../lib/fsprobe.c
+am__objects_13 = umount_static-sundries.$(OBJEXT) \
+ umount_static-xmalloc.$(OBJEXT) \
+ umount_static-canonicalize.$(OBJEXT) \
+ umount_static-rmd160.$(OBJEXT)
+am__objects_14 = umount_static-fstab.$(OBJEXT) \
+ umount_static-mount_mntent.$(OBJEXT) \
+ umount_static-getusername.$(OBJEXT) \
+ umount_static-lomount.$(OBJEXT) \
+ umount_static-devname.$(OBJEXT) $(am__objects_13) \
+ $(am__objects_5) umount_static-env.$(OBJEXT) \
+ umount_static-linux_version.$(OBJEXT) \
+ umount_static-blkdev.$(OBJEXT) umount_static-fsprobe.$(OBJEXT)
+am__objects_15 = umount_static-umount.$(OBJEXT) $(am__objects_14)
+@HAVE_STATIC_UMOUNT_TRUE@am_umount_static_OBJECTS = $(am__objects_15)
+umount_static_OBJECTS = $(am_umount_static_OBJECTS)
+@HAVE_STATIC_UMOUNT_TRUE@umount_static_DEPENDENCIES = \
+@HAVE_STATIC_UMOUNT_TRUE@ $(am__DEPENDENCIES_5)
+umount_static_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(umount_static_CFLAGS) \
+ $(CFLAGS) $(umount_static_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(losetup_SOURCES) $(losetup_static_SOURCES) \
+ $(mount_SOURCES) $(mount_static_SOURCES) \
+ $(mtab_lock_test_SOURCES) $(swapon_SOURCES) $(umount_SOURCES) \
+ $(umount_static_SOURCES)
+DIST_SOURCES = $(losetup_SOURCES) $(am__losetup_static_SOURCES_DIST) \
+ $(mount_SOURCES) $(am__mount_static_SOURCES_DIST) \
+ $(mtab_lock_test_SOURCES) $(swapon_SOURCES) $(umount_SOURCES) \
+ $(am__umount_static_SOURCES_DIST)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+man5dir = $(mandir)/man5
+man8dir = $(mandir)/man8
+NROFF = nroff
+MANS = $(dist_man_MANS)
+DATA = $(dist_noinst_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BLKID = @BLKID@
+BLKID_CFLAGS = @BLKID_CFLAGS@
+BLKID_LIBS = @BLKID_LIBS@
+BLKID_LIBS_STATIC = @BLKID_LIBS_STATIC@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBBLKID_VERSION = @LIBBLKID_VERSION@
+LIBBLKID_VERSION_INFO = @LIBBLKID_VERSION_INFO@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBUUID_VERSION = @LIBUUID_VERSION@
+LIBUUID_VERSION_INFO = @LIBUUID_VERSION_INFO@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+NCURSES_LIBS = @NCURSES_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+SED = @SED@
+SELINUX_LIBS = @SELINUX_LIBS@
+SELINUX_LIBS_STATIC = @SELINUX_LIBS_STATIC@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+SUID_CFLAGS = @SUID_CFLAGS@
+SUID_LDFLAGS = @SUID_LDFLAGS@
+USE_NLS = @USE_NLS@
+UUID_CFLAGS = @UUID_CFLAGS@
+UUID_LIBS = @UUID_LIBS@
+VERSION = @VERSION@
+VOLID = @VOLID@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libdirname = @libdirname@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+usrbin_execdir = @usrbin_execdir@
+usrlib_execdir = @usrlib_execdir@
+usrsbin_execdir = @usrsbin_execdir@
+AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include \
+ -DLOCALEDIR=\"$(localedir)\"
+
+AM_CFLAGS = -fsigned-char
+AM_LDFLAGS =
+
+# Automake (at least up to 1.10) mishandles dist_man_MANS inside conditionals.
+# Unlike with other dist primaries, the files are not distributed if the
+# conditional is false.
+# Work the bug around until it is fixed:
+dist_noinst_DATA = $(dist_man_MANS)
+
+# Paths to in-tree libraries (use ul_ prefix to avoid possible collisions)
+#
+# blkid
+ul_libblkid_srcdir = $(top_srcdir)/shlibs/blkid/src
+ul_libblkid_builddir = $(top_builddir)/shlibs/blkid/src
+ul_libblkid_la = $(top_builddir)/shlibs/blkid/src/libblkid.la
+
+# uuid
+ul_libuuid_srcdir = $(top_srcdir)/shlibs/uuid/src
+ul_libuuid_builddir = $(top_builddir)/shlibs/uuid/src
+ul_libuuid_la = $(top_builddir)/shlibs/uuid/src/libuuid.la
+EXTRA_DIST = README.mount
+dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8
+
+# generic sources for all programs (mount, umount, losetup)
+srcs_common = sundries.c xmalloc.c ../lib/canonicalize.c sundries.h xmalloc.h rmd160.c
+
+# generic header for mount and umount
+hdrs_mount = fstab.h mount_mntent.h mount_constants.h \
+ lomount.h getusername.h loop.h
+
+
+# generic sources for mount and umount
+srcs_mount = fstab.c mount_mntent.c getusername.c lomount.c devname.c devname.h \
+ $(srcs_common) $(hdrs_mount) ../lib/env.c ../lib/linux_version.c \
+ ../lib/blkdev.c ../lib/fsprobe.c
+
+
+# generic flags for all programs (except losetup)
+# -- 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 = $(am__append_5) $(am__append_8)
+ldadd_static = $(am__append_6) $(am__append_9)
+cflags_common = $(am__append_7) $(am__append_10)
+
+# generic libtool options for all static programs
+ldflags_static = "-all-static"
+mount_SOURCES = mount.c $(srcs_mount) ../lib/setproctitle.c
+mount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) $(cflags_common)
+mount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
+mount_LDADD = $(ldadd_common) $(am__append_11)
+umount_SOURCES = umount.c $(srcs_mount)
+umount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) $(cflags_common)
+umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
+umount_LDADD = $(ldadd_common)
+swapon_SOURCES = swapon.c swap_constants.h ../lib/linux_version.c \
+ ../lib/blkdev.c ../lib/fsprobe.c ../lib/canonicalize.c
+
+swapon_CFLAGS = $(cflags_common)
+swapon_LDADD = $(ldadd_common)
+losetup_SOURCES = lomount.c $(srcs_common) loop.h lomount.h
+losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS)
+mount_static_LDADD = $(am__append_2) $(am__append_12)
+@HAVE_STATIC_MOUNT_TRUE@mount_static_SOURCES = $(mount_SOURCES)
+@HAVE_STATIC_MOUNT_TRUE@mount_static_CFLAGS = $(cflags_common)
+@HAVE_STATIC_MOUNT_TRUE@mount_static_LDFLAGS = $(ldflags_static)
+@HAVE_STATIC_UMOUNT_TRUE@umount_static_SOURCES = $(umount_SOURCES)
+@HAVE_STATIC_UMOUNT_TRUE@umount_static_CFLAGS = $(cflags_common)
+@HAVE_STATIC_UMOUNT_TRUE@umount_static_LDFLAGS = $(ldflags_static)
+@HAVE_STATIC_UMOUNT_TRUE@umount_static_LDADD = $(ldadd_static)
+@HAVE_STATIC_LOSETUP_TRUE@losetup_static_SOURCES = $(losetup_SOURCES)
+@HAVE_STATIC_LOSETUP_TRUE@losetup_static_LDFLAGS = $(ldflags_static)
+@HAVE_STATIC_LOSETUP_TRUE@losetup_static_CPPFLAGS = -DMAIN $(AM_CPPFLAGS)
+mtab_lock_test_SOURCES = fstab.c $(srcs_common) $(hdrs_mount)
+mtab_lock_test_CPPFLAGS = -DMAIN_TEST_MTABLOCK $(AM_CPPFLAGS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/config/include-Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign mount/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign mount/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+install-sbinPROGRAMS: $(sbin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
+ @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-sbinPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
+
+clean-sbinPROGRAMS:
+ @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+losetup$(EXEEXT): $(losetup_OBJECTS) $(losetup_DEPENDENCIES)
+ @rm -f losetup$(EXEEXT)
+ $(LINK) $(losetup_OBJECTS) $(losetup_LDADD) $(LIBS)
+losetup.static$(EXEEXT): $(losetup_static_OBJECTS) $(losetup_static_DEPENDENCIES)
+ @rm -f losetup.static$(EXEEXT)
+ $(losetup_static_LINK) $(losetup_static_OBJECTS) $(losetup_static_LDADD) $(LIBS)
+mount$(EXEEXT): $(mount_OBJECTS) $(mount_DEPENDENCIES)
+ @rm -f mount$(EXEEXT)
+ $(mount_LINK) $(mount_OBJECTS) $(mount_LDADD) $(LIBS)
+mount.static$(EXEEXT): $(mount_static_OBJECTS) $(mount_static_DEPENDENCIES)
+ @rm -f mount.static$(EXEEXT)
+ $(mount_static_LINK) $(mount_static_OBJECTS) $(mount_static_LDADD) $(LIBS)
+mtab_lock_test$(EXEEXT): $(mtab_lock_test_OBJECTS) $(mtab_lock_test_DEPENDENCIES)
+ @rm -f mtab_lock_test$(EXEEXT)
+ $(LINK) $(mtab_lock_test_OBJECTS) $(mtab_lock_test_LDADD) $(LIBS)
+swapon$(EXEEXT): $(swapon_OBJECTS) $(swapon_DEPENDENCIES)
+ @rm -f swapon$(EXEEXT)
+ $(swapon_LINK) $(swapon_OBJECTS) $(swapon_LDADD) $(LIBS)
+umount$(EXEEXT): $(umount_OBJECTS) $(umount_DEPENDENCIES)
+ @rm -f umount$(EXEEXT)
+ $(umount_LINK) $(umount_OBJECTS) $(umount_LDADD) $(LIBS)
+umount.static$(EXEEXT): $(umount_static_OBJECTS) $(umount_static_DEPENDENCIES)
+ @rm -f umount.static$(EXEEXT)
+ $(umount_static_LINK) $(umount_static_OBJECTS) $(umount_static_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/losetup-canonicalize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/losetup-lomount.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/losetup-rmd160.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/losetup-sundries.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/losetup-xmalloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/losetup_static-canonicalize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/losetup_static-lomount.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/losetup_static-rmd160.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/losetup_static-sundries.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/losetup_static-xmalloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount-blkdev.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount-canonicalize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount-devname.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount-env.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount-fsprobe.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount-fstab.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount-getusername.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount-linux_version.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount-lomount.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount-mount.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount-mount_mntent.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount-rmd160.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount-setproctitle.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount-sundries.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount-xmalloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_static-blkdev.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_static-canonicalize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_static-devname.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_static-env.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_static-fsprobe.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_static-fstab.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_static-getusername.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_static-linux_version.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_static-lomount.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_static-mount.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_static-mount_mntent.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_static-rmd160.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_static-setproctitle.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_static-sundries.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mount_static-xmalloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtab_lock_test-canonicalize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtab_lock_test-fstab.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtab_lock_test-rmd160.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtab_lock_test-sundries.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mtab_lock_test-xmalloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swapon-blkdev.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swapon-canonicalize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swapon-fsprobe.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swapon-linux_version.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swapon-swapon.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount-blkdev.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount-canonicalize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount-devname.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount-env.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount-fsprobe.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount-fstab.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount-getusername.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount-linux_version.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount-lomount.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount-mount_mntent.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount-rmd160.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount-sundries.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount-umount.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount-xmalloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount_static-blkdev.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount_static-canonicalize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount_static-devname.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount_static-env.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount_static-fsprobe.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount_static-fstab.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount_static-getusername.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount_static-linux_version.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount_static-lomount.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount_static-mount_mntent.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount_static-rmd160.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount_static-sundries.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount_static-umount.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/umount_static-xmalloc.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+losetup-lomount.o: lomount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup-lomount.o -MD -MP -MF $(DEPDIR)/losetup-lomount.Tpo -c -o losetup-lomount.o `test -f 'lomount.c' || echo '$(srcdir)/'`lomount.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup-lomount.Tpo $(DEPDIR)/losetup-lomount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lomount.c' object='losetup-lomount.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup-lomount.o `test -f 'lomount.c' || echo '$(srcdir)/'`lomount.c
+
+losetup-lomount.obj: lomount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup-lomount.obj -MD -MP -MF $(DEPDIR)/losetup-lomount.Tpo -c -o losetup-lomount.obj `if test -f 'lomount.c'; then $(CYGPATH_W) 'lomount.c'; else $(CYGPATH_W) '$(srcdir)/lomount.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup-lomount.Tpo $(DEPDIR)/losetup-lomount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lomount.c' object='losetup-lomount.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup-lomount.obj `if test -f 'lomount.c'; then $(CYGPATH_W) 'lomount.c'; else $(CYGPATH_W) '$(srcdir)/lomount.c'; fi`
+
+losetup-sundries.o: sundries.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup-sundries.o -MD -MP -MF $(DEPDIR)/losetup-sundries.Tpo -c -o losetup-sundries.o `test -f 'sundries.c' || echo '$(srcdir)/'`sundries.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup-sundries.Tpo $(DEPDIR)/losetup-sundries.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sundries.c' object='losetup-sundries.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup-sundries.o `test -f 'sundries.c' || echo '$(srcdir)/'`sundries.c
+
+losetup-sundries.obj: sundries.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup-sundries.obj -MD -MP -MF $(DEPDIR)/losetup-sundries.Tpo -c -o losetup-sundries.obj `if test -f 'sundries.c'; then $(CYGPATH_W) 'sundries.c'; else $(CYGPATH_W) '$(srcdir)/sundries.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup-sundries.Tpo $(DEPDIR)/losetup-sundries.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sundries.c' object='losetup-sundries.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup-sundries.obj `if test -f 'sundries.c'; then $(CYGPATH_W) 'sundries.c'; else $(CYGPATH_W) '$(srcdir)/sundries.c'; fi`
+
+losetup-xmalloc.o: xmalloc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup-xmalloc.o -MD -MP -MF $(DEPDIR)/losetup-xmalloc.Tpo -c -o losetup-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup-xmalloc.Tpo $(DEPDIR)/losetup-xmalloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xmalloc.c' object='losetup-xmalloc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c
+
+losetup-xmalloc.obj: xmalloc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup-xmalloc.obj -MD -MP -MF $(DEPDIR)/losetup-xmalloc.Tpo -c -o losetup-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup-xmalloc.Tpo $(DEPDIR)/losetup-xmalloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xmalloc.c' object='losetup-xmalloc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi`
+
+losetup-canonicalize.o: ../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup-canonicalize.o -MD -MP -MF $(DEPDIR)/losetup-canonicalize.Tpo -c -o losetup-canonicalize.o `test -f '../lib/canonicalize.c' || echo '$(srcdir)/'`../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup-canonicalize.Tpo $(DEPDIR)/losetup-canonicalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/canonicalize.c' object='losetup-canonicalize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup-canonicalize.o `test -f '../lib/canonicalize.c' || echo '$(srcdir)/'`../lib/canonicalize.c
+
+losetup-canonicalize.obj: ../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup-canonicalize.obj -MD -MP -MF $(DEPDIR)/losetup-canonicalize.Tpo -c -o losetup-canonicalize.obj `if test -f '../lib/canonicalize.c'; then $(CYGPATH_W) '../lib/canonicalize.c'; else $(CYGPATH_W) '$(srcdir)/../lib/canonicalize.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup-canonicalize.Tpo $(DEPDIR)/losetup-canonicalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/canonicalize.c' object='losetup-canonicalize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup-canonicalize.obj `if test -f '../lib/canonicalize.c'; then $(CYGPATH_W) '../lib/canonicalize.c'; else $(CYGPATH_W) '$(srcdir)/../lib/canonicalize.c'; fi`
+
+losetup-rmd160.o: rmd160.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup-rmd160.o -MD -MP -MF $(DEPDIR)/losetup-rmd160.Tpo -c -o losetup-rmd160.o `test -f 'rmd160.c' || echo '$(srcdir)/'`rmd160.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup-rmd160.Tpo $(DEPDIR)/losetup-rmd160.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rmd160.c' object='losetup-rmd160.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup-rmd160.o `test -f 'rmd160.c' || echo '$(srcdir)/'`rmd160.c
+
+losetup-rmd160.obj: rmd160.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup-rmd160.obj -MD -MP -MF $(DEPDIR)/losetup-rmd160.Tpo -c -o losetup-rmd160.obj `if test -f 'rmd160.c'; then $(CYGPATH_W) 'rmd160.c'; else $(CYGPATH_W) '$(srcdir)/rmd160.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup-rmd160.Tpo $(DEPDIR)/losetup-rmd160.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rmd160.c' object='losetup-rmd160.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup-rmd160.obj `if test -f 'rmd160.c'; then $(CYGPATH_W) 'rmd160.c'; else $(CYGPATH_W) '$(srcdir)/rmd160.c'; fi`
+
+losetup_static-lomount.o: lomount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup_static-lomount.o -MD -MP -MF $(DEPDIR)/losetup_static-lomount.Tpo -c -o losetup_static-lomount.o `test -f 'lomount.c' || echo '$(srcdir)/'`lomount.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup_static-lomount.Tpo $(DEPDIR)/losetup_static-lomount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lomount.c' object='losetup_static-lomount.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup_static-lomount.o `test -f 'lomount.c' || echo '$(srcdir)/'`lomount.c
+
+losetup_static-lomount.obj: lomount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup_static-lomount.obj -MD -MP -MF $(DEPDIR)/losetup_static-lomount.Tpo -c -o losetup_static-lomount.obj `if test -f 'lomount.c'; then $(CYGPATH_W) 'lomount.c'; else $(CYGPATH_W) '$(srcdir)/lomount.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup_static-lomount.Tpo $(DEPDIR)/losetup_static-lomount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lomount.c' object='losetup_static-lomount.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup_static-lomount.obj `if test -f 'lomount.c'; then $(CYGPATH_W) 'lomount.c'; else $(CYGPATH_W) '$(srcdir)/lomount.c'; fi`
+
+losetup_static-sundries.o: sundries.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup_static-sundries.o -MD -MP -MF $(DEPDIR)/losetup_static-sundries.Tpo -c -o losetup_static-sundries.o `test -f 'sundries.c' || echo '$(srcdir)/'`sundries.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup_static-sundries.Tpo $(DEPDIR)/losetup_static-sundries.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sundries.c' object='losetup_static-sundries.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup_static-sundries.o `test -f 'sundries.c' || echo '$(srcdir)/'`sundries.c
+
+losetup_static-sundries.obj: sundries.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup_static-sundries.obj -MD -MP -MF $(DEPDIR)/losetup_static-sundries.Tpo -c -o losetup_static-sundries.obj `if test -f 'sundries.c'; then $(CYGPATH_W) 'sundries.c'; else $(CYGPATH_W) '$(srcdir)/sundries.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup_static-sundries.Tpo $(DEPDIR)/losetup_static-sundries.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sundries.c' object='losetup_static-sundries.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup_static-sundries.obj `if test -f 'sundries.c'; then $(CYGPATH_W) 'sundries.c'; else $(CYGPATH_W) '$(srcdir)/sundries.c'; fi`
+
+losetup_static-xmalloc.o: xmalloc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup_static-xmalloc.o -MD -MP -MF $(DEPDIR)/losetup_static-xmalloc.Tpo -c -o losetup_static-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup_static-xmalloc.Tpo $(DEPDIR)/losetup_static-xmalloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xmalloc.c' object='losetup_static-xmalloc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup_static-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c
+
+losetup_static-xmalloc.obj: xmalloc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup_static-xmalloc.obj -MD -MP -MF $(DEPDIR)/losetup_static-xmalloc.Tpo -c -o losetup_static-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup_static-xmalloc.Tpo $(DEPDIR)/losetup_static-xmalloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xmalloc.c' object='losetup_static-xmalloc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup_static-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi`
+
+losetup_static-canonicalize.o: ../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup_static-canonicalize.o -MD -MP -MF $(DEPDIR)/losetup_static-canonicalize.Tpo -c -o losetup_static-canonicalize.o `test -f '../lib/canonicalize.c' || echo '$(srcdir)/'`../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup_static-canonicalize.Tpo $(DEPDIR)/losetup_static-canonicalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/canonicalize.c' object='losetup_static-canonicalize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup_static-canonicalize.o `test -f '../lib/canonicalize.c' || echo '$(srcdir)/'`../lib/canonicalize.c
+
+losetup_static-canonicalize.obj: ../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup_static-canonicalize.obj -MD -MP -MF $(DEPDIR)/losetup_static-canonicalize.Tpo -c -o losetup_static-canonicalize.obj `if test -f '../lib/canonicalize.c'; then $(CYGPATH_W) '../lib/canonicalize.c'; else $(CYGPATH_W) '$(srcdir)/../lib/canonicalize.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup_static-canonicalize.Tpo $(DEPDIR)/losetup_static-canonicalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/canonicalize.c' object='losetup_static-canonicalize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup_static-canonicalize.obj `if test -f '../lib/canonicalize.c'; then $(CYGPATH_W) '../lib/canonicalize.c'; else $(CYGPATH_W) '$(srcdir)/../lib/canonicalize.c'; fi`
+
+losetup_static-rmd160.o: rmd160.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup_static-rmd160.o -MD -MP -MF $(DEPDIR)/losetup_static-rmd160.Tpo -c -o losetup_static-rmd160.o `test -f 'rmd160.c' || echo '$(srcdir)/'`rmd160.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup_static-rmd160.Tpo $(DEPDIR)/losetup_static-rmd160.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rmd160.c' object='losetup_static-rmd160.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup_static-rmd160.o `test -f 'rmd160.c' || echo '$(srcdir)/'`rmd160.c
+
+losetup_static-rmd160.obj: rmd160.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT losetup_static-rmd160.obj -MD -MP -MF $(DEPDIR)/losetup_static-rmd160.Tpo -c -o losetup_static-rmd160.obj `if test -f 'rmd160.c'; then $(CYGPATH_W) 'rmd160.c'; else $(CYGPATH_W) '$(srcdir)/rmd160.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/losetup_static-rmd160.Tpo $(DEPDIR)/losetup_static-rmd160.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rmd160.c' object='losetup_static-rmd160.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(losetup_static_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o losetup_static-rmd160.obj `if test -f 'rmd160.c'; then $(CYGPATH_W) 'rmd160.c'; else $(CYGPATH_W) '$(srcdir)/rmd160.c'; fi`
+
+mount-mount.o: mount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-mount.o -MD -MP -MF $(DEPDIR)/mount-mount.Tpo -c -o mount-mount.o `test -f 'mount.c' || echo '$(srcdir)/'`mount.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-mount.Tpo $(DEPDIR)/mount-mount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mount.c' object='mount-mount.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-mount.o `test -f 'mount.c' || echo '$(srcdir)/'`mount.c
+
+mount-mount.obj: mount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-mount.obj -MD -MP -MF $(DEPDIR)/mount-mount.Tpo -c -o mount-mount.obj `if test -f 'mount.c'; then $(CYGPATH_W) 'mount.c'; else $(CYGPATH_W) '$(srcdir)/mount.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-mount.Tpo $(DEPDIR)/mount-mount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mount.c' object='mount-mount.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-mount.obj `if test -f 'mount.c'; then $(CYGPATH_W) 'mount.c'; else $(CYGPATH_W) '$(srcdir)/mount.c'; fi`
+
+mount-fstab.o: fstab.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-fstab.o -MD -MP -MF $(DEPDIR)/mount-fstab.Tpo -c -o mount-fstab.o `test -f 'fstab.c' || echo '$(srcdir)/'`fstab.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-fstab.Tpo $(DEPDIR)/mount-fstab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fstab.c' object='mount-fstab.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-fstab.o `test -f 'fstab.c' || echo '$(srcdir)/'`fstab.c
+
+mount-fstab.obj: fstab.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-fstab.obj -MD -MP -MF $(DEPDIR)/mount-fstab.Tpo -c -o mount-fstab.obj `if test -f 'fstab.c'; then $(CYGPATH_W) 'fstab.c'; else $(CYGPATH_W) '$(srcdir)/fstab.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-fstab.Tpo $(DEPDIR)/mount-fstab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fstab.c' object='mount-fstab.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-fstab.obj `if test -f 'fstab.c'; then $(CYGPATH_W) 'fstab.c'; else $(CYGPATH_W) '$(srcdir)/fstab.c'; fi`
+
+mount-mount_mntent.o: mount_mntent.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-mount_mntent.o -MD -MP -MF $(DEPDIR)/mount-mount_mntent.Tpo -c -o mount-mount_mntent.o `test -f 'mount_mntent.c' || echo '$(srcdir)/'`mount_mntent.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-mount_mntent.Tpo $(DEPDIR)/mount-mount_mntent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mount_mntent.c' object='mount-mount_mntent.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-mount_mntent.o `test -f 'mount_mntent.c' || echo '$(srcdir)/'`mount_mntent.c
+
+mount-mount_mntent.obj: mount_mntent.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-mount_mntent.obj -MD -MP -MF $(DEPDIR)/mount-mount_mntent.Tpo -c -o mount-mount_mntent.obj `if test -f 'mount_mntent.c'; then $(CYGPATH_W) 'mount_mntent.c'; else $(CYGPATH_W) '$(srcdir)/mount_mntent.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-mount_mntent.Tpo $(DEPDIR)/mount-mount_mntent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mount_mntent.c' object='mount-mount_mntent.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-mount_mntent.obj `if test -f 'mount_mntent.c'; then $(CYGPATH_W) 'mount_mntent.c'; else $(CYGPATH_W) '$(srcdir)/mount_mntent.c'; fi`
+
+mount-getusername.o: getusername.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-getusername.o -MD -MP -MF $(DEPDIR)/mount-getusername.Tpo -c -o mount-getusername.o `test -f 'getusername.c' || echo '$(srcdir)/'`getusername.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-getusername.Tpo $(DEPDIR)/mount-getusername.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getusername.c' object='mount-getusername.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-getusername.o `test -f 'getusername.c' || echo '$(srcdir)/'`getusername.c
+
+mount-getusername.obj: getusername.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-getusername.obj -MD -MP -MF $(DEPDIR)/mount-getusername.Tpo -c -o mount-getusername.obj `if test -f 'getusername.c'; then $(CYGPATH_W) 'getusername.c'; else $(CYGPATH_W) '$(srcdir)/getusername.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-getusername.Tpo $(DEPDIR)/mount-getusername.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getusername.c' object='mount-getusername.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-getusername.obj `if test -f 'getusername.c'; then $(CYGPATH_W) 'getusername.c'; else $(CYGPATH_W) '$(srcdir)/getusername.c'; fi`
+
+mount-lomount.o: lomount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-lomount.o -MD -MP -MF $(DEPDIR)/mount-lomount.Tpo -c -o mount-lomount.o `test -f 'lomount.c' || echo '$(srcdir)/'`lomount.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-lomount.Tpo $(DEPDIR)/mount-lomount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lomount.c' object='mount-lomount.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-lomount.o `test -f 'lomount.c' || echo '$(srcdir)/'`lomount.c
+
+mount-lomount.obj: lomount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-lomount.obj -MD -MP -MF $(DEPDIR)/mount-lomount.Tpo -c -o mount-lomount.obj `if test -f 'lomount.c'; then $(CYGPATH_W) 'lomount.c'; else $(CYGPATH_W) '$(srcdir)/lomount.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-lomount.Tpo $(DEPDIR)/mount-lomount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lomount.c' object='mount-lomount.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-lomount.obj `if test -f 'lomount.c'; then $(CYGPATH_W) 'lomount.c'; else $(CYGPATH_W) '$(srcdir)/lomount.c'; fi`
+
+mount-devname.o: devname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-devname.o -MD -MP -MF $(DEPDIR)/mount-devname.Tpo -c -o mount-devname.o `test -f 'devname.c' || echo '$(srcdir)/'`devname.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-devname.Tpo $(DEPDIR)/mount-devname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='devname.c' object='mount-devname.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-devname.o `test -f 'devname.c' || echo '$(srcdir)/'`devname.c
+
+mount-devname.obj: devname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-devname.obj -MD -MP -MF $(DEPDIR)/mount-devname.Tpo -c -o mount-devname.obj `if test -f 'devname.c'; then $(CYGPATH_W) 'devname.c'; else $(CYGPATH_W) '$(srcdir)/devname.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-devname.Tpo $(DEPDIR)/mount-devname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='devname.c' object='mount-devname.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-devname.obj `if test -f 'devname.c'; then $(CYGPATH_W) 'devname.c'; else $(CYGPATH_W) '$(srcdir)/devname.c'; fi`
+
+mount-sundries.o: sundries.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-sundries.o -MD -MP -MF $(DEPDIR)/mount-sundries.Tpo -c -o mount-sundries.o `test -f 'sundries.c' || echo '$(srcdir)/'`sundries.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-sundries.Tpo $(DEPDIR)/mount-sundries.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sundries.c' object='mount-sundries.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-sundries.o `test -f 'sundries.c' || echo '$(srcdir)/'`sundries.c
+
+mount-sundries.obj: sundries.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-sundries.obj -MD -MP -MF $(DEPDIR)/mount-sundries.Tpo -c -o mount-sundries.obj `if test -f 'sundries.c'; then $(CYGPATH_W) 'sundries.c'; else $(CYGPATH_W) '$(srcdir)/sundries.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-sundries.Tpo $(DEPDIR)/mount-sundries.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sundries.c' object='mount-sundries.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-sundries.obj `if test -f 'sundries.c'; then $(CYGPATH_W) 'sundries.c'; else $(CYGPATH_W) '$(srcdir)/sundries.c'; fi`
+
+mount-xmalloc.o: xmalloc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-xmalloc.o -MD -MP -MF $(DEPDIR)/mount-xmalloc.Tpo -c -o mount-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-xmalloc.Tpo $(DEPDIR)/mount-xmalloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xmalloc.c' object='mount-xmalloc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c
+
+mount-xmalloc.obj: xmalloc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-xmalloc.obj -MD -MP -MF $(DEPDIR)/mount-xmalloc.Tpo -c -o mount-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-xmalloc.Tpo $(DEPDIR)/mount-xmalloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xmalloc.c' object='mount-xmalloc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi`
+
+mount-canonicalize.o: ../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-canonicalize.o -MD -MP -MF $(DEPDIR)/mount-canonicalize.Tpo -c -o mount-canonicalize.o `test -f '../lib/canonicalize.c' || echo '$(srcdir)/'`../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-canonicalize.Tpo $(DEPDIR)/mount-canonicalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/canonicalize.c' object='mount-canonicalize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-canonicalize.o `test -f '../lib/canonicalize.c' || echo '$(srcdir)/'`../lib/canonicalize.c
+
+mount-canonicalize.obj: ../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-canonicalize.obj -MD -MP -MF $(DEPDIR)/mount-canonicalize.Tpo -c -o mount-canonicalize.obj `if test -f '../lib/canonicalize.c'; then $(CYGPATH_W) '../lib/canonicalize.c'; else $(CYGPATH_W) '$(srcdir)/../lib/canonicalize.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-canonicalize.Tpo $(DEPDIR)/mount-canonicalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/canonicalize.c' object='mount-canonicalize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-canonicalize.obj `if test -f '../lib/canonicalize.c'; then $(CYGPATH_W) '../lib/canonicalize.c'; else $(CYGPATH_W) '$(srcdir)/../lib/canonicalize.c'; fi`
+
+mount-rmd160.o: rmd160.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-rmd160.o -MD -MP -MF $(DEPDIR)/mount-rmd160.Tpo -c -o mount-rmd160.o `test -f 'rmd160.c' || echo '$(srcdir)/'`rmd160.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-rmd160.Tpo $(DEPDIR)/mount-rmd160.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rmd160.c' object='mount-rmd160.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-rmd160.o `test -f 'rmd160.c' || echo '$(srcdir)/'`rmd160.c
+
+mount-rmd160.obj: rmd160.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-rmd160.obj -MD -MP -MF $(DEPDIR)/mount-rmd160.Tpo -c -o mount-rmd160.obj `if test -f 'rmd160.c'; then $(CYGPATH_W) 'rmd160.c'; else $(CYGPATH_W) '$(srcdir)/rmd160.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-rmd160.Tpo $(DEPDIR)/mount-rmd160.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rmd160.c' object='mount-rmd160.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-rmd160.obj `if test -f 'rmd160.c'; then $(CYGPATH_W) 'rmd160.c'; else $(CYGPATH_W) '$(srcdir)/rmd160.c'; fi`
+
+mount-env.o: ../lib/env.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-env.o -MD -MP -MF $(DEPDIR)/mount-env.Tpo -c -o mount-env.o `test -f '../lib/env.c' || echo '$(srcdir)/'`../lib/env.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-env.Tpo $(DEPDIR)/mount-env.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/env.c' object='mount-env.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-env.o `test -f '../lib/env.c' || echo '$(srcdir)/'`../lib/env.c
+
+mount-env.obj: ../lib/env.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-env.obj -MD -MP -MF $(DEPDIR)/mount-env.Tpo -c -o mount-env.obj `if test -f '../lib/env.c'; then $(CYGPATH_W) '../lib/env.c'; else $(CYGPATH_W) '$(srcdir)/../lib/env.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-env.Tpo $(DEPDIR)/mount-env.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/env.c' object='mount-env.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-env.obj `if test -f '../lib/env.c'; then $(CYGPATH_W) '../lib/env.c'; else $(CYGPATH_W) '$(srcdir)/../lib/env.c'; fi`
+
+mount-linux_version.o: ../lib/linux_version.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-linux_version.o -MD -MP -MF $(DEPDIR)/mount-linux_version.Tpo -c -o mount-linux_version.o `test -f '../lib/linux_version.c' || echo '$(srcdir)/'`../lib/linux_version.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-linux_version.Tpo $(DEPDIR)/mount-linux_version.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/linux_version.c' object='mount-linux_version.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-linux_version.o `test -f '../lib/linux_version.c' || echo '$(srcdir)/'`../lib/linux_version.c
+
+mount-linux_version.obj: ../lib/linux_version.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-linux_version.obj -MD -MP -MF $(DEPDIR)/mount-linux_version.Tpo -c -o mount-linux_version.obj `if test -f '../lib/linux_version.c'; then $(CYGPATH_W) '../lib/linux_version.c'; else $(CYGPATH_W) '$(srcdir)/../lib/linux_version.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-linux_version.Tpo $(DEPDIR)/mount-linux_version.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/linux_version.c' object='mount-linux_version.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-linux_version.obj `if test -f '../lib/linux_version.c'; then $(CYGPATH_W) '../lib/linux_version.c'; else $(CYGPATH_W) '$(srcdir)/../lib/linux_version.c'; fi`
+
+mount-blkdev.o: ../lib/blkdev.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-blkdev.o -MD -MP -MF $(DEPDIR)/mount-blkdev.Tpo -c -o mount-blkdev.o `test -f '../lib/blkdev.c' || echo '$(srcdir)/'`../lib/blkdev.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-blkdev.Tpo $(DEPDIR)/mount-blkdev.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/blkdev.c' object='mount-blkdev.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-blkdev.o `test -f '../lib/blkdev.c' || echo '$(srcdir)/'`../lib/blkdev.c
+
+mount-blkdev.obj: ../lib/blkdev.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-blkdev.obj -MD -MP -MF $(DEPDIR)/mount-blkdev.Tpo -c -o mount-blkdev.obj `if test -f '../lib/blkdev.c'; then $(CYGPATH_W) '../lib/blkdev.c'; else $(CYGPATH_W) '$(srcdir)/../lib/blkdev.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-blkdev.Tpo $(DEPDIR)/mount-blkdev.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/blkdev.c' object='mount-blkdev.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-blkdev.obj `if test -f '../lib/blkdev.c'; then $(CYGPATH_W) '../lib/blkdev.c'; else $(CYGPATH_W) '$(srcdir)/../lib/blkdev.c'; fi`
+
+mount-fsprobe.o: ../lib/fsprobe.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-fsprobe.o -MD -MP -MF $(DEPDIR)/mount-fsprobe.Tpo -c -o mount-fsprobe.o `test -f '../lib/fsprobe.c' || echo '$(srcdir)/'`../lib/fsprobe.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-fsprobe.Tpo $(DEPDIR)/mount-fsprobe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/fsprobe.c' object='mount-fsprobe.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-fsprobe.o `test -f '../lib/fsprobe.c' || echo '$(srcdir)/'`../lib/fsprobe.c
+
+mount-fsprobe.obj: ../lib/fsprobe.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-fsprobe.obj -MD -MP -MF $(DEPDIR)/mount-fsprobe.Tpo -c -o mount-fsprobe.obj `if test -f '../lib/fsprobe.c'; then $(CYGPATH_W) '../lib/fsprobe.c'; else $(CYGPATH_W) '$(srcdir)/../lib/fsprobe.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-fsprobe.Tpo $(DEPDIR)/mount-fsprobe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/fsprobe.c' object='mount-fsprobe.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-fsprobe.obj `if test -f '../lib/fsprobe.c'; then $(CYGPATH_W) '../lib/fsprobe.c'; else $(CYGPATH_W) '$(srcdir)/../lib/fsprobe.c'; fi`
+
+mount-setproctitle.o: ../lib/setproctitle.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-setproctitle.o -MD -MP -MF $(DEPDIR)/mount-setproctitle.Tpo -c -o mount-setproctitle.o `test -f '../lib/setproctitle.c' || echo '$(srcdir)/'`../lib/setproctitle.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-setproctitle.Tpo $(DEPDIR)/mount-setproctitle.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/setproctitle.c' object='mount-setproctitle.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-setproctitle.o `test -f '../lib/setproctitle.c' || echo '$(srcdir)/'`../lib/setproctitle.c
+
+mount-setproctitle.obj: ../lib/setproctitle.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -MT mount-setproctitle.obj -MD -MP -MF $(DEPDIR)/mount-setproctitle.Tpo -c -o mount-setproctitle.obj `if test -f '../lib/setproctitle.c'; then $(CYGPATH_W) '../lib/setproctitle.c'; else $(CYGPATH_W) '$(srcdir)/../lib/setproctitle.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount-setproctitle.Tpo $(DEPDIR)/mount-setproctitle.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/setproctitle.c' object='mount-setproctitle.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_CFLAGS) $(CFLAGS) -c -o mount-setproctitle.obj `if test -f '../lib/setproctitle.c'; then $(CYGPATH_W) '../lib/setproctitle.c'; else $(CYGPATH_W) '$(srcdir)/../lib/setproctitle.c'; fi`
+
+mount_static-mount.o: mount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-mount.o -MD -MP -MF $(DEPDIR)/mount_static-mount.Tpo -c -o mount_static-mount.o `test -f 'mount.c' || echo '$(srcdir)/'`mount.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-mount.Tpo $(DEPDIR)/mount_static-mount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mount.c' object='mount_static-mount.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-mount.o `test -f 'mount.c' || echo '$(srcdir)/'`mount.c
+
+mount_static-mount.obj: mount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-mount.obj -MD -MP -MF $(DEPDIR)/mount_static-mount.Tpo -c -o mount_static-mount.obj `if test -f 'mount.c'; then $(CYGPATH_W) 'mount.c'; else $(CYGPATH_W) '$(srcdir)/mount.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-mount.Tpo $(DEPDIR)/mount_static-mount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mount.c' object='mount_static-mount.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-mount.obj `if test -f 'mount.c'; then $(CYGPATH_W) 'mount.c'; else $(CYGPATH_W) '$(srcdir)/mount.c'; fi`
+
+mount_static-fstab.o: fstab.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-fstab.o -MD -MP -MF $(DEPDIR)/mount_static-fstab.Tpo -c -o mount_static-fstab.o `test -f 'fstab.c' || echo '$(srcdir)/'`fstab.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-fstab.Tpo $(DEPDIR)/mount_static-fstab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fstab.c' object='mount_static-fstab.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-fstab.o `test -f 'fstab.c' || echo '$(srcdir)/'`fstab.c
+
+mount_static-fstab.obj: fstab.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-fstab.obj -MD -MP -MF $(DEPDIR)/mount_static-fstab.Tpo -c -o mount_static-fstab.obj `if test -f 'fstab.c'; then $(CYGPATH_W) 'fstab.c'; else $(CYGPATH_W) '$(srcdir)/fstab.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-fstab.Tpo $(DEPDIR)/mount_static-fstab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fstab.c' object='mount_static-fstab.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-fstab.obj `if test -f 'fstab.c'; then $(CYGPATH_W) 'fstab.c'; else $(CYGPATH_W) '$(srcdir)/fstab.c'; fi`
+
+mount_static-mount_mntent.o: mount_mntent.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-mount_mntent.o -MD -MP -MF $(DEPDIR)/mount_static-mount_mntent.Tpo -c -o mount_static-mount_mntent.o `test -f 'mount_mntent.c' || echo '$(srcdir)/'`mount_mntent.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-mount_mntent.Tpo $(DEPDIR)/mount_static-mount_mntent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mount_mntent.c' object='mount_static-mount_mntent.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-mount_mntent.o `test -f 'mount_mntent.c' || echo '$(srcdir)/'`mount_mntent.c
+
+mount_static-mount_mntent.obj: mount_mntent.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-mount_mntent.obj -MD -MP -MF $(DEPDIR)/mount_static-mount_mntent.Tpo -c -o mount_static-mount_mntent.obj `if test -f 'mount_mntent.c'; then $(CYGPATH_W) 'mount_mntent.c'; else $(CYGPATH_W) '$(srcdir)/mount_mntent.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-mount_mntent.Tpo $(DEPDIR)/mount_static-mount_mntent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mount_mntent.c' object='mount_static-mount_mntent.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-mount_mntent.obj `if test -f 'mount_mntent.c'; then $(CYGPATH_W) 'mount_mntent.c'; else $(CYGPATH_W) '$(srcdir)/mount_mntent.c'; fi`
+
+mount_static-getusername.o: getusername.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-getusername.o -MD -MP -MF $(DEPDIR)/mount_static-getusername.Tpo -c -o mount_static-getusername.o `test -f 'getusername.c' || echo '$(srcdir)/'`getusername.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-getusername.Tpo $(DEPDIR)/mount_static-getusername.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getusername.c' object='mount_static-getusername.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-getusername.o `test -f 'getusername.c' || echo '$(srcdir)/'`getusername.c
+
+mount_static-getusername.obj: getusername.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-getusername.obj -MD -MP -MF $(DEPDIR)/mount_static-getusername.Tpo -c -o mount_static-getusername.obj `if test -f 'getusername.c'; then $(CYGPATH_W) 'getusername.c'; else $(CYGPATH_W) '$(srcdir)/getusername.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-getusername.Tpo $(DEPDIR)/mount_static-getusername.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getusername.c' object='mount_static-getusername.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-getusername.obj `if test -f 'getusername.c'; then $(CYGPATH_W) 'getusername.c'; else $(CYGPATH_W) '$(srcdir)/getusername.c'; fi`
+
+mount_static-lomount.o: lomount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-lomount.o -MD -MP -MF $(DEPDIR)/mount_static-lomount.Tpo -c -o mount_static-lomount.o `test -f 'lomount.c' || echo '$(srcdir)/'`lomount.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-lomount.Tpo $(DEPDIR)/mount_static-lomount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lomount.c' object='mount_static-lomount.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-lomount.o `test -f 'lomount.c' || echo '$(srcdir)/'`lomount.c
+
+mount_static-lomount.obj: lomount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-lomount.obj -MD -MP -MF $(DEPDIR)/mount_static-lomount.Tpo -c -o mount_static-lomount.obj `if test -f 'lomount.c'; then $(CYGPATH_W) 'lomount.c'; else $(CYGPATH_W) '$(srcdir)/lomount.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-lomount.Tpo $(DEPDIR)/mount_static-lomount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lomount.c' object='mount_static-lomount.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-lomount.obj `if test -f 'lomount.c'; then $(CYGPATH_W) 'lomount.c'; else $(CYGPATH_W) '$(srcdir)/lomount.c'; fi`
+
+mount_static-devname.o: devname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-devname.o -MD -MP -MF $(DEPDIR)/mount_static-devname.Tpo -c -o mount_static-devname.o `test -f 'devname.c' || echo '$(srcdir)/'`devname.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-devname.Tpo $(DEPDIR)/mount_static-devname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='devname.c' object='mount_static-devname.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-devname.o `test -f 'devname.c' || echo '$(srcdir)/'`devname.c
+
+mount_static-devname.obj: devname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-devname.obj -MD -MP -MF $(DEPDIR)/mount_static-devname.Tpo -c -o mount_static-devname.obj `if test -f 'devname.c'; then $(CYGPATH_W) 'devname.c'; else $(CYGPATH_W) '$(srcdir)/devname.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-devname.Tpo $(DEPDIR)/mount_static-devname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='devname.c' object='mount_static-devname.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-devname.obj `if test -f 'devname.c'; then $(CYGPATH_W) 'devname.c'; else $(CYGPATH_W) '$(srcdir)/devname.c'; fi`
+
+mount_static-sundries.o: sundries.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-sundries.o -MD -MP -MF $(DEPDIR)/mount_static-sundries.Tpo -c -o mount_static-sundries.o `test -f 'sundries.c' || echo '$(srcdir)/'`sundries.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-sundries.Tpo $(DEPDIR)/mount_static-sundries.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sundries.c' object='mount_static-sundries.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-sundries.o `test -f 'sundries.c' || echo '$(srcdir)/'`sundries.c
+
+mount_static-sundries.obj: sundries.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-sundries.obj -MD -MP -MF $(DEPDIR)/mount_static-sundries.Tpo -c -o mount_static-sundries.obj `if test -f 'sundries.c'; then $(CYGPATH_W) 'sundries.c'; else $(CYGPATH_W) '$(srcdir)/sundries.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-sundries.Tpo $(DEPDIR)/mount_static-sundries.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sundries.c' object='mount_static-sundries.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-sundries.obj `if test -f 'sundries.c'; then $(CYGPATH_W) 'sundries.c'; else $(CYGPATH_W) '$(srcdir)/sundries.c'; fi`
+
+mount_static-xmalloc.o: xmalloc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-xmalloc.o -MD -MP -MF $(DEPDIR)/mount_static-xmalloc.Tpo -c -o mount_static-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-xmalloc.Tpo $(DEPDIR)/mount_static-xmalloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xmalloc.c' object='mount_static-xmalloc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c
+
+mount_static-xmalloc.obj: xmalloc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-xmalloc.obj -MD -MP -MF $(DEPDIR)/mount_static-xmalloc.Tpo -c -o mount_static-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-xmalloc.Tpo $(DEPDIR)/mount_static-xmalloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xmalloc.c' object='mount_static-xmalloc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi`
+
+mount_static-canonicalize.o: ../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-canonicalize.o -MD -MP -MF $(DEPDIR)/mount_static-canonicalize.Tpo -c -o mount_static-canonicalize.o `test -f '../lib/canonicalize.c' || echo '$(srcdir)/'`../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-canonicalize.Tpo $(DEPDIR)/mount_static-canonicalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/canonicalize.c' object='mount_static-canonicalize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-canonicalize.o `test -f '../lib/canonicalize.c' || echo '$(srcdir)/'`../lib/canonicalize.c
+
+mount_static-canonicalize.obj: ../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-canonicalize.obj -MD -MP -MF $(DEPDIR)/mount_static-canonicalize.Tpo -c -o mount_static-canonicalize.obj `if test -f '../lib/canonicalize.c'; then $(CYGPATH_W) '../lib/canonicalize.c'; else $(CYGPATH_W) '$(srcdir)/../lib/canonicalize.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-canonicalize.Tpo $(DEPDIR)/mount_static-canonicalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/canonicalize.c' object='mount_static-canonicalize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-canonicalize.obj `if test -f '../lib/canonicalize.c'; then $(CYGPATH_W) '../lib/canonicalize.c'; else $(CYGPATH_W) '$(srcdir)/../lib/canonicalize.c'; fi`
+
+mount_static-rmd160.o: rmd160.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-rmd160.o -MD -MP -MF $(DEPDIR)/mount_static-rmd160.Tpo -c -o mount_static-rmd160.o `test -f 'rmd160.c' || echo '$(srcdir)/'`rmd160.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-rmd160.Tpo $(DEPDIR)/mount_static-rmd160.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rmd160.c' object='mount_static-rmd160.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-rmd160.o `test -f 'rmd160.c' || echo '$(srcdir)/'`rmd160.c
+
+mount_static-rmd160.obj: rmd160.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-rmd160.obj -MD -MP -MF $(DEPDIR)/mount_static-rmd160.Tpo -c -o mount_static-rmd160.obj `if test -f 'rmd160.c'; then $(CYGPATH_W) 'rmd160.c'; else $(CYGPATH_W) '$(srcdir)/rmd160.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-rmd160.Tpo $(DEPDIR)/mount_static-rmd160.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rmd160.c' object='mount_static-rmd160.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-rmd160.obj `if test -f 'rmd160.c'; then $(CYGPATH_W) 'rmd160.c'; else $(CYGPATH_W) '$(srcdir)/rmd160.c'; fi`
+
+mount_static-env.o: ../lib/env.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-env.o -MD -MP -MF $(DEPDIR)/mount_static-env.Tpo -c -o mount_static-env.o `test -f '../lib/env.c' || echo '$(srcdir)/'`../lib/env.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-env.Tpo $(DEPDIR)/mount_static-env.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/env.c' object='mount_static-env.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-env.o `test -f '../lib/env.c' || echo '$(srcdir)/'`../lib/env.c
+
+mount_static-env.obj: ../lib/env.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-env.obj -MD -MP -MF $(DEPDIR)/mount_static-env.Tpo -c -o mount_static-env.obj `if test -f '../lib/env.c'; then $(CYGPATH_W) '../lib/env.c'; else $(CYGPATH_W) '$(srcdir)/../lib/env.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-env.Tpo $(DEPDIR)/mount_static-env.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/env.c' object='mount_static-env.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-env.obj `if test -f '../lib/env.c'; then $(CYGPATH_W) '../lib/env.c'; else $(CYGPATH_W) '$(srcdir)/../lib/env.c'; fi`
+
+mount_static-linux_version.o: ../lib/linux_version.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-linux_version.o -MD -MP -MF $(DEPDIR)/mount_static-linux_version.Tpo -c -o mount_static-linux_version.o `test -f '../lib/linux_version.c' || echo '$(srcdir)/'`../lib/linux_version.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-linux_version.Tpo $(DEPDIR)/mount_static-linux_version.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/linux_version.c' object='mount_static-linux_version.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-linux_version.o `test -f '../lib/linux_version.c' || echo '$(srcdir)/'`../lib/linux_version.c
+
+mount_static-linux_version.obj: ../lib/linux_version.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-linux_version.obj -MD -MP -MF $(DEPDIR)/mount_static-linux_version.Tpo -c -o mount_static-linux_version.obj `if test -f '../lib/linux_version.c'; then $(CYGPATH_W) '../lib/linux_version.c'; else $(CYGPATH_W) '$(srcdir)/../lib/linux_version.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-linux_version.Tpo $(DEPDIR)/mount_static-linux_version.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/linux_version.c' object='mount_static-linux_version.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-linux_version.obj `if test -f '../lib/linux_version.c'; then $(CYGPATH_W) '../lib/linux_version.c'; else $(CYGPATH_W) '$(srcdir)/../lib/linux_version.c'; fi`
+
+mount_static-blkdev.o: ../lib/blkdev.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-blkdev.o -MD -MP -MF $(DEPDIR)/mount_static-blkdev.Tpo -c -o mount_static-blkdev.o `test -f '../lib/blkdev.c' || echo '$(srcdir)/'`../lib/blkdev.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-blkdev.Tpo $(DEPDIR)/mount_static-blkdev.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/blkdev.c' object='mount_static-blkdev.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-blkdev.o `test -f '../lib/blkdev.c' || echo '$(srcdir)/'`../lib/blkdev.c
+
+mount_static-blkdev.obj: ../lib/blkdev.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-blkdev.obj -MD -MP -MF $(DEPDIR)/mount_static-blkdev.Tpo -c -o mount_static-blkdev.obj `if test -f '../lib/blkdev.c'; then $(CYGPATH_W) '../lib/blkdev.c'; else $(CYGPATH_W) '$(srcdir)/../lib/blkdev.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-blkdev.Tpo $(DEPDIR)/mount_static-blkdev.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/blkdev.c' object='mount_static-blkdev.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-blkdev.obj `if test -f '../lib/blkdev.c'; then $(CYGPATH_W) '../lib/blkdev.c'; else $(CYGPATH_W) '$(srcdir)/../lib/blkdev.c'; fi`
+
+mount_static-fsprobe.o: ../lib/fsprobe.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-fsprobe.o -MD -MP -MF $(DEPDIR)/mount_static-fsprobe.Tpo -c -o mount_static-fsprobe.o `test -f '../lib/fsprobe.c' || echo '$(srcdir)/'`../lib/fsprobe.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-fsprobe.Tpo $(DEPDIR)/mount_static-fsprobe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/fsprobe.c' object='mount_static-fsprobe.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-fsprobe.o `test -f '../lib/fsprobe.c' || echo '$(srcdir)/'`../lib/fsprobe.c
+
+mount_static-fsprobe.obj: ../lib/fsprobe.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-fsprobe.obj -MD -MP -MF $(DEPDIR)/mount_static-fsprobe.Tpo -c -o mount_static-fsprobe.obj `if test -f '../lib/fsprobe.c'; then $(CYGPATH_W) '../lib/fsprobe.c'; else $(CYGPATH_W) '$(srcdir)/../lib/fsprobe.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-fsprobe.Tpo $(DEPDIR)/mount_static-fsprobe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/fsprobe.c' object='mount_static-fsprobe.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-fsprobe.obj `if test -f '../lib/fsprobe.c'; then $(CYGPATH_W) '../lib/fsprobe.c'; else $(CYGPATH_W) '$(srcdir)/../lib/fsprobe.c'; fi`
+
+mount_static-setproctitle.o: ../lib/setproctitle.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-setproctitle.o -MD -MP -MF $(DEPDIR)/mount_static-setproctitle.Tpo -c -o mount_static-setproctitle.o `test -f '../lib/setproctitle.c' || echo '$(srcdir)/'`../lib/setproctitle.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-setproctitle.Tpo $(DEPDIR)/mount_static-setproctitle.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/setproctitle.c' object='mount_static-setproctitle.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-setproctitle.o `test -f '../lib/setproctitle.c' || echo '$(srcdir)/'`../lib/setproctitle.c
+
+mount_static-setproctitle.obj: ../lib/setproctitle.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -MT mount_static-setproctitle.obj -MD -MP -MF $(DEPDIR)/mount_static-setproctitle.Tpo -c -o mount_static-setproctitle.obj `if test -f '../lib/setproctitle.c'; then $(CYGPATH_W) '../lib/setproctitle.c'; else $(CYGPATH_W) '$(srcdir)/../lib/setproctitle.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mount_static-setproctitle.Tpo $(DEPDIR)/mount_static-setproctitle.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/setproctitle.c' object='mount_static-setproctitle.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(mount_static_CFLAGS) $(CFLAGS) -c -o mount_static-setproctitle.obj `if test -f '../lib/setproctitle.c'; then $(CYGPATH_W) '../lib/setproctitle.c'; else $(CYGPATH_W) '$(srcdir)/../lib/setproctitle.c'; fi`
+
+mtab_lock_test-fstab.o: fstab.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtab_lock_test-fstab.o -MD -MP -MF $(DEPDIR)/mtab_lock_test-fstab.Tpo -c -o mtab_lock_test-fstab.o `test -f 'fstab.c' || echo '$(srcdir)/'`fstab.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtab_lock_test-fstab.Tpo $(DEPDIR)/mtab_lock_test-fstab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fstab.c' object='mtab_lock_test-fstab.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtab_lock_test-fstab.o `test -f 'fstab.c' || echo '$(srcdir)/'`fstab.c
+
+mtab_lock_test-fstab.obj: fstab.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtab_lock_test-fstab.obj -MD -MP -MF $(DEPDIR)/mtab_lock_test-fstab.Tpo -c -o mtab_lock_test-fstab.obj `if test -f 'fstab.c'; then $(CYGPATH_W) 'fstab.c'; else $(CYGPATH_W) '$(srcdir)/fstab.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtab_lock_test-fstab.Tpo $(DEPDIR)/mtab_lock_test-fstab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fstab.c' object='mtab_lock_test-fstab.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtab_lock_test-fstab.obj `if test -f 'fstab.c'; then $(CYGPATH_W) 'fstab.c'; else $(CYGPATH_W) '$(srcdir)/fstab.c'; fi`
+
+mtab_lock_test-sundries.o: sundries.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtab_lock_test-sundries.o -MD -MP -MF $(DEPDIR)/mtab_lock_test-sundries.Tpo -c -o mtab_lock_test-sundries.o `test -f 'sundries.c' || echo '$(srcdir)/'`sundries.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtab_lock_test-sundries.Tpo $(DEPDIR)/mtab_lock_test-sundries.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sundries.c' object='mtab_lock_test-sundries.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtab_lock_test-sundries.o `test -f 'sundries.c' || echo '$(srcdir)/'`sundries.c
+
+mtab_lock_test-sundries.obj: sundries.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtab_lock_test-sundries.obj -MD -MP -MF $(DEPDIR)/mtab_lock_test-sundries.Tpo -c -o mtab_lock_test-sundries.obj `if test -f 'sundries.c'; then $(CYGPATH_W) 'sundries.c'; else $(CYGPATH_W) '$(srcdir)/sundries.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtab_lock_test-sundries.Tpo $(DEPDIR)/mtab_lock_test-sundries.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sundries.c' object='mtab_lock_test-sundries.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtab_lock_test-sundries.obj `if test -f 'sundries.c'; then $(CYGPATH_W) 'sundries.c'; else $(CYGPATH_W) '$(srcdir)/sundries.c'; fi`
+
+mtab_lock_test-xmalloc.o: xmalloc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtab_lock_test-xmalloc.o -MD -MP -MF $(DEPDIR)/mtab_lock_test-xmalloc.Tpo -c -o mtab_lock_test-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtab_lock_test-xmalloc.Tpo $(DEPDIR)/mtab_lock_test-xmalloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xmalloc.c' object='mtab_lock_test-xmalloc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtab_lock_test-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c
+
+mtab_lock_test-xmalloc.obj: xmalloc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtab_lock_test-xmalloc.obj -MD -MP -MF $(DEPDIR)/mtab_lock_test-xmalloc.Tpo -c -o mtab_lock_test-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtab_lock_test-xmalloc.Tpo $(DEPDIR)/mtab_lock_test-xmalloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xmalloc.c' object='mtab_lock_test-xmalloc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtab_lock_test-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi`
+
+mtab_lock_test-canonicalize.o: ../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtab_lock_test-canonicalize.o -MD -MP -MF $(DEPDIR)/mtab_lock_test-canonicalize.Tpo -c -o mtab_lock_test-canonicalize.o `test -f '../lib/canonicalize.c' || echo '$(srcdir)/'`../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtab_lock_test-canonicalize.Tpo $(DEPDIR)/mtab_lock_test-canonicalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/canonicalize.c' object='mtab_lock_test-canonicalize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtab_lock_test-canonicalize.o `test -f '../lib/canonicalize.c' || echo '$(srcdir)/'`../lib/canonicalize.c
+
+mtab_lock_test-canonicalize.obj: ../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtab_lock_test-canonicalize.obj -MD -MP -MF $(DEPDIR)/mtab_lock_test-canonicalize.Tpo -c -o mtab_lock_test-canonicalize.obj `if test -f '../lib/canonicalize.c'; then $(CYGPATH_W) '../lib/canonicalize.c'; else $(CYGPATH_W) '$(srcdir)/../lib/canonicalize.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtab_lock_test-canonicalize.Tpo $(DEPDIR)/mtab_lock_test-canonicalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/canonicalize.c' object='mtab_lock_test-canonicalize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtab_lock_test-canonicalize.obj `if test -f '../lib/canonicalize.c'; then $(CYGPATH_W) '../lib/canonicalize.c'; else $(CYGPATH_W) '$(srcdir)/../lib/canonicalize.c'; fi`
+
+mtab_lock_test-rmd160.o: rmd160.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtab_lock_test-rmd160.o -MD -MP -MF $(DEPDIR)/mtab_lock_test-rmd160.Tpo -c -o mtab_lock_test-rmd160.o `test -f 'rmd160.c' || echo '$(srcdir)/'`rmd160.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtab_lock_test-rmd160.Tpo $(DEPDIR)/mtab_lock_test-rmd160.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rmd160.c' object='mtab_lock_test-rmd160.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtab_lock_test-rmd160.o `test -f 'rmd160.c' || echo '$(srcdir)/'`rmd160.c
+
+mtab_lock_test-rmd160.obj: rmd160.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mtab_lock_test-rmd160.obj -MD -MP -MF $(DEPDIR)/mtab_lock_test-rmd160.Tpo -c -o mtab_lock_test-rmd160.obj `if test -f 'rmd160.c'; then $(CYGPATH_W) 'rmd160.c'; else $(CYGPATH_W) '$(srcdir)/rmd160.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/mtab_lock_test-rmd160.Tpo $(DEPDIR)/mtab_lock_test-rmd160.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rmd160.c' object='mtab_lock_test-rmd160.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(mtab_lock_test_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mtab_lock_test-rmd160.obj `if test -f 'rmd160.c'; then $(CYGPATH_W) 'rmd160.c'; else $(CYGPATH_W) '$(srcdir)/rmd160.c'; fi`
+
+swapon-swapon.o: swapon.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -MT swapon-swapon.o -MD -MP -MF $(DEPDIR)/swapon-swapon.Tpo -c -o swapon-swapon.o `test -f 'swapon.c' || echo '$(srcdir)/'`swapon.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/swapon-swapon.Tpo $(DEPDIR)/swapon-swapon.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='swapon.c' object='swapon-swapon.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -c -o swapon-swapon.o `test -f 'swapon.c' || echo '$(srcdir)/'`swapon.c
+
+swapon-swapon.obj: swapon.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -MT swapon-swapon.obj -MD -MP -MF $(DEPDIR)/swapon-swapon.Tpo -c -o swapon-swapon.obj `if test -f 'swapon.c'; then $(CYGPATH_W) 'swapon.c'; else $(CYGPATH_W) '$(srcdir)/swapon.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/swapon-swapon.Tpo $(DEPDIR)/swapon-swapon.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='swapon.c' object='swapon-swapon.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -c -o swapon-swapon.obj `if test -f 'swapon.c'; then $(CYGPATH_W) 'swapon.c'; else $(CYGPATH_W) '$(srcdir)/swapon.c'; fi`
+
+swapon-linux_version.o: ../lib/linux_version.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -MT swapon-linux_version.o -MD -MP -MF $(DEPDIR)/swapon-linux_version.Tpo -c -o swapon-linux_version.o `test -f '../lib/linux_version.c' || echo '$(srcdir)/'`../lib/linux_version.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/swapon-linux_version.Tpo $(DEPDIR)/swapon-linux_version.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/linux_version.c' object='swapon-linux_version.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -c -o swapon-linux_version.o `test -f '../lib/linux_version.c' || echo '$(srcdir)/'`../lib/linux_version.c
+
+swapon-linux_version.obj: ../lib/linux_version.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -MT swapon-linux_version.obj -MD -MP -MF $(DEPDIR)/swapon-linux_version.Tpo -c -o swapon-linux_version.obj `if test -f '../lib/linux_version.c'; then $(CYGPATH_W) '../lib/linux_version.c'; else $(CYGPATH_W) '$(srcdir)/../lib/linux_version.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/swapon-linux_version.Tpo $(DEPDIR)/swapon-linux_version.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/linux_version.c' object='swapon-linux_version.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -c -o swapon-linux_version.obj `if test -f '../lib/linux_version.c'; then $(CYGPATH_W) '../lib/linux_version.c'; else $(CYGPATH_W) '$(srcdir)/../lib/linux_version.c'; fi`
+
+swapon-blkdev.o: ../lib/blkdev.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -MT swapon-blkdev.o -MD -MP -MF $(DEPDIR)/swapon-blkdev.Tpo -c -o swapon-blkdev.o `test -f '../lib/blkdev.c' || echo '$(srcdir)/'`../lib/blkdev.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/swapon-blkdev.Tpo $(DEPDIR)/swapon-blkdev.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/blkdev.c' object='swapon-blkdev.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -c -o swapon-blkdev.o `test -f '../lib/blkdev.c' || echo '$(srcdir)/'`../lib/blkdev.c
+
+swapon-blkdev.obj: ../lib/blkdev.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -MT swapon-blkdev.obj -MD -MP -MF $(DEPDIR)/swapon-blkdev.Tpo -c -o swapon-blkdev.obj `if test -f '../lib/blkdev.c'; then $(CYGPATH_W) '../lib/blkdev.c'; else $(CYGPATH_W) '$(srcdir)/../lib/blkdev.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/swapon-blkdev.Tpo $(DEPDIR)/swapon-blkdev.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/blkdev.c' object='swapon-blkdev.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -c -o swapon-blkdev.obj `if test -f '../lib/blkdev.c'; then $(CYGPATH_W) '../lib/blkdev.c'; else $(CYGPATH_W) '$(srcdir)/../lib/blkdev.c'; fi`
+
+swapon-fsprobe.o: ../lib/fsprobe.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -MT swapon-fsprobe.o -MD -MP -MF $(DEPDIR)/swapon-fsprobe.Tpo -c -o swapon-fsprobe.o `test -f '../lib/fsprobe.c' || echo '$(srcdir)/'`../lib/fsprobe.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/swapon-fsprobe.Tpo $(DEPDIR)/swapon-fsprobe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/fsprobe.c' object='swapon-fsprobe.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -c -o swapon-fsprobe.o `test -f '../lib/fsprobe.c' || echo '$(srcdir)/'`../lib/fsprobe.c
+
+swapon-fsprobe.obj: ../lib/fsprobe.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -MT swapon-fsprobe.obj -MD -MP -MF $(DEPDIR)/swapon-fsprobe.Tpo -c -o swapon-fsprobe.obj `if test -f '../lib/fsprobe.c'; then $(CYGPATH_W) '../lib/fsprobe.c'; else $(CYGPATH_W) '$(srcdir)/../lib/fsprobe.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/swapon-fsprobe.Tpo $(DEPDIR)/swapon-fsprobe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/fsprobe.c' object='swapon-fsprobe.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -c -o swapon-fsprobe.obj `if test -f '../lib/fsprobe.c'; then $(CYGPATH_W) '../lib/fsprobe.c'; else $(CYGPATH_W) '$(srcdir)/../lib/fsprobe.c'; fi`
+
+swapon-canonicalize.o: ../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -MT swapon-canonicalize.o -MD -MP -MF $(DEPDIR)/swapon-canonicalize.Tpo -c -o swapon-canonicalize.o `test -f '../lib/canonicalize.c' || echo '$(srcdir)/'`../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/swapon-canonicalize.Tpo $(DEPDIR)/swapon-canonicalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/canonicalize.c' object='swapon-canonicalize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -c -o swapon-canonicalize.o `test -f '../lib/canonicalize.c' || echo '$(srcdir)/'`../lib/canonicalize.c
+
+swapon-canonicalize.obj: ../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -MT swapon-canonicalize.obj -MD -MP -MF $(DEPDIR)/swapon-canonicalize.Tpo -c -o swapon-canonicalize.obj `if test -f '../lib/canonicalize.c'; then $(CYGPATH_W) '../lib/canonicalize.c'; else $(CYGPATH_W) '$(srcdir)/../lib/canonicalize.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/swapon-canonicalize.Tpo $(DEPDIR)/swapon-canonicalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/canonicalize.c' object='swapon-canonicalize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(swapon_CFLAGS) $(CFLAGS) -c -o swapon-canonicalize.obj `if test -f '../lib/canonicalize.c'; then $(CYGPATH_W) '../lib/canonicalize.c'; else $(CYGPATH_W) '$(srcdir)/../lib/canonicalize.c'; fi`
+
+umount-umount.o: umount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-umount.o -MD -MP -MF $(DEPDIR)/umount-umount.Tpo -c -o umount-umount.o `test -f 'umount.c' || echo '$(srcdir)/'`umount.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-umount.Tpo $(DEPDIR)/umount-umount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='umount.c' object='umount-umount.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-umount.o `test -f 'umount.c' || echo '$(srcdir)/'`umount.c
+
+umount-umount.obj: umount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-umount.obj -MD -MP -MF $(DEPDIR)/umount-umount.Tpo -c -o umount-umount.obj `if test -f 'umount.c'; then $(CYGPATH_W) 'umount.c'; else $(CYGPATH_W) '$(srcdir)/umount.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-umount.Tpo $(DEPDIR)/umount-umount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='umount.c' object='umount-umount.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-umount.obj `if test -f 'umount.c'; then $(CYGPATH_W) 'umount.c'; else $(CYGPATH_W) '$(srcdir)/umount.c'; fi`
+
+umount-fstab.o: fstab.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-fstab.o -MD -MP -MF $(DEPDIR)/umount-fstab.Tpo -c -o umount-fstab.o `test -f 'fstab.c' || echo '$(srcdir)/'`fstab.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-fstab.Tpo $(DEPDIR)/umount-fstab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fstab.c' object='umount-fstab.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-fstab.o `test -f 'fstab.c' || echo '$(srcdir)/'`fstab.c
+
+umount-fstab.obj: fstab.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-fstab.obj -MD -MP -MF $(DEPDIR)/umount-fstab.Tpo -c -o umount-fstab.obj `if test -f 'fstab.c'; then $(CYGPATH_W) 'fstab.c'; else $(CYGPATH_W) '$(srcdir)/fstab.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-fstab.Tpo $(DEPDIR)/umount-fstab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fstab.c' object='umount-fstab.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-fstab.obj `if test -f 'fstab.c'; then $(CYGPATH_W) 'fstab.c'; else $(CYGPATH_W) '$(srcdir)/fstab.c'; fi`
+
+umount-mount_mntent.o: mount_mntent.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-mount_mntent.o -MD -MP -MF $(DEPDIR)/umount-mount_mntent.Tpo -c -o umount-mount_mntent.o `test -f 'mount_mntent.c' || echo '$(srcdir)/'`mount_mntent.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-mount_mntent.Tpo $(DEPDIR)/umount-mount_mntent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mount_mntent.c' object='umount-mount_mntent.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-mount_mntent.o `test -f 'mount_mntent.c' || echo '$(srcdir)/'`mount_mntent.c
+
+umount-mount_mntent.obj: mount_mntent.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-mount_mntent.obj -MD -MP -MF $(DEPDIR)/umount-mount_mntent.Tpo -c -o umount-mount_mntent.obj `if test -f 'mount_mntent.c'; then $(CYGPATH_W) 'mount_mntent.c'; else $(CYGPATH_W) '$(srcdir)/mount_mntent.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-mount_mntent.Tpo $(DEPDIR)/umount-mount_mntent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mount_mntent.c' object='umount-mount_mntent.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-mount_mntent.obj `if test -f 'mount_mntent.c'; then $(CYGPATH_W) 'mount_mntent.c'; else $(CYGPATH_W) '$(srcdir)/mount_mntent.c'; fi`
+
+umount-getusername.o: getusername.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-getusername.o -MD -MP -MF $(DEPDIR)/umount-getusername.Tpo -c -o umount-getusername.o `test -f 'getusername.c' || echo '$(srcdir)/'`getusername.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-getusername.Tpo $(DEPDIR)/umount-getusername.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getusername.c' object='umount-getusername.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-getusername.o `test -f 'getusername.c' || echo '$(srcdir)/'`getusername.c
+
+umount-getusername.obj: getusername.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-getusername.obj -MD -MP -MF $(DEPDIR)/umount-getusername.Tpo -c -o umount-getusername.obj `if test -f 'getusername.c'; then $(CYGPATH_W) 'getusername.c'; else $(CYGPATH_W) '$(srcdir)/getusername.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-getusername.Tpo $(DEPDIR)/umount-getusername.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getusername.c' object='umount-getusername.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-getusername.obj `if test -f 'getusername.c'; then $(CYGPATH_W) 'getusername.c'; else $(CYGPATH_W) '$(srcdir)/getusername.c'; fi`
+
+umount-lomount.o: lomount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-lomount.o -MD -MP -MF $(DEPDIR)/umount-lomount.Tpo -c -o umount-lomount.o `test -f 'lomount.c' || echo '$(srcdir)/'`lomount.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-lomount.Tpo $(DEPDIR)/umount-lomount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lomount.c' object='umount-lomount.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-lomount.o `test -f 'lomount.c' || echo '$(srcdir)/'`lomount.c
+
+umount-lomount.obj: lomount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-lomount.obj -MD -MP -MF $(DEPDIR)/umount-lomount.Tpo -c -o umount-lomount.obj `if test -f 'lomount.c'; then $(CYGPATH_W) 'lomount.c'; else $(CYGPATH_W) '$(srcdir)/lomount.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-lomount.Tpo $(DEPDIR)/umount-lomount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lomount.c' object='umount-lomount.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-lomount.obj `if test -f 'lomount.c'; then $(CYGPATH_W) 'lomount.c'; else $(CYGPATH_W) '$(srcdir)/lomount.c'; fi`
+
+umount-devname.o: devname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-devname.o -MD -MP -MF $(DEPDIR)/umount-devname.Tpo -c -o umount-devname.o `test -f 'devname.c' || echo '$(srcdir)/'`devname.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-devname.Tpo $(DEPDIR)/umount-devname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='devname.c' object='umount-devname.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-devname.o `test -f 'devname.c' || echo '$(srcdir)/'`devname.c
+
+umount-devname.obj: devname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-devname.obj -MD -MP -MF $(DEPDIR)/umount-devname.Tpo -c -o umount-devname.obj `if test -f 'devname.c'; then $(CYGPATH_W) 'devname.c'; else $(CYGPATH_W) '$(srcdir)/devname.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-devname.Tpo $(DEPDIR)/umount-devname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='devname.c' object='umount-devname.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-devname.obj `if test -f 'devname.c'; then $(CYGPATH_W) 'devname.c'; else $(CYGPATH_W) '$(srcdir)/devname.c'; fi`
+
+umount-sundries.o: sundries.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-sundries.o -MD -MP -MF $(DEPDIR)/umount-sundries.Tpo -c -o umount-sundries.o `test -f 'sundries.c' || echo '$(srcdir)/'`sundries.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-sundries.Tpo $(DEPDIR)/umount-sundries.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sundries.c' object='umount-sundries.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-sundries.o `test -f 'sundries.c' || echo '$(srcdir)/'`sundries.c
+
+umount-sundries.obj: sundries.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-sundries.obj -MD -MP -MF $(DEPDIR)/umount-sundries.Tpo -c -o umount-sundries.obj `if test -f 'sundries.c'; then $(CYGPATH_W) 'sundries.c'; else $(CYGPATH_W) '$(srcdir)/sundries.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-sundries.Tpo $(DEPDIR)/umount-sundries.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sundries.c' object='umount-sundries.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-sundries.obj `if test -f 'sundries.c'; then $(CYGPATH_W) 'sundries.c'; else $(CYGPATH_W) '$(srcdir)/sundries.c'; fi`
+
+umount-xmalloc.o: xmalloc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-xmalloc.o -MD -MP -MF $(DEPDIR)/umount-xmalloc.Tpo -c -o umount-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-xmalloc.Tpo $(DEPDIR)/umount-xmalloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xmalloc.c' object='umount-xmalloc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c
+
+umount-xmalloc.obj: xmalloc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-xmalloc.obj -MD -MP -MF $(DEPDIR)/umount-xmalloc.Tpo -c -o umount-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-xmalloc.Tpo $(DEPDIR)/umount-xmalloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xmalloc.c' object='umount-xmalloc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi`
+
+umount-canonicalize.o: ../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-canonicalize.o -MD -MP -MF $(DEPDIR)/umount-canonicalize.Tpo -c -o umount-canonicalize.o `test -f '../lib/canonicalize.c' || echo '$(srcdir)/'`../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-canonicalize.Tpo $(DEPDIR)/umount-canonicalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/canonicalize.c' object='umount-canonicalize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-canonicalize.o `test -f '../lib/canonicalize.c' || echo '$(srcdir)/'`../lib/canonicalize.c
+
+umount-canonicalize.obj: ../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-canonicalize.obj -MD -MP -MF $(DEPDIR)/umount-canonicalize.Tpo -c -o umount-canonicalize.obj `if test -f '../lib/canonicalize.c'; then $(CYGPATH_W) '../lib/canonicalize.c'; else $(CYGPATH_W) '$(srcdir)/../lib/canonicalize.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-canonicalize.Tpo $(DEPDIR)/umount-canonicalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/canonicalize.c' object='umount-canonicalize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-canonicalize.obj `if test -f '../lib/canonicalize.c'; then $(CYGPATH_W) '../lib/canonicalize.c'; else $(CYGPATH_W) '$(srcdir)/../lib/canonicalize.c'; fi`
+
+umount-rmd160.o: rmd160.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-rmd160.o -MD -MP -MF $(DEPDIR)/umount-rmd160.Tpo -c -o umount-rmd160.o `test -f 'rmd160.c' || echo '$(srcdir)/'`rmd160.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-rmd160.Tpo $(DEPDIR)/umount-rmd160.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rmd160.c' object='umount-rmd160.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-rmd160.o `test -f 'rmd160.c' || echo '$(srcdir)/'`rmd160.c
+
+umount-rmd160.obj: rmd160.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-rmd160.obj -MD -MP -MF $(DEPDIR)/umount-rmd160.Tpo -c -o umount-rmd160.obj `if test -f 'rmd160.c'; then $(CYGPATH_W) 'rmd160.c'; else $(CYGPATH_W) '$(srcdir)/rmd160.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-rmd160.Tpo $(DEPDIR)/umount-rmd160.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rmd160.c' object='umount-rmd160.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-rmd160.obj `if test -f 'rmd160.c'; then $(CYGPATH_W) 'rmd160.c'; else $(CYGPATH_W) '$(srcdir)/rmd160.c'; fi`
+
+umount-env.o: ../lib/env.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-env.o -MD -MP -MF $(DEPDIR)/umount-env.Tpo -c -o umount-env.o `test -f '../lib/env.c' || echo '$(srcdir)/'`../lib/env.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-env.Tpo $(DEPDIR)/umount-env.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/env.c' object='umount-env.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-env.o `test -f '../lib/env.c' || echo '$(srcdir)/'`../lib/env.c
+
+umount-env.obj: ../lib/env.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-env.obj -MD -MP -MF $(DEPDIR)/umount-env.Tpo -c -o umount-env.obj `if test -f '../lib/env.c'; then $(CYGPATH_W) '../lib/env.c'; else $(CYGPATH_W) '$(srcdir)/../lib/env.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-env.Tpo $(DEPDIR)/umount-env.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/env.c' object='umount-env.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-env.obj `if test -f '../lib/env.c'; then $(CYGPATH_W) '../lib/env.c'; else $(CYGPATH_W) '$(srcdir)/../lib/env.c'; fi`
+
+umount-linux_version.o: ../lib/linux_version.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-linux_version.o -MD -MP -MF $(DEPDIR)/umount-linux_version.Tpo -c -o umount-linux_version.o `test -f '../lib/linux_version.c' || echo '$(srcdir)/'`../lib/linux_version.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-linux_version.Tpo $(DEPDIR)/umount-linux_version.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/linux_version.c' object='umount-linux_version.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-linux_version.o `test -f '../lib/linux_version.c' || echo '$(srcdir)/'`../lib/linux_version.c
+
+umount-linux_version.obj: ../lib/linux_version.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-linux_version.obj -MD -MP -MF $(DEPDIR)/umount-linux_version.Tpo -c -o umount-linux_version.obj `if test -f '../lib/linux_version.c'; then $(CYGPATH_W) '../lib/linux_version.c'; else $(CYGPATH_W) '$(srcdir)/../lib/linux_version.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-linux_version.Tpo $(DEPDIR)/umount-linux_version.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/linux_version.c' object='umount-linux_version.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-linux_version.obj `if test -f '../lib/linux_version.c'; then $(CYGPATH_W) '../lib/linux_version.c'; else $(CYGPATH_W) '$(srcdir)/../lib/linux_version.c'; fi`
+
+umount-blkdev.o: ../lib/blkdev.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-blkdev.o -MD -MP -MF $(DEPDIR)/umount-blkdev.Tpo -c -o umount-blkdev.o `test -f '../lib/blkdev.c' || echo '$(srcdir)/'`../lib/blkdev.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-blkdev.Tpo $(DEPDIR)/umount-blkdev.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/blkdev.c' object='umount-blkdev.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-blkdev.o `test -f '../lib/blkdev.c' || echo '$(srcdir)/'`../lib/blkdev.c
+
+umount-blkdev.obj: ../lib/blkdev.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-blkdev.obj -MD -MP -MF $(DEPDIR)/umount-blkdev.Tpo -c -o umount-blkdev.obj `if test -f '../lib/blkdev.c'; then $(CYGPATH_W) '../lib/blkdev.c'; else $(CYGPATH_W) '$(srcdir)/../lib/blkdev.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-blkdev.Tpo $(DEPDIR)/umount-blkdev.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/blkdev.c' object='umount-blkdev.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-blkdev.obj `if test -f '../lib/blkdev.c'; then $(CYGPATH_W) '../lib/blkdev.c'; else $(CYGPATH_W) '$(srcdir)/../lib/blkdev.c'; fi`
+
+umount-fsprobe.o: ../lib/fsprobe.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-fsprobe.o -MD -MP -MF $(DEPDIR)/umount-fsprobe.Tpo -c -o umount-fsprobe.o `test -f '../lib/fsprobe.c' || echo '$(srcdir)/'`../lib/fsprobe.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-fsprobe.Tpo $(DEPDIR)/umount-fsprobe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/fsprobe.c' object='umount-fsprobe.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-fsprobe.o `test -f '../lib/fsprobe.c' || echo '$(srcdir)/'`../lib/fsprobe.c
+
+umount-fsprobe.obj: ../lib/fsprobe.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -MT umount-fsprobe.obj -MD -MP -MF $(DEPDIR)/umount-fsprobe.Tpo -c -o umount-fsprobe.obj `if test -f '../lib/fsprobe.c'; then $(CYGPATH_W) '../lib/fsprobe.c'; else $(CYGPATH_W) '$(srcdir)/../lib/fsprobe.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount-fsprobe.Tpo $(DEPDIR)/umount-fsprobe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/fsprobe.c' object='umount-fsprobe.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_CFLAGS) $(CFLAGS) -c -o umount-fsprobe.obj `if test -f '../lib/fsprobe.c'; then $(CYGPATH_W) '../lib/fsprobe.c'; else $(CYGPATH_W) '$(srcdir)/../lib/fsprobe.c'; fi`
+
+umount_static-umount.o: umount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-umount.o -MD -MP -MF $(DEPDIR)/umount_static-umount.Tpo -c -o umount_static-umount.o `test -f 'umount.c' || echo '$(srcdir)/'`umount.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-umount.Tpo $(DEPDIR)/umount_static-umount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='umount.c' object='umount_static-umount.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-umount.o `test -f 'umount.c' || echo '$(srcdir)/'`umount.c
+
+umount_static-umount.obj: umount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-umount.obj -MD -MP -MF $(DEPDIR)/umount_static-umount.Tpo -c -o umount_static-umount.obj `if test -f 'umount.c'; then $(CYGPATH_W) 'umount.c'; else $(CYGPATH_W) '$(srcdir)/umount.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-umount.Tpo $(DEPDIR)/umount_static-umount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='umount.c' object='umount_static-umount.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-umount.obj `if test -f 'umount.c'; then $(CYGPATH_W) 'umount.c'; else $(CYGPATH_W) '$(srcdir)/umount.c'; fi`
+
+umount_static-fstab.o: fstab.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-fstab.o -MD -MP -MF $(DEPDIR)/umount_static-fstab.Tpo -c -o umount_static-fstab.o `test -f 'fstab.c' || echo '$(srcdir)/'`fstab.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-fstab.Tpo $(DEPDIR)/umount_static-fstab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fstab.c' object='umount_static-fstab.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-fstab.o `test -f 'fstab.c' || echo '$(srcdir)/'`fstab.c
+
+umount_static-fstab.obj: fstab.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-fstab.obj -MD -MP -MF $(DEPDIR)/umount_static-fstab.Tpo -c -o umount_static-fstab.obj `if test -f 'fstab.c'; then $(CYGPATH_W) 'fstab.c'; else $(CYGPATH_W) '$(srcdir)/fstab.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-fstab.Tpo $(DEPDIR)/umount_static-fstab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fstab.c' object='umount_static-fstab.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-fstab.obj `if test -f 'fstab.c'; then $(CYGPATH_W) 'fstab.c'; else $(CYGPATH_W) '$(srcdir)/fstab.c'; fi`
+
+umount_static-mount_mntent.o: mount_mntent.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-mount_mntent.o -MD -MP -MF $(DEPDIR)/umount_static-mount_mntent.Tpo -c -o umount_static-mount_mntent.o `test -f 'mount_mntent.c' || echo '$(srcdir)/'`mount_mntent.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-mount_mntent.Tpo $(DEPDIR)/umount_static-mount_mntent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mount_mntent.c' object='umount_static-mount_mntent.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-mount_mntent.o `test -f 'mount_mntent.c' || echo '$(srcdir)/'`mount_mntent.c
+
+umount_static-mount_mntent.obj: mount_mntent.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-mount_mntent.obj -MD -MP -MF $(DEPDIR)/umount_static-mount_mntent.Tpo -c -o umount_static-mount_mntent.obj `if test -f 'mount_mntent.c'; then $(CYGPATH_W) 'mount_mntent.c'; else $(CYGPATH_W) '$(srcdir)/mount_mntent.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-mount_mntent.Tpo $(DEPDIR)/umount_static-mount_mntent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='mount_mntent.c' object='umount_static-mount_mntent.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-mount_mntent.obj `if test -f 'mount_mntent.c'; then $(CYGPATH_W) 'mount_mntent.c'; else $(CYGPATH_W) '$(srcdir)/mount_mntent.c'; fi`
+
+umount_static-getusername.o: getusername.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-getusername.o -MD -MP -MF $(DEPDIR)/umount_static-getusername.Tpo -c -o umount_static-getusername.o `test -f 'getusername.c' || echo '$(srcdir)/'`getusername.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-getusername.Tpo $(DEPDIR)/umount_static-getusername.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getusername.c' object='umount_static-getusername.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-getusername.o `test -f 'getusername.c' || echo '$(srcdir)/'`getusername.c
+
+umount_static-getusername.obj: getusername.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-getusername.obj -MD -MP -MF $(DEPDIR)/umount_static-getusername.Tpo -c -o umount_static-getusername.obj `if test -f 'getusername.c'; then $(CYGPATH_W) 'getusername.c'; else $(CYGPATH_W) '$(srcdir)/getusername.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-getusername.Tpo $(DEPDIR)/umount_static-getusername.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='getusername.c' object='umount_static-getusername.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-getusername.obj `if test -f 'getusername.c'; then $(CYGPATH_W) 'getusername.c'; else $(CYGPATH_W) '$(srcdir)/getusername.c'; fi`
+
+umount_static-lomount.o: lomount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-lomount.o -MD -MP -MF $(DEPDIR)/umount_static-lomount.Tpo -c -o umount_static-lomount.o `test -f 'lomount.c' || echo '$(srcdir)/'`lomount.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-lomount.Tpo $(DEPDIR)/umount_static-lomount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lomount.c' object='umount_static-lomount.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-lomount.o `test -f 'lomount.c' || echo '$(srcdir)/'`lomount.c
+
+umount_static-lomount.obj: lomount.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-lomount.obj -MD -MP -MF $(DEPDIR)/umount_static-lomount.Tpo -c -o umount_static-lomount.obj `if test -f 'lomount.c'; then $(CYGPATH_W) 'lomount.c'; else $(CYGPATH_W) '$(srcdir)/lomount.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-lomount.Tpo $(DEPDIR)/umount_static-lomount.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lomount.c' object='umount_static-lomount.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-lomount.obj `if test -f 'lomount.c'; then $(CYGPATH_W) 'lomount.c'; else $(CYGPATH_W) '$(srcdir)/lomount.c'; fi`
+
+umount_static-devname.o: devname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-devname.o -MD -MP -MF $(DEPDIR)/umount_static-devname.Tpo -c -o umount_static-devname.o `test -f 'devname.c' || echo '$(srcdir)/'`devname.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-devname.Tpo $(DEPDIR)/umount_static-devname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='devname.c' object='umount_static-devname.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-devname.o `test -f 'devname.c' || echo '$(srcdir)/'`devname.c
+
+umount_static-devname.obj: devname.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-devname.obj -MD -MP -MF $(DEPDIR)/umount_static-devname.Tpo -c -o umount_static-devname.obj `if test -f 'devname.c'; then $(CYGPATH_W) 'devname.c'; else $(CYGPATH_W) '$(srcdir)/devname.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-devname.Tpo $(DEPDIR)/umount_static-devname.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='devname.c' object='umount_static-devname.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-devname.obj `if test -f 'devname.c'; then $(CYGPATH_W) 'devname.c'; else $(CYGPATH_W) '$(srcdir)/devname.c'; fi`
+
+umount_static-sundries.o: sundries.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-sundries.o -MD -MP -MF $(DEPDIR)/umount_static-sundries.Tpo -c -o umount_static-sundries.o `test -f 'sundries.c' || echo '$(srcdir)/'`sundries.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-sundries.Tpo $(DEPDIR)/umount_static-sundries.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sundries.c' object='umount_static-sundries.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-sundries.o `test -f 'sundries.c' || echo '$(srcdir)/'`sundries.c
+
+umount_static-sundries.obj: sundries.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-sundries.obj -MD -MP -MF $(DEPDIR)/umount_static-sundries.Tpo -c -o umount_static-sundries.obj `if test -f 'sundries.c'; then $(CYGPATH_W) 'sundries.c'; else $(CYGPATH_W) '$(srcdir)/sundries.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-sundries.Tpo $(DEPDIR)/umount_static-sundries.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sundries.c' object='umount_static-sundries.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-sundries.obj `if test -f 'sundries.c'; then $(CYGPATH_W) 'sundries.c'; else $(CYGPATH_W) '$(srcdir)/sundries.c'; fi`
+
+umount_static-xmalloc.o: xmalloc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-xmalloc.o -MD -MP -MF $(DEPDIR)/umount_static-xmalloc.Tpo -c -o umount_static-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-xmalloc.Tpo $(DEPDIR)/umount_static-xmalloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xmalloc.c' object='umount_static-xmalloc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-xmalloc.o `test -f 'xmalloc.c' || echo '$(srcdir)/'`xmalloc.c
+
+umount_static-xmalloc.obj: xmalloc.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-xmalloc.obj -MD -MP -MF $(DEPDIR)/umount_static-xmalloc.Tpo -c -o umount_static-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-xmalloc.Tpo $(DEPDIR)/umount_static-xmalloc.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='xmalloc.c' object='umount_static-xmalloc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-xmalloc.obj `if test -f 'xmalloc.c'; then $(CYGPATH_W) 'xmalloc.c'; else $(CYGPATH_W) '$(srcdir)/xmalloc.c'; fi`
+
+umount_static-canonicalize.o: ../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-canonicalize.o -MD -MP -MF $(DEPDIR)/umount_static-canonicalize.Tpo -c -o umount_static-canonicalize.o `test -f '../lib/canonicalize.c' || echo '$(srcdir)/'`../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-canonicalize.Tpo $(DEPDIR)/umount_static-canonicalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/canonicalize.c' object='umount_static-canonicalize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-canonicalize.o `test -f '../lib/canonicalize.c' || echo '$(srcdir)/'`../lib/canonicalize.c
+
+umount_static-canonicalize.obj: ../lib/canonicalize.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-canonicalize.obj -MD -MP -MF $(DEPDIR)/umount_static-canonicalize.Tpo -c -o umount_static-canonicalize.obj `if test -f '../lib/canonicalize.c'; then $(CYGPATH_W) '../lib/canonicalize.c'; else $(CYGPATH_W) '$(srcdir)/../lib/canonicalize.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-canonicalize.Tpo $(DEPDIR)/umount_static-canonicalize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/canonicalize.c' object='umount_static-canonicalize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-canonicalize.obj `if test -f '../lib/canonicalize.c'; then $(CYGPATH_W) '../lib/canonicalize.c'; else $(CYGPATH_W) '$(srcdir)/../lib/canonicalize.c'; fi`
+
+umount_static-rmd160.o: rmd160.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-rmd160.o -MD -MP -MF $(DEPDIR)/umount_static-rmd160.Tpo -c -o umount_static-rmd160.o `test -f 'rmd160.c' || echo '$(srcdir)/'`rmd160.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-rmd160.Tpo $(DEPDIR)/umount_static-rmd160.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rmd160.c' object='umount_static-rmd160.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-rmd160.o `test -f 'rmd160.c' || echo '$(srcdir)/'`rmd160.c
+
+umount_static-rmd160.obj: rmd160.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-rmd160.obj -MD -MP -MF $(DEPDIR)/umount_static-rmd160.Tpo -c -o umount_static-rmd160.obj `if test -f 'rmd160.c'; then $(CYGPATH_W) 'rmd160.c'; else $(CYGPATH_W) '$(srcdir)/rmd160.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-rmd160.Tpo $(DEPDIR)/umount_static-rmd160.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rmd160.c' object='umount_static-rmd160.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-rmd160.obj `if test -f 'rmd160.c'; then $(CYGPATH_W) 'rmd160.c'; else $(CYGPATH_W) '$(srcdir)/rmd160.c'; fi`
+
+umount_static-env.o: ../lib/env.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-env.o -MD -MP -MF $(DEPDIR)/umount_static-env.Tpo -c -o umount_static-env.o `test -f '../lib/env.c' || echo '$(srcdir)/'`../lib/env.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-env.Tpo $(DEPDIR)/umount_static-env.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/env.c' object='umount_static-env.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-env.o `test -f '../lib/env.c' || echo '$(srcdir)/'`../lib/env.c
+
+umount_static-env.obj: ../lib/env.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-env.obj -MD -MP -MF $(DEPDIR)/umount_static-env.Tpo -c -o umount_static-env.obj `if test -f '../lib/env.c'; then $(CYGPATH_W) '../lib/env.c'; else $(CYGPATH_W) '$(srcdir)/../lib/env.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-env.Tpo $(DEPDIR)/umount_static-env.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/env.c' object='umount_static-env.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-env.obj `if test -f '../lib/env.c'; then $(CYGPATH_W) '../lib/env.c'; else $(CYGPATH_W) '$(srcdir)/../lib/env.c'; fi`
+
+umount_static-linux_version.o: ../lib/linux_version.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-linux_version.o -MD -MP -MF $(DEPDIR)/umount_static-linux_version.Tpo -c -o umount_static-linux_version.o `test -f '../lib/linux_version.c' || echo '$(srcdir)/'`../lib/linux_version.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-linux_version.Tpo $(DEPDIR)/umount_static-linux_version.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/linux_version.c' object='umount_static-linux_version.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-linux_version.o `test -f '../lib/linux_version.c' || echo '$(srcdir)/'`../lib/linux_version.c
+
+umount_static-linux_version.obj: ../lib/linux_version.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-linux_version.obj -MD -MP -MF $(DEPDIR)/umount_static-linux_version.Tpo -c -o umount_static-linux_version.obj `if test -f '../lib/linux_version.c'; then $(CYGPATH_W) '../lib/linux_version.c'; else $(CYGPATH_W) '$(srcdir)/../lib/linux_version.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-linux_version.Tpo $(DEPDIR)/umount_static-linux_version.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/linux_version.c' object='umount_static-linux_version.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-linux_version.obj `if test -f '../lib/linux_version.c'; then $(CYGPATH_W) '../lib/linux_version.c'; else $(CYGPATH_W) '$(srcdir)/../lib/linux_version.c'; fi`
+
+umount_static-blkdev.o: ../lib/blkdev.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-blkdev.o -MD -MP -MF $(DEPDIR)/umount_static-blkdev.Tpo -c -o umount_static-blkdev.o `test -f '../lib/blkdev.c' || echo '$(srcdir)/'`../lib/blkdev.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-blkdev.Tpo $(DEPDIR)/umount_static-blkdev.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/blkdev.c' object='umount_static-blkdev.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-blkdev.o `test -f '../lib/blkdev.c' || echo '$(srcdir)/'`../lib/blkdev.c
+
+umount_static-blkdev.obj: ../lib/blkdev.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-blkdev.obj -MD -MP -MF $(DEPDIR)/umount_static-blkdev.Tpo -c -o umount_static-blkdev.obj `if test -f '../lib/blkdev.c'; then $(CYGPATH_W) '../lib/blkdev.c'; else $(CYGPATH_W) '$(srcdir)/../lib/blkdev.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-blkdev.Tpo $(DEPDIR)/umount_static-blkdev.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/blkdev.c' object='umount_static-blkdev.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-blkdev.obj `if test -f '../lib/blkdev.c'; then $(CYGPATH_W) '../lib/blkdev.c'; else $(CYGPATH_W) '$(srcdir)/../lib/blkdev.c'; fi`
+
+umount_static-fsprobe.o: ../lib/fsprobe.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-fsprobe.o -MD -MP -MF $(DEPDIR)/umount_static-fsprobe.Tpo -c -o umount_static-fsprobe.o `test -f '../lib/fsprobe.c' || echo '$(srcdir)/'`../lib/fsprobe.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-fsprobe.Tpo $(DEPDIR)/umount_static-fsprobe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/fsprobe.c' object='umount_static-fsprobe.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-fsprobe.o `test -f '../lib/fsprobe.c' || echo '$(srcdir)/'`../lib/fsprobe.c
+
+umount_static-fsprobe.obj: ../lib/fsprobe.c
+@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -MT umount_static-fsprobe.obj -MD -MP -MF $(DEPDIR)/umount_static-fsprobe.Tpo -c -o umount_static-fsprobe.obj `if test -f '../lib/fsprobe.c'; then $(CYGPATH_W) '../lib/fsprobe.c'; else $(CYGPATH_W) '$(srcdir)/../lib/fsprobe.c'; fi`
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/umount_static-fsprobe.Tpo $(DEPDIR)/umount_static-fsprobe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='../lib/fsprobe.c' object='umount_static-fsprobe.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(umount_static_CFLAGS) $(CFLAGS) -c -o umount_static-fsprobe.obj `if test -f '../lib/fsprobe.c'; then $(CYGPATH_W) '../lib/fsprobe.c'; else $(CYGPATH_W) '$(srcdir)/../lib/fsprobe.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-man5: $(dist_man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)"
+ @list=''; test -n "$(man5dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.5[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man5:
+ @$(NORMAL_UNINSTALL)
+ @list=''; test -n "$(man5dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.5[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man5dir)" && rm -f $$files; }
+install-man8: $(dist_man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
+ @list=''; test -n "$(man8dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list=''; test -n "$(man8dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.8[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man8dir)" && rm -f $$files; }
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(MANS) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool \
+ clean-noinstPROGRAMS clean-sbinPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS install-sbinPROGRAMS
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man: install-man5 install-man8
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-man \
+ uninstall-sbinPROGRAMS
+
+uninstall-man: uninstall-man5 uninstall-man8
+
+.MAKE: install-am install-exec-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-libtool clean-noinstPROGRAMS \
+ clean-sbinPROGRAMS ctags distclean distclean-compile \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-binPROGRAMS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-exec-hook \
+ install-html install-html-am install-info install-info-am \
+ install-man install-man5 install-man8 install-pdf \
+ install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-man uninstall-man5 \
+ uninstall-man8 uninstall-sbinPROGRAMS
+
+
+$(ul_libblkid_la):
+ $(MAKE) -C $(ul_libblkid_builddir)
+
+$(ul_libuuid_la):
+ $(MAKE) -C $(ul_libuuid_builddir)
+
+install-exec-hook:
+ chmod 4755 $(DESTDIR)$(bindir)/mount
+ chmod 4755 $(DESTDIR)$(bindir)/umount
+ cd $(DESTDIR)$(sbindir) && ln -sf swapon swapoff
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/mount/README.mount b/mount/README.mount
new file mode 100644
index 0000000..c7f317c
--- /dev/null
+++ b/mount/README.mount
@@ -0,0 +1,11 @@
+mount/umount for Linux 0.97.3 and later.
+Authors:
+Doug Quale <quale@saavik.cs.wisc.edu>,
+H.J. Lu <hlu@eecs.wsu.edu>,
+Rick Sladkey <jrs@world.std.com>,
+Stephen Tweedie <sct@dcs.ed.ac.uk>.
+Andries Brouwer <aeb@cwi.nl>
+Adrian Bunk <bunk@stusta.de>
+
+Presently in util-linux-ng maintained by Karel Zak <kzak@redhat.com>.
+
diff --git a/mount/devname.c b/mount/devname.c
new file mode 100644
index 0000000..585d259
--- /dev/null
+++ b/mount/devname.c
@@ -0,0 +1,15 @@
+#include "fsprobe.h"
+
+#include "devname.h"
+#include "sundries.h" /* for xstrdup */
+
+const char *
+spec_to_devname(const char *spec)
+{
+ if (!spec)
+ return NULL;
+ if (is_pseudo_fs(spec))
+ return xstrdup(spec);
+ return fsprobe_get_devname_by_spec(spec);
+}
+
diff --git a/mount/devname.h b/mount/devname.h
new file mode 100644
index 0000000..d6adeff
--- /dev/null
+++ b/mount/devname.h
@@ -0,0 +1,6 @@
+#ifndef MOUNT_DEVNAME_H
+#define MOUNT_DEVNAME_H
+
+extern const char *spec_to_devname(const char *spec);
+
+#endif
diff --git a/mount/fstab.5 b/mount/fstab.5
new file mode 100644
index 0000000..1c5cdca
--- /dev/null
+++ b/mount/fstab.5
@@ -0,0 +1,214 @@
+.\" Copyright (c) 1980, 1989, 1991 The Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)fstab.5 6.5 (Berkeley) 5/10/91
+.\"
+.\" Modified Sat Mar 6 20:45:03 1993, faith@cs.unc.edu, for Linux
+.\" Sat Oct 9 10:07:10 1993: converted to man format by faith@cs.unc.edu
+.\" Sat Nov 20 20:47:38 1993: hpfs documentation added
+.\" Sat Nov 27 20:23:32 1993: Updated authorship information
+.\" Wed Jul 26 00:00:00 1995: Updated some nfs stuff, joey@infodrom.north.de
+.\" Tue Apr 2 00:38:28 1996: added info about "noauto", "user", etc.
+.\" Tue Jun 15 20:02:18 1999: added LABEL and UUID
+.\" Sat Jul 14 2001: Michael K. Johnson <johnsonm@redhat.com> added -O
+.\"
+.TH FSTAB 5 "15 June 1999" "Linux 2.2" "Linux Programmer's Manual"
+.SH NAME
+fstab \- static information about the filesystems
+.SH SYNOPSIS
+.B #include <fstab.h>
+.SH DESCRIPTION
+The file
+.B fstab
+contains descriptive information about the various file systems.
+.B fstab
+is only read by programs, and not written; it is the duty of the system
+administrator to properly create and maintain this file. Each filesystem
+is described on a separate line; fields on each line are separated by tabs
+or spaces. Lines starting with '#' are comments. The order of records in
+.B fstab
+is important because
+.BR fsck (8),
+.BR mount (8),
+and
+.BR umount (8)
+sequentially iterate through
+.B fstab
+doing their thing.
+
+The first field,
+.RI ( fs_spec ),
+describes the block special device or
+remote filesystem to be mounted.
+.LP
+For ordinary mounts it will hold (a link to) a block special
+device node (as created by
+.BR mknod (8))
+for the device to be mounted, like `/dev/cdrom' or `/dev/sdb7'.
+For NFS mounts one will have <host>:<dir>, e.g., `knuth.aeb.nl:/'.
+For procfs, use `proc'.
+.LP
+Instead of giving the device explicitly, one may indicate
+the (ext2 or xfs) filesystem that is to be mounted by its UUID or
+volume label (cf.
+.BR e2label (8)
+or
+.BR xfs_admin (8)),
+writing LABEL=<label> or UUID=<uuid>,
+e.g., `LABEL=Boot' or `UUID=3e6be9de\%-8139\%-11d1\%-9106\%-a43f08d823a6'.
+This will make the system more robust: adding or removing a SCSI disk
+changes the disk device name but not the filesystem volume label.
+
+The second field,
+.RI ( fs_file ),
+describes the mount point for the filesystem. For swap partitions, this
+field should be specified as `none'. If the name of the mount point
+contains spaces these can be escaped as `\\040'.
+
+The third field,
+.RI ( fs_vfstype ),
+describes the type of the filesystem. Linux supports lots
+of filesystem types, such as
+.IR adfs ,
+.IR affs ,
+.IR autofs ,
+.IR coda ,
+.IR coherent ,
+.IR cramfs ,
+.IR devpts ,
+.IR efs ,
+.IR ext2 ,
+.IR ext3 ,
+.IR hfs ,
+.IR hpfs ,
+.IR iso9660 ,
+.IR jfs ,
+.IR minix ,
+.IR msdos ,
+.IR ncpfs ,
+.IR nfs ,
+.IR ntfs ,
+.IR proc ,
+.IR qnx4 ,
+.IR reiserfs ,
+.IR romfs ,
+.IR smbfs ,
+.IR sysv ,
+.IR tmpfs ,
+.IR udf ,
+.IR ufs ,
+.IR umsdos ,
+.IR vfat ,
+.IR xenix ,
+.IR xfs ,
+and possibly others. For more details, see
+.BR mount (8).
+For the filesystems currently supported by the running kernel, see
+.IR /proc/filesystems .
+An entry
+.I swap
+denotes a file or partition to be used
+for swapping, cf.\&
+.BR swapon (8).
+An entry
+.I ignore
+causes the line to be ignored. This is useful
+to show disk partitions which are currently unused.
+An entry
+.I none
+is useful for bind or move mounts.
+
+The fourth field,
+.RI ( fs_mntops ),
+describes the mount options associated with the filesystem.
+
+It is formatted as a comma separated list of options. It contains at least
+the type of mount plus any additional options appropriate to the filesystem
+type. For documentation on the available options for non-nfs file systems,
+see
+.BR mount (8).
+For documentation on all nfs-specific options have a look at
+.BR nfs (5).
+Common for all types of file system are the options ``noauto''
+(do not mount when "mount -a" is given, e.g., at boot time), ``user''
+(allow a user to mount), and ``owner''
+(allow device owner to mount), and ``comment''
+(e.g., for use by fstab-maintaining programs).
+The ``owner'' and ``comment'' options are Linux-specific.
+For more details, see
+.BR mount (8).
+
+The fifth field,
+.RI ( fs_freq ),
+is used for these filesystems by the
+.BR dump (8)
+command to determine which filesystems need to be dumped. If the fifth
+field is not present, a value of zero is returned and
+.B dump
+will assume that the filesystem does not need to be dumped.
+
+The sixth field,
+.RI ( fs_passno ),
+is used by the
+.BR fsck (8)
+program to determine the order in which filesystem checks are done at
+reboot time. The root filesystem should be specified with a
+.I fs_passno
+of 1, and other filesystems should have a
+.I fs_passno
+of 2. Filesystems within a drive will be checked sequentially, but
+filesystems on different drives will be checked at the same time to utilize
+parallelism available in the hardware. If the sixth field is not present
+or zero, a value of zero is returned and
+.B fsck
+will assume that the filesystem does not need to be checked.
+
+The proper way to read records from
+.B fstab
+is to use the routines
+.BR getmntent (3).
+.SH FILES
+.I /etc/fstab
+.SH "SEE ALSO"
+.BR getmntent (3),
+.BR mount (8),
+.BR swapon (8),
+.BR fs (5),
+.BR nfs (5)
+.SH HISTORY
+The ancestor of this
+.B fstab
+file format appeared in 4.0BSD.
+.\" But without comment convention, and options and vfs_type.
+.\" Instead there was a type rw/ro/rq/sw/xx, where xx is the present 'ignore'.
+.SH AVAILABILITY
+This man page is part of the util-linux-ng package and is available from
+ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
diff --git a/mount/fstab.c b/mount/fstab.c
new file mode 100644
index 0000000..8cd35d6
--- /dev/null
+++ b/mount/fstab.c
@@ -0,0 +1,1016 @@
+/* 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL>
+ * - added Native Language Support
+ * Sun Mar 21 1999 - Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ * - fixed strerr(errno) in gettext calls
+ */
+
+#include <unistd.h>
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <time.h>
+#include <mntent.h>
+#include "mount_mntent.h"
+#include "fstab.h"
+#include "sundries.h"
+#include "xmalloc.h"
+#include "fsprobe.h"
+#include "pathnames.h"
+#include "nls.h"
+#include "usleep.h"
+
+#define streq(s, t) (strcmp ((s), (t)) == 0)
+
+/* Information about mtab. ------------------------------------*/
+static int have_mtab_info = 0;
+static int var_mtab_does_not_exist = 0;
+static int var_mtab_is_a_symlink = 0;
+
+static void
+get_mtab_info(void) {
+ if (!have_mtab_info) {
+ struct stat mtab_stat;
+
+ var_mtab_does_not_exist = 0;
+ var_mtab_is_a_symlink = 0;
+
+ if (lstat(_PATH_MOUNTED, &mtab_stat))
+ var_mtab_does_not_exist = 1;
+ else if (S_ISLNK(mtab_stat.st_mode))
+ var_mtab_is_a_symlink = 1;
+ have_mtab_info = 1;
+ }
+}
+
+void
+reset_mtab_info(void) {
+ have_mtab_info = 0;
+}
+
+int
+mtab_does_not_exist(void) {
+ get_mtab_info();
+ return var_mtab_does_not_exist;
+}
+
+static int
+mtab_is_a_symlink(void) {
+ get_mtab_info();
+ return var_mtab_is_a_symlink;
+}
+
+int
+mtab_is_writable() {
+ int fd;
+
+ /* Should we write to /etc/mtab upon an update?
+ Probably not if it is a symlink to /proc/mounts, since that
+ would create a file /proc/mounts in case the proc filesystem
+ is not mounted. */
+ if (mtab_is_a_symlink())
+ return 0;
+
+ fd = open(_PATH_MOUNTED, O_RDWR | O_CREAT, 0644);
+ if (fd >= 0) {
+ close(fd);
+ return 1;
+ } else
+ return 0;
+}
+
+/* Contents of mtab and fstab ---------------------------------*/
+
+struct mntentchn mounttable, fstab;
+static int got_mtab = 0;
+static int got_fstab = 0;
+
+static void read_mounttable(void), read_fstab(void);
+
+struct mntentchn *
+mtab_head() {
+ if (!got_mtab)
+ read_mounttable();
+ return &mounttable;
+}
+
+struct mntentchn *
+fstab_head() {
+ if (!got_fstab)
+ read_fstab();
+ return &fstab;
+}
+
+static void
+my_free_mc(struct mntentchn *mc) {
+ if (mc) {
+ my_free(mc->m.mnt_fsname);
+ my_free(mc->m.mnt_dir);
+ my_free(mc->m.mnt_type);
+ my_free(mc->m.mnt_opts);
+ free(mc);
+ }
+}
+
+
+static void
+discard_mntentchn(struct mntentchn *mc0) {
+ struct mntentchn *mc, *mc1;
+
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc1) {
+ mc1 = mc->nxt;
+ my_free_mc(mc);
+ }
+}
+
+static void
+read_mntentchn(mntFILE *mfp, const char *fnam, struct mntentchn *mc0) {
+ struct mntentchn *mc = mc0;
+ struct my_mntent *mnt;
+
+ while ((mnt = my_getmntent(mfp)) != NULL) {
+ if (!streq(mnt->mnt_type, MNTTYPE_IGNORE)) {
+ mc->nxt = (struct mntentchn *) xmalloc(sizeof(*mc));
+ mc->nxt->prev = mc;
+ mc = mc->nxt;
+ mc->m = *mnt;
+ mc->nxt = mc0;
+ }
+ }
+ mc0->prev = mc;
+ if (ferror(mfp->mntent_fp)) {
+ int errsv = errno;
+ error(_("warning: error reading %s: %s"),
+ fnam, strerror (errsv));
+ mc0->nxt = mc0->prev = NULL;
+ }
+ my_endmntent(mfp);
+}
+
+/*
+ * Read /etc/mtab. If that fails, try /proc/mounts.
+ * This produces a linked list. The list head mounttable is a dummy.
+ * Return 0 on success.
+ */
+static void
+read_mounttable() {
+ mntFILE *mfp;
+ const char *fnam;
+ struct mntentchn *mc = &mounttable;
+
+ got_mtab = 1;
+ mc->nxt = mc->prev = NULL;
+
+ fnam = _PATH_MOUNTED;
+ mfp = my_setmntent (fnam, "r");
+ if (mfp == NULL || mfp->mntent_fp == NULL) {
+ int errsv = errno;
+ fnam = _PATH_PROC_MOUNTS;
+ mfp = my_setmntent (fnam, "r");
+ if (mfp == NULL || mfp->mntent_fp == NULL) {
+ error(_("warning: can't open %s: %s"),
+ _PATH_MOUNTED, strerror (errsv));
+ return;
+ }
+ if (verbose)
+ printf (_("mount: could not open %s - "
+ "using %s instead\n"),
+ _PATH_MOUNTED, _PATH_PROC_MOUNTS);
+ }
+ read_mntentchn(mfp, fnam, mc);
+}
+
+static void
+read_fstab() {
+ mntFILE *mfp = NULL;
+ const char *fnam;
+ struct mntentchn *mc = &fstab;
+
+ got_fstab = 1;
+ mc->nxt = mc->prev = NULL;
+
+ fnam = _PATH_MNTTAB;
+ mfp = my_setmntent (fnam, "r");
+ if (mfp == NULL || mfp->mntent_fp == NULL) {
+ int errsv = errno;
+ error(_("warning: can't open %s: %s"),
+ _PATH_MNTTAB, strerror (errsv));
+ return;
+ }
+ read_mntentchn(mfp, fnam, mc);
+}
+
+
+/* Given the name NAME, try to find it in mtab. */
+struct mntentchn *
+getmntfile (const char *name) {
+ struct mntentchn *mc, *mc0;
+
+ mc0 = mtab_head();
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
+ if (streq(mc->m.mnt_dir, name) ||
+ streq(mc->m.mnt_fsname, name))
+ return mc;
+ return NULL;
+}
+
+/*
+ * Given the directory name NAME, and the place MCPREV we found it last time,
+ * try to find more occurrences.
+ */
+struct mntentchn *
+getmntdirbackward (const char *name, struct mntentchn *mcprev) {
+ struct mntentchn *mc, *mc0;
+
+ mc0 = mtab_head();
+ if (!mcprev)
+ mcprev = mc0;
+ for (mc = mcprev->prev; mc && mc != mc0; mc = mc->prev)
+ if (streq(mc->m.mnt_dir, name))
+ return mc;
+ return NULL;
+}
+
+/*
+ * Given the device name NAME, and the place MCPREV we found it last time,
+ * try to find more occurrences.
+ */
+struct mntentchn *
+getmntdevbackward (const char *name, struct mntentchn *mcprev) {
+ struct mntentchn *mc, *mc0;
+
+ mc0 = mtab_head();
+ if (!mcprev)
+ mcprev = mc0;
+ for (mc = mcprev->prev; mc && mc != mc0; mc = mc->prev)
+ if (streq(mc->m.mnt_fsname, name))
+ return mc;
+ return NULL;
+}
+
+/*
+ * Given the name NAME, check that it occurs precisely once as dir or dev.
+ */
+int
+is_mounted_once(const char *name) {
+ struct mntentchn *mc, *mc0;
+ int ct = 0;
+
+ mc0 = mtab_head();
+ for (mc = mc0->prev; mc && mc != mc0; mc = mc->prev)
+ if (streq(mc->m.mnt_dir, name) ||
+ streq(mc->m.mnt_fsname, name))
+ ct++;
+ return (ct == 1);
+}
+
+/* Given the name FILE, try to find the option "loop=FILE" in mtab. */
+struct mntentchn *
+getmntoptfile (const char *file) {
+ struct mntentchn *mc, *mc0;
+ const char *opts, *s;
+ int l;
+
+ if (!file)
+ return NULL;
+
+ l = strlen(file);
+
+ mc0 = mtab_head();
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
+ if ((opts = mc->m.mnt_opts) != NULL
+ && (s = strstr(opts, "loop="))
+ && !strncmp(s+5, file, l)
+ && (s == opts || s[-1] == ',')
+ && (s[l+5] == 0 || s[l+5] == ','))
+ return mc;
+ return NULL;
+}
+
+/* compares "quoted" or 'quoted' with unquoted */
+static int
+streq_quoted(const char *quoted, const char *unquoted)
+{
+ if (*quoted == '"' || *quoted == '\'')
+ return !strncmp(quoted + 1, unquoted, strlen(quoted) - 2);
+
+ return streq(quoted, unquoted);
+}
+
+static int
+has_label(const char *device, const char *label) {
+ const char *devlabel;
+ int ret;
+
+ devlabel = fsprobe_get_label_by_devname(device);
+ if (!devlabel)
+ return 0;
+
+ ret = streq_quoted(label, devlabel);
+ my_free(devlabel);
+ return ret;
+}
+
+static int
+has_uuid(const char *device, const char *uuid){
+ const char *devuuid;
+ int ret;
+
+ devuuid = fsprobe_get_uuid_by_devname(device);
+ if (!devuuid)
+ return 0;
+
+ ret = streq_quoted(uuid, devuuid);
+ my_free(devuuid);
+ return ret;
+}
+
+/* Find the entry (DEV,DIR) in fstab -- spec and dir must be canonicalized! */
+struct mntentchn *
+getfs_by_devdir (const char *dev, const char *dir) {
+ struct mntentchn *mc, *mc0;
+
+ mc0 = fstab_head();
+
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) {
+ int ok = 1;
+
+ /* dir */
+ if (!streq(mc->m.mnt_dir, dir)) {
+ char *dr = canonicalize(mc->m.mnt_dir);
+ ok = streq(dr, dir);
+ my_free(dr);
+ }
+
+ /* spec */
+ if (ok && !streq(mc->m.mnt_fsname, dev)) {
+ const char *fs = mc->m.mnt_fsname;
+
+ if (strncmp (fs, "LABEL=", 6) == 0) {
+ ok = has_label(dev, fs + 6);
+ } else if (strncmp (fs, "UUID=", 5) == 0) {
+ ok = has_uuid(dev, fs + 5);
+ } else {
+ fs = canonicalize_spec(mc->m.mnt_fsname);
+ ok = streq(fs, dev);
+ my_free(fs);
+ }
+ }
+ if (ok)
+ return mc;
+ }
+
+ return NULL;
+}
+
+/* Find the dir DIR in fstab. */
+struct mntentchn *
+getfs_by_dir (const char *dir) {
+ struct mntentchn *mc, *mc0;
+ char *cdir;
+
+ mc0 = fstab_head();
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
+ if (streq(mc->m.mnt_dir, dir))
+ return mc;
+
+ cdir = canonicalize(dir);
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) {
+ if (streq(mc->m.mnt_dir, cdir)) {
+ free(cdir);
+ return mc;
+ }
+ }
+ free(cdir);
+ return NULL;
+}
+
+/* Find the device SPEC in fstab. */
+struct mntentchn *
+getfs_by_spec (const char *spec) {
+ char *name = NULL, *value = NULL, *cspec;
+ struct mntentchn *mc = NULL;
+
+ if (!spec)
+ return NULL;
+
+ if (fsprobe_parse_spec(spec, &name, &value) != 0)
+ return NULL; /* parse error */
+
+ if (name) {
+ if (!strcmp(name,"LABEL"))
+ mc = getfs_by_label (value);
+ else if (!strcmp(name,"UUID"))
+ mc = getfs_by_uuid (value);
+
+ free(name);
+ free(value);
+ return mc;
+ }
+
+ cspec = canonicalize_spec(spec);
+ mc = getfs_by_devname(cspec);
+ free(cspec);
+
+ if (!mc)
+ /* noncanonical name like /dev/cdrom */
+ mc = getfs_by_devname(spec);
+
+ return mc;
+}
+
+/* Find the device in fstab. */
+struct mntentchn *
+getfs_by_devname (const char *devname) {
+ struct mntentchn *mc, *mc0;
+
+ mc0 = fstab_head();
+
+ /* canonical devname in fstab */
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
+ if (streq(mc->m.mnt_fsname, devname))
+ return mc;
+
+ /* noncanonical devname in fstab */
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) {
+ char *fs;
+
+ if (strncmp(mc->m.mnt_fsname, "LABEL=", 6) == 0 ||
+ strncmp(mc->m.mnt_fsname, "UUID=", 5) == 0)
+ continue;
+
+ fs = canonicalize_spec(mc->m.mnt_fsname);
+ if (streq(fs, devname)) {
+ free(fs);
+ return mc;
+ }
+ free(fs);
+ }
+
+ return NULL;
+}
+
+
+/* Find the uuid UUID in fstab. */
+struct mntentchn *
+getfs_by_uuid (const char *uuid) {
+ struct mntentchn *mc, *mc0;
+
+ mc0 = fstab_head();
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
+ if (strncmp (mc->m.mnt_fsname, "UUID=", 5) == 0
+ && streq_quoted(mc->m.mnt_fsname + 5, uuid))
+ return mc;
+ return NULL;
+}
+
+/* Find the label LABEL in fstab. */
+struct mntentchn *
+getfs_by_label (const char *label) {
+ struct mntentchn *mc, *mc0;
+
+ mc0 = fstab_head();
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
+ if (strncmp (mc->m.mnt_fsname, "LABEL=", 6) == 0
+ && streq_quoted(mc->m.mnt_fsname + 6, label))
+ return mc;
+ return NULL;
+}
+
+/* Updating mtab ----------------------------------------------*/
+
+/* Flag for already existing lock file. */
+static int we_created_lockfile = 0;
+static int lockfile_fd = -1;
+
+/* Flag to indicate that signals have been set up. */
+static int signals_have_been_setup = 0;
+
+/* Ensure that the lock is released if we are interrupted. */
+extern char *strsignal(int sig); /* not always in <string.h> */
+
+static void
+handler (int sig) {
+ die(EX_USER, "%s", strsignal(sig));
+}
+
+static void
+setlkw_timeout (int sig) {
+ /* nothing, fcntl will fail anyway */
+}
+
+/* Remove lock file. */
+void
+unlock_mtab (void) {
+ if (we_created_lockfile) {
+ close(lockfile_fd);
+ lockfile_fd = -1;
+ unlink (_PATH_MOUNTED_LOCK);
+ we_created_lockfile = 0;
+ }
+}
+
+/* Create the lock file.
+ The lock file will be removed if we catch a signal or when we exit. */
+/* The old code here used flock on a lock file /etc/mtab~ and deleted
+ this lock file afterwards. However, as rgooch remarks, that has a
+ race: a second mount may be waiting on the lock and proceed as
+ soon as the lock file is deleted by the first mount, and immediately
+ afterwards a third mount comes, creates a new /etc/mtab~, applies
+ flock to that, and also proceeds, so that the second and third mount
+ now both are scribbling in /etc/mtab.
+ The new code uses a link() instead of a creat(), where we proceed
+ only if it was us that created the lock, and hence we always have
+ to delete the lock afterwards. Now the use of flock() is in principle
+ superfluous, but avoids an arbitrary sleep(). */
+
+/* Where does the link point to? Obvious choices are mtab and mtab~~.
+ HJLu points out that the latter leads to races. Right now we use
+ mtab~.<pid> instead. Use 20 as upper bound for the length of %d. */
+#define MOUNTLOCK_LINKTARGET _PATH_MOUNTED_LOCK "%d"
+#define MOUNTLOCK_LINKTARGET_LTH (sizeof(_PATH_MOUNTED_LOCK)+20)
+
+/*
+ * The original mount locking code has used sleep(1) between attempts and
+ * maximal number of attemps has been 5.
+ *
+ * There was very small number of attempts and extremely long waiting (1s)
+ * that is useless on machines with large number of concurret mount processes.
+ *
+ * Now we wait few thousand microseconds between attempts and we have global
+ * time limit (30s) rather than limit for number of attempts. The advantage
+ * is that this method also counts time which we spend in fcntl(F_SETLKW) and
+ * number of attempts is not so much restricted.
+ *
+ * -- kzak@redhat.com [2007-Mar-2007]
+ */
+
+/* maximum seconds between first and last attempt */
+#define MOUNTLOCK_MAXTIME 30
+
+/* sleep time (in microseconds, max=999999) between attempts */
+#define MOUNTLOCK_WAITTIME 5000
+
+void
+lock_mtab (void) {
+ int i;
+ struct timespec waittime;
+ struct timeval maxtime;
+ char linktargetfile[MOUNTLOCK_LINKTARGET_LTH];
+
+ if (!signals_have_been_setup) {
+ int sig = 0;
+ struct sigaction sa;
+
+ sa.sa_handler = handler;
+ sa.sa_flags = 0;
+ sigfillset (&sa.sa_mask);
+
+ while (sigismember (&sa.sa_mask, ++sig) != -1
+ && sig != SIGCHLD) {
+ if (sig == SIGALRM)
+ sa.sa_handler = setlkw_timeout;
+ else
+ sa.sa_handler = handler;
+ sigaction (sig, &sa, (struct sigaction *) 0);
+ }
+ signals_have_been_setup = 1;
+ }
+
+ sprintf(linktargetfile, MOUNTLOCK_LINKTARGET, getpid ());
+
+ i = open (linktargetfile, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR);
+ if (i < 0) {
+ int errsv = errno;
+ /* linktargetfile does not exist (as a file)
+ and we cannot create it. Read-only filesystem?
+ Too many files open in the system?
+ Filesystem full? */
+ die (EX_FILEIO, _("can't create lock file %s: %s "
+ "(use -n flag to override)"),
+ linktargetfile, strerror (errsv));
+ }
+ close(i);
+
+ gettimeofday(&maxtime, NULL);
+ maxtime.tv_sec += MOUNTLOCK_MAXTIME;
+
+ waittime.tv_sec = 0;
+ waittime.tv_nsec = (1000 * MOUNTLOCK_WAITTIME);
+
+ /* Repeat until it was us who made the link */
+ while (!we_created_lockfile) {
+ struct timeval now;
+ struct flock flock;
+ int errsv, j;
+
+ j = link(linktargetfile, _PATH_MOUNTED_LOCK);
+ errsv = errno;
+
+ if (j == 0)
+ we_created_lockfile = 1;
+
+ if (j < 0 && errsv != EEXIST) {
+ (void) unlink(linktargetfile);
+ die (EX_FILEIO, _("can't link lock file %s: %s "
+ "(use -n flag to override)"),
+ _PATH_MOUNTED_LOCK, strerror (errsv));
+ }
+
+ lockfile_fd = open (_PATH_MOUNTED_LOCK, O_WRONLY);
+
+ if (lockfile_fd < 0) {
+ /* Strange... Maybe the file was just deleted? */
+ int errsv = errno;
+ gettimeofday(&now, NULL);
+ if (errno == ENOENT && now.tv_sec < maxtime.tv_sec) {
+ we_created_lockfile = 0;
+ continue;
+ }
+ (void) unlink(linktargetfile);
+ die (EX_FILEIO, _("can't open lock file %s: %s "
+ "(use -n flag to override)"),
+ _PATH_MOUNTED_LOCK, strerror (errsv));
+ }
+
+ flock.l_type = F_WRLCK;
+ flock.l_whence = SEEK_SET;
+ flock.l_start = 0;
+ flock.l_len = 0;
+
+ if (j == 0) {
+ /* We made the link. Now claim the lock. */
+ if (fcntl (lockfile_fd, F_SETLK, &flock) == -1) {
+ if (verbose) {
+ int errsv = errno;
+ printf(_("Can't lock lock file %s: %s\n"),
+ _PATH_MOUNTED_LOCK, strerror (errsv));
+ }
+ /* proceed, since it was us who created the lockfile anyway */
+ }
+ (void) unlink(linktargetfile);
+ } else {
+ /* Someone else made the link. Wait. */
+ gettimeofday(&now, NULL);
+ if (now.tv_sec < maxtime.tv_sec) {
+ alarm(maxtime.tv_sec - now.tv_sec);
+ if (fcntl (lockfile_fd, F_SETLKW, &flock) == -1) {
+ int errsv = errno;
+ (void) unlink(linktargetfile);
+ die (EX_FILEIO, _("can't lock lock file %s: %s"),
+ _PATH_MOUNTED_LOCK, (errno == EINTR) ?
+ _("timed out") : strerror (errsv));
+ }
+ alarm(0);
+
+ nanosleep(&waittime, NULL);
+ } else {
+ (void) unlink(linktargetfile);
+ die (EX_FILEIO, _("Cannot create link %s\n"
+ "Perhaps there is a stale lock file?\n"),
+ _PATH_MOUNTED_LOCK);
+ }
+ close(lockfile_fd);
+ }
+ }
+}
+
+static char *
+get_option(const char *optname, const char *src, size_t *len)
+{
+ char *opt, *end;
+ size_t sz;
+
+ if (!src)
+ return NULL;
+
+ opt = strstr(src, optname);
+ if (!opt)
+ return NULL;
+
+ end = strchr(opt, ',');
+ sz = end ? end - opt : strlen(opt);
+
+ if (len)
+ *len = sz;
+
+ if ((opt == src || *(opt - 1) == ',') &&
+ (*(opt + sz) == '\0' || *(opt + sz) == ','))
+ return opt;
+
+ return NULL;
+}
+
+static int
+cpy_option(const char *optname, char *dest, const char *src)
+{
+ char *opt;
+ size_t sz;
+
+ opt = get_option(optname, src, &sz);
+ if (!opt)
+ /* the option doesn't exist */
+ return 0;
+
+ if (get_option(optname, dest, NULL))
+ /* the options is already in dest */
+ return 0;
+
+ if (*dest) {
+ dest = dest + strlen(dest);
+ *dest++ = ','; /* separator */
+ }
+ memcpy(dest, opt, sz); /* copy option */
+ *(dest + sz) = '\0'; /* terminator */
+
+ return 1;
+}
+
+/* Generates (and allocates) new options for remount
+ *
+ * We cannot blindly replace the old options, otherwise we will lost some
+ * internally generated stuff (e.g loop=).
+ */
+static char *
+mk_remount_opts(const char *old, const char *instead)
+{
+ char *new;
+ size_t sz;
+
+ if (old == NULL && instead == NULL)
+ return NULL;
+ if (!old)
+ return xstrdup(instead);
+
+ /* max size of new options is:
+ * old + new + '\0' + separator (for each copied option)
+ */
+ sz = strlen(old) + (instead ? strlen(instead) : 0) + 2;
+ new = xmalloc(sz);
+ if (instead && *instead)
+ strncpy(new, instead, sz);
+ else
+ *new = '\0';
+
+ cpy_option("loop=", new, old);
+
+ return new;
+}
+
+/*
+ * Update the mtab.
+ * Used by umount with null INSTEAD: remove the last DIR entry.
+ * Used by mount upon a remount: update option part,
+ * and complain if a wrong device or type was given.
+ * [Note that often a remount will be a rw remount of /
+ * where there was no entry before, and we'll have to believe
+ * the values given in INSTEAD.]
+ */
+
+void
+update_mtab (const char *dir, struct my_mntent *instead) {
+ mntFILE *mfp, *mftmp;
+ const char *fnam = _PATH_MOUNTED;
+ struct mntentchn mtabhead; /* dummy */
+ struct mntentchn *mc, *mc0, *absent = NULL;
+ struct stat sbuf;
+ int fd;
+
+ if (mtab_does_not_exist() || !mtab_is_writable())
+ return;
+
+ lock_mtab();
+
+ /* having locked mtab, read it again */
+ mc0 = mc = &mtabhead;
+ mc->nxt = mc->prev = NULL;
+
+ mfp = my_setmntent(fnam, "r");
+ if (mfp == NULL || mfp->mntent_fp == NULL) {
+ int errsv = errno;
+ error (_("cannot open %s (%s) - mtab not updated"),
+ fnam, strerror (errsv));
+ goto leave;
+ }
+
+ read_mntentchn(mfp, fnam, mc);
+
+ /* find last occurrence of dir */
+ for (mc = mc0->prev; mc && mc != mc0; mc = mc->prev)
+ if (streq(mc->m.mnt_dir, dir))
+ break;
+ if (mc && mc != mc0) {
+ if (instead == NULL) {
+ /* An umount - remove entry */
+ if (mc && mc != mc0) {
+ mc->prev->nxt = mc->nxt;
+ mc->nxt->prev = mc->prev;
+ my_free_mc(mc);
+ }
+ } else if (!strcmp(mc->m.mnt_dir, instead->mnt_dir)) {
+ /* A remount */
+ char *opts = mk_remount_opts(mc->m.mnt_opts,
+ instead->mnt_opts);
+ my_free(mc->m.mnt_opts);
+ mc->m.mnt_opts = opts;
+ } else {
+ /* A move */
+ my_free(mc->m.mnt_dir);
+ mc->m.mnt_dir = xstrdup(instead->mnt_dir);
+ }
+ } else if (instead) {
+ /* not found, add a new entry */
+ absent = xmalloc(sizeof(*absent));
+ absent->m.mnt_fsname = xstrdup(instead->mnt_fsname);
+ absent->m.mnt_dir = xstrdup(instead->mnt_dir);
+ absent->m.mnt_type = xstrdup(instead->mnt_type);
+ absent->m.mnt_opts = xstrdup(instead->mnt_opts);
+ absent->m.mnt_freq = instead->mnt_freq;
+ absent->m.mnt_passno = instead->mnt_passno;
+ absent->nxt = mc0;
+ if (mc0->prev != NULL) {
+ absent->prev = mc0->prev;
+ mc0->prev->nxt = absent;
+ } else {
+ absent->prev = mc0;
+ }
+ mc0->prev = absent;
+ if (mc0->nxt == NULL)
+ mc0->nxt = absent;
+ }
+
+ /* write chain to mtemp */
+ mftmp = my_setmntent (_PATH_MOUNTED_TMP, "w");
+ if (mftmp == NULL || mftmp->mntent_fp == NULL) {
+ int errsv = errno;
+ error (_("cannot open %s (%s) - mtab not updated"),
+ _PATH_MOUNTED_TMP, strerror (errsv));
+ discard_mntentchn(mc0);
+ goto leave;
+ }
+
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) {
+ if (my_addmntent(mftmp, &(mc->m)) == 1) {
+ int errsv = errno;
+ die (EX_FILEIO, _("error writing %s: %s"),
+ _PATH_MOUNTED_TMP, strerror (errsv));
+ }
+ }
+
+ discard_mntentchn(mc0);
+ fd = fileno(mftmp->mntent_fp);
+
+ /*
+ * It seems that better is incomplete and broken /mnt/mtab that
+ * /mnt/mtab that is writeable for non-root users.
+ *
+ * We always skip rename() when chown() and chmod() failed.
+ * -- kzak, 11-Oct-2007
+ */
+
+ if (fchmod(fd, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) < 0) {
+ int errsv = errno;
+ fprintf(stderr, _("error changing mode of %s: %s\n"),
+ _PATH_MOUNTED_TMP, strerror (errsv));
+ goto leave;
+ }
+
+ /*
+ * If mount is setuid and some non-root user mounts sth,
+ * then mtab.tmp might get the group of this user. Copy uid/gid
+ * from the present mtab before renaming.
+ */
+ if (stat(_PATH_MOUNTED, &sbuf) == 0) {
+ if (fchown(fd, sbuf.st_uid, sbuf.st_gid) < 0) {
+ int errsv = errno;
+ fprintf (stderr, _("error changing owner of %s: %s\n"),
+ _PATH_MOUNTED_TMP, strerror(errsv));
+ goto leave;
+ }
+ }
+
+ my_endmntent (mftmp);
+
+ /* rename mtemp to mtab */
+ if (rename (_PATH_MOUNTED_TMP, _PATH_MOUNTED) < 0) {
+ int errsv = errno;
+ fprintf(stderr, _("can't rename %s to %s: %s\n"),
+ _PATH_MOUNTED_TMP, _PATH_MOUNTED, strerror(errsv));
+ }
+
+ leave:
+ unlock_mtab();
+}
+
+
+#ifdef MAIN_TEST_MTABLOCK
+
+/*
+ * This is mtab locking code test for:
+ *
+ * - performance (how many concurrent processes)
+ *
+ * - lock reliability (is possible to see corrupted data if more
+ * concurrent processes modify a same file)
+ *
+ * The test is very simple -- it reads a number from locked file, increments the
+ * number and writes the number back to the file.
+ */
+/* dummy */
+char *fsprobe_get_label_by_devname(const char *spec) { return NULL; }
+char *fsprobe_get_uuid_by_devname(const char *spec) { return NULL; }
+int fsprobe_parse_spec(const char *spec, char **name, char **value) { return 0; }
+struct my_mntent *my_getmntent (mntFILE *mfp) { return NULL; }
+mntFILE *my_setmntent (const char *file, char *mode) { return NULL; }
+void my_endmntent (mntFILE *mfp) { }
+int my_addmntent (mntFILE *mfp, struct my_mntent *mnt) { return 0; }
+
+int
+main(int argc, char **argv)
+{
+ time_t synctime;
+ char *filename;
+ int nloops, id, i;
+ pid_t pid = getpid();
+ unsigned int usecs;
+ struct timeval tv;
+ struct stat st;
+ long last = 0;
+
+ progname = argv[0];
+
+ if (argc < 3)
+ die(EXIT_FAILURE,
+ "usage: %s <id> <synctime> <file> <nloops>\n",
+ progname);
+
+ id = atoi(argv[1]);
+ synctime = (time_t) atol(argv[2]);
+ filename = argv[3];
+ nloops = atoi(argv[4]);
+
+ if (stat(filename, &st) < -1)
+ die(EXIT_FAILURE, "%s: %s\n", filename, strerror(errno));
+
+ fprintf(stderr, "%05d (pid=%05d): START\n", id, pid);
+
+ gettimeofday(&tv, NULL);
+ if (synctime && synctime - tv.tv_sec > 1) {
+ usecs = ((synctime - tv.tv_sec) * 1000000UL) -
+ (1000000UL - tv.tv_usec);
+ usleep(usecs);
+ }
+
+ for (i = 0; i < nloops; i++) {
+ FILE *f;
+ long num;
+ char buf[256];
+
+ lock_mtab();
+
+ if (!(f = fopen(filename, "r"))) {
+ unlock_mtab();
+ die(EXIT_FAILURE, "ERROR: %d (pid=%d, loop=%d): "
+ "open for read failed\n", id, pid, i);
+ }
+ if (!fgets(buf, sizeof(buf), f)) {
+ unlock_mtab();
+ die(EXIT_FAILURE, "ERROR: %d (pid=%d, loop=%d): "
+ "read failed\n", id, pid, i);
+ }
+ fclose(f);
+
+ num = atol(buf) + 1;
+
+ if (!(f = fopen(filename, "w"))) {
+ unlock_mtab();
+ die(EXIT_FAILURE, "ERROR: %d (pid=%d, loop=%d): "
+ "open for write failed\n", id, pid, i);
+ }
+ fprintf(f, "%ld", num);
+ fclose(f);
+
+ unlock_mtab();
+
+ gettimeofday(&tv, NULL);
+
+ fprintf(stderr, "%010ld.%06ld %04d (pid=%05d, loop=%05d): "
+ "num=%09ld last=%09ld\n",
+ tv.tv_sec, tv.tv_usec, id,
+ pid, i, num, last);
+ last = num;
+
+ /* The mount command usually finish after mtab update. We
+ * simulate this via short sleep -- it's also enough to make
+ * concurrent processes happy.
+ */
+ usleep(50000);
+ }
+
+ fprintf(stderr, "%05d (pid=%05d): DONE\n", id, pid);
+
+ exit(EXIT_SUCCESS);
+}
+#endif
+
diff --git a/mount/fstab.h b/mount/fstab.h
new file mode 100644
index 0000000..8fc8fd4
--- /dev/null
+++ b/mount/fstab.h
@@ -0,0 +1,33 @@
+#ifndef MOUNT_FSTAB_H
+#define MOUNT_FSTAB_H
+
+#include "mount_mntent.h"
+int mtab_is_writable(void);
+int mtab_does_not_exist(void);
+void reset_mtab_info(void);
+int is_mounted_once(const char *name);
+
+struct mntentchn {
+ struct mntentchn *nxt, *prev;
+ struct my_mntent m;
+};
+
+struct mntentchn *mtab_head (void);
+struct mntentchn *getmntfile (const char *name);
+struct mntentchn *getmntoptfile (const char *file);
+struct mntentchn *getmntdirbackward (const char *dir, struct mntentchn *mc);
+struct mntentchn *getmntdevbackward (const char *dev, struct mntentchn *mc);
+
+struct mntentchn *fstab_head (void);
+struct mntentchn *getfs_by_dir (const char *dir);
+struct mntentchn *getfs_by_spec (const char *spec);
+struct mntentchn *getfs_by_devname (const char *devname);
+struct mntentchn *getfs_by_devdir (const char *dev, const char *dir);
+struct mntentchn *getfs_by_uuid (const char *uuid);
+struct mntentchn *getfs_by_label (const char *label);
+
+void lock_mtab (void);
+void unlock_mtab (void);
+void update_mtab (const char *special, struct my_mntent *with);
+
+#endif /* MOUNT_FSTAB_H */
diff --git a/mount/getusername.c b/mount/getusername.c
new file mode 100644
index 0000000..9835768
--- /dev/null
+++ b/mount/getusername.c
@@ -0,0 +1,14 @@
+#include <unistd.h>
+#include <pwd.h>
+#include <sys/types.h>
+#include "getusername.h"
+
+char *
+getusername() {
+ char *user = 0;
+ struct passwd *pw = getpwuid(getuid());
+
+ if (pw)
+ user = pw->pw_name;
+ return user;
+}
diff --git a/mount/getusername.h b/mount/getusername.h
new file mode 100644
index 0000000..808ac9b
--- /dev/null
+++ b/mount/getusername.h
@@ -0,0 +1 @@
+extern char *getusername(void);
diff --git a/mount/lomount.c b/mount/lomount.c
new file mode 100644
index 0000000..fd12ce2
--- /dev/null
+++ b/mount/lomount.c
@@ -0,0 +1,1188 @@
+/* Originally from Ted's losetup.c */
+/*
+ * losetup.c - setup and control loop devices
+ */
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <sys/sysmacros.h>
+#include <inttypes.h>
+#include <dirent.h>
+
+#include "loop.h"
+#include "lomount.h"
+#include "rmd160.h"
+#include "xstrncpy.h"
+#include "nls.h"
+#include "sundries.h"
+#include "xmalloc.h"
+#include "pathnames.h"
+
+#ifndef HAVE_VERSIONSORT
+# include "strverscmp.h"
+#endif
+
+#define SIZE(a) (sizeof(a)/sizeof(a[0]))
+
+#ifdef LOOP_SET_FD
+
+static int is_associated(int dev, struct stat *file, unsigned long long offset, int isoff);
+
+static int
+loop_info64_to_old(const struct loop_info64 *info64, struct loop_info *info)
+{
+ memset(info, 0, sizeof(*info));
+ info->lo_number = info64->lo_number;
+ info->lo_device = info64->lo_device;
+ info->lo_inode = info64->lo_inode;
+ info->lo_rdevice = info64->lo_rdevice;
+ info->lo_offset = info64->lo_offset;
+ info->lo_encrypt_type = info64->lo_encrypt_type;
+ info->lo_encrypt_key_size = info64->lo_encrypt_key_size;
+ info->lo_flags = info64->lo_flags;
+ info->lo_init[0] = info64->lo_init[0];
+ info->lo_init[1] = info64->lo_init[1];
+ if (info->lo_encrypt_type == LO_CRYPT_CRYPTOAPI)
+ memcpy(info->lo_name, info64->lo_crypt_name, LO_NAME_SIZE);
+ else
+ memcpy(info->lo_name, info64->lo_file_name, LO_NAME_SIZE);
+ memcpy(info->lo_encrypt_key, info64->lo_encrypt_key, LO_KEY_SIZE);
+
+ /* error in case values were truncated */
+ if (info->lo_device != info64->lo_device ||
+ info->lo_rdevice != info64->lo_rdevice ||
+ info->lo_inode != info64->lo_inode ||
+ info->lo_offset != info64->lo_offset)
+ return -EOVERFLOW;
+
+ return 0;
+}
+
+#define LOOPMAJOR 7
+#define NLOOPS_DEFAULT 8 /* /dev/loop[0-7] */
+
+struct looplist {
+ int flag; /* scanning options */
+ FILE *proc; /* /proc/partitions */
+ int ncur; /* current possition */
+ int *minors; /* ary of minor numbers (when scan whole /dev) */
+ int nminors; /* number of items in *minors */
+ char name[128]; /* device name */
+ int ct_perm; /* count permission problems */
+ int ct_succ; /* count number of successfully
+ detected devices */
+};
+
+#define LLFLG_USEDONLY (1 << 1) /* return used devices only */
+#define LLFLG_FREEONLY (1 << 2) /* return non-used devices */
+#define LLFLG_DONE (1 << 3) /* all is done */
+#define LLFLG_PROCFS (1 << 4) /* try to found used devices in /proc/partitions */
+#define LLFLG_SUBDIR (1 << 5) /* /dev/loop/N */
+#define LLFLG_DFLT (1 << 6) /* directly try to check default loops */
+
+int
+is_loop_device (const char *device) {
+ struct stat st;
+
+ return (stat(device, &st) == 0 &&
+ S_ISBLK(st.st_mode) &&
+ major(st.st_rdev) == LOOPMAJOR);
+}
+
+static int
+is_loop_used(int fd)
+{
+ struct loop_info li;
+
+ errno = 0;
+ if (ioctl (fd, LOOP_GET_STATUS, &li) < 0 && errno == ENXIO)
+ return 0;
+ return 1;
+}
+
+static int
+is_loopfd_autoclear(int fd)
+{
+ struct loop_info lo;
+ struct loop_info64 lo64;
+
+ if (ioctl(fd, LOOP_GET_STATUS64, &lo64) == 0) {
+ if (lo64.lo_flags & LO_FLAGS_AUTOCLEAR)
+ return 1;
+
+ } else if (ioctl(fd, LOOP_GET_STATUS, &lo) == 0) {
+ if (lo.lo_flags & LO_FLAGS_AUTOCLEAR)
+ return 1;
+ }
+ return 0;
+}
+
+int
+is_loop_autoclear(const char *device)
+{
+ int fd, rc;
+
+ if ((fd = open(device, O_RDONLY)) < 0)
+ return 0;
+ rc = is_loopfd_autoclear(fd);
+
+ close(fd);
+ return rc;
+}
+
+static int
+looplist_open(struct looplist *ll, int flag)
+{
+ struct stat st;
+
+ memset(ll, 0, sizeof(*ll));
+ ll->flag = flag;
+ ll->ncur = -1;
+
+ if (stat(_PATH_DEV, &st) == -1 || (!S_ISDIR(st.st_mode)))
+ return -1; /* /dev doesn't exist */
+
+ if (stat(_PATH_DEV_LOOP, &st) == 0 && S_ISDIR(st.st_mode))
+ ll->flag |= LLFLG_SUBDIR; /* /dev/loop/ exists */
+
+ if ((ll->flag & LLFLG_USEDONLY) &&
+ stat(_PATH_PROC_PARTITIONS, &st) == 0)
+ ll->flag |= LLFLG_PROCFS; /* try /proc/partitions */
+
+ ll->flag |= LLFLG_DFLT; /* required! */
+ return 0;
+}
+
+static void
+looplist_close(struct looplist *ll)
+{
+ free(ll->minors);
+ if (ll->proc)
+ fclose(ll->proc);
+ ll->minors = NULL;
+ ll->proc = NULL;
+ ll->ncur = -1;
+ ll->flag |= LLFLG_DONE;
+}
+
+static int
+looplist_open_dev(struct looplist *ll, int lnum)
+{
+ struct stat st;
+ int used;
+ int fd;
+
+ /* create a full device path */
+ snprintf(ll->name, sizeof(ll->name),
+ ll->flag & LLFLG_SUBDIR ?
+ _PATH_DEV_LOOP "/%d" :
+ _PATH_DEV "loop%d",
+ lnum);
+
+ fd = open(ll->name, O_RDONLY);
+ if (fd == -1) {
+ if (errno == EACCES)
+ ll->ct_perm++;
+ return -1;
+ }
+ if (fstat(fd, &st) == -1)
+ goto error;
+ if (!S_ISBLK(st.st_mode) || major(st.st_rdev) != LOOPMAJOR)
+ goto error;
+
+ ll->ct_succ++;
+
+ /* check if the device is wanted */
+ if (!(ll->flag & (LLFLG_USEDONLY | LLFLG_FREEONLY)))
+ return fd;
+
+ used = is_loop_used(fd);
+
+ if ((ll->flag & LLFLG_USEDONLY) && used)
+ return fd;
+ if ((ll->flag & LLFLG_FREEONLY) && !used)
+ return fd;
+error:
+ close(fd);
+ return -1;
+}
+
+/* returns <N> from "loop<N>" */
+static int
+name2minor(int hasprefix, const char *name)
+{
+ int n;
+ char *end;
+
+ if (hasprefix) {
+ if (strncmp(name, "loop", 4))
+ return -1;
+ name += 4;
+ }
+ n = strtol(name, &end, 10);
+ if (end && end != name && *end == '\0' && n >= 0)
+ return n;
+ return -1;
+}
+
+static int
+cmpnum(const void *p1, const void *p2)
+{
+ return (* (int *) p1) > (* (int *) p2);
+}
+
+/*
+ * The classic scandir() is more expensive and less portable.
+ * We needn't full loop device names -- minor numers (loop<N>)
+ * are enough.
+ */
+static int
+loop_scandir(const char *dirname, int **ary, int hasprefix)
+{
+ DIR *dir;
+ struct dirent *d;
+ int n, count = 0, arylen = 0;
+
+ if (!dirname || !ary)
+ return -1;
+ dir = opendir(dirname);
+ if (!dir)
+ return -1;
+
+ *ary = NULL;
+
+ while((d = readdir(dir))) {
+ if (d->d_type != DT_BLK && d->d_type != DT_UNKNOWN && d->d_type != DT_LNK)
+ continue;
+ n = name2minor(hasprefix, d->d_name);
+ if (n == -1 || n < NLOOPS_DEFAULT)
+ continue;
+ if (count + 1 > arylen) {
+ arylen += 1;
+ *ary = *ary ? realloc(*ary, arylen * sizeof(int)) :
+ malloc(arylen * sizeof(int));
+ if (!*ary)
+ return -1;
+ }
+ (*ary)[count++] = n;
+ }
+ if (count)
+ qsort(*ary, count, sizeof(int), cmpnum);
+
+ closedir(dir);
+ return count;
+}
+
+static int
+looplist_next(struct looplist *ll)
+{
+ int fd, n;
+
+ if (ll->flag & LLFLG_DONE)
+ return -1;
+
+ /* A) Look for used loop devices in /proc/partitions ("losetup -a" only)
+ */
+ if (ll->flag & LLFLG_PROCFS) {
+ char buf[BUFSIZ];
+
+ if (!ll->proc)
+ ll->proc = fopen(_PATH_PROC_PARTITIONS, "r");
+
+ while (ll->proc && fgets(buf, sizeof(buf), ll->proc)) {
+ int m;
+ unsigned long long sz;
+ char name[128];
+
+ if (sscanf(buf, " %d %d %llu %128[^\n ]",
+ &m, &n, &sz, name) != 4)
+ continue;
+ if (m != LOOPMAJOR)
+ continue;
+ /* unfortunately, real minor numbers needn't to match
+ * loop<N> device name. We have to follow device name.
+ */
+ n = name2minor(1, name);
+ fd = looplist_open_dev(ll, n);
+ if (fd != -1)
+ return fd;
+ }
+ goto done;
+ }
+
+
+ /* B) Classic way, try first eight loop devices (default number
+ * of loop devices). This is enough for 99% of all cases.
+ */
+ if (ll->flag & LLFLG_DFLT) {
+ for (++ll->ncur; ll->ncur < NLOOPS_DEFAULT; ll->ncur++) {
+ fd = looplist_open_dev(ll, ll->ncur);
+ if (fd != -1)
+ return fd;
+ }
+ ll->flag &= ~LLFLG_DFLT;
+ }
+
+ /* C) the worst posibility, scan all /dev or /dev/loop
+ */
+ if (!ll->minors) {
+ ll->nminors = (ll->flag & LLFLG_SUBDIR) ?
+ loop_scandir(_PATH_DEV_LOOP, &ll->minors, 0) :
+ loop_scandir(_PATH_DEV, &ll->minors, 1);
+ ll->ncur = -1;
+ }
+ for (++ll->ncur; ll->ncur < ll->nminors; ll->ncur++) {
+ fd = looplist_open_dev(ll, ll->minors[ll->ncur]);
+ if (fd != -1)
+ return fd;
+ }
+
+done:
+ looplist_close(ll);
+ return -1;
+}
+
+#ifdef MAIN
+
+static int
+set_capacity(const char *device)
+{
+ int errsv;
+ int fd = open(device, O_RDONLY);
+
+ if (fd == -1)
+ goto err;
+
+ if (ioctl(fd, LOOP_SET_CAPACITY) != 0)
+ goto err;
+
+ return 0;
+err:
+ errsv = errno;
+ fprintf(stderr, _("loop: can't set capacity on device %s: %s\n"),
+ device, strerror (errsv));
+ if (fd != -1)
+ close(fd);
+ return 2;
+}
+
+static int
+show_loop_fd(int fd, char *device) {
+ struct loop_info loopinfo;
+ struct loop_info64 loopinfo64;
+ int errsv;
+
+ if (ioctl(fd, LOOP_GET_STATUS64, &loopinfo64) == 0) {
+
+ loopinfo64.lo_file_name[LO_NAME_SIZE-2] = '*';
+ loopinfo64.lo_file_name[LO_NAME_SIZE-1] = 0;
+ loopinfo64.lo_crypt_name[LO_NAME_SIZE-1] = 0;
+
+ printf("%s: [%04" PRIx64 "]:%" PRIu64 " (%s)",
+ device, loopinfo64.lo_device, loopinfo64.lo_inode,
+ loopinfo64.lo_file_name);
+
+ if (loopinfo64.lo_offset)
+ printf(_(", offset %" PRIu64 ), loopinfo64.lo_offset);
+
+ if (loopinfo64.lo_sizelimit)
+ printf(_(", sizelimit %" PRIu64 ), loopinfo64.lo_sizelimit);
+
+ if (loopinfo64.lo_encrypt_type ||
+ loopinfo64.lo_crypt_name[0]) {
+ char *e = (char *)loopinfo64.lo_crypt_name;
+
+ if (*e == 0 && loopinfo64.lo_encrypt_type == 1)
+ e = "XOR";
+ printf(_(", encryption %s (type %" PRIu32 ")"),
+ e, loopinfo64.lo_encrypt_type);
+ }
+ printf("\n");
+ return 0;
+ }
+
+ if (ioctl(fd, LOOP_GET_STATUS, &loopinfo) == 0) {
+ printf ("%s: [%04x]:%ld (%s)",
+ device, (unsigned int)loopinfo.lo_device, loopinfo.lo_inode,
+ loopinfo.lo_name);
+
+ if (loopinfo.lo_offset)
+ printf(_(", offset %d"), loopinfo.lo_offset);
+
+ if (loopinfo.lo_encrypt_type)
+ printf(_(", encryption type %d\n"),
+ loopinfo.lo_encrypt_type);
+
+ printf("\n");
+ return 0;
+ }
+
+ errsv = errno;
+ fprintf(stderr, _("loop: can't get info on device %s: %s\n"),
+ device, strerror (errsv));
+ return 1;
+}
+
+static int
+show_loop(char *device) {
+ int ret, fd;
+
+ if ((fd = open(device, O_RDONLY)) < 0) {
+ int errsv = errno;
+ fprintf(stderr, _("loop: can't open device %s: %s\n"),
+ device, strerror (errsv));
+ return 2;
+ }
+ ret = show_loop_fd(fd, device);
+ close(fd);
+ return ret;
+}
+
+
+static int
+show_used_loop_devices (void) {
+ struct looplist ll;
+ int fd;
+
+ if (looplist_open(&ll, LLFLG_USEDONLY) == -1) {
+ error(_("%s: /dev directory does not exist."), progname);
+ return 1;
+ }
+
+ while((fd = looplist_next(&ll)) != -1) {
+ show_loop_fd(fd, ll.name);
+ close(fd);
+ }
+ looplist_close(&ll);
+
+ if (!ll.ct_succ && ll.ct_perm) {
+ error(_("%s: no permission to look at /dev/loop%s<N>"), progname,
+ (ll.flag & LLFLG_SUBDIR) ? "/" : "");
+ return 1;
+ }
+ return 0;
+}
+
+/* list all associated loop devices */
+static int
+show_associated_loop_devices(char *filename, unsigned long long offset, int isoff)
+{
+ struct looplist ll;
+ struct stat filestat;
+ int fd;
+
+ if (stat(filename, &filestat) == -1) {
+ perror(filename);
+ return 1;
+ }
+
+ if (looplist_open(&ll, LLFLG_USEDONLY) == -1) {
+ error(_("%s: /dev directory does not exist."), progname);
+ return 1;
+ }
+
+ while((fd = looplist_next(&ll)) != -1) {
+ if (is_associated(fd, &filestat, offset, isoff) == 1)
+ show_loop_fd(fd, ll.name);
+ close(fd);
+ }
+ looplist_close(&ll);
+
+ return 0;
+}
+
+#endif /* MAIN */
+
+/* check if the loopfile is already associated with the same given
+ * parameters.
+ *
+ * returns: 0 unused / error
+ * 1 loop device already used
+ */
+static int
+is_associated(int dev, struct stat *file, unsigned long long offset, int isoff)
+{
+ struct loop_info64 linfo64;
+ struct loop_info64 linfo;
+ int ret = 0;
+
+ if (ioctl(dev, LOOP_GET_STATUS64, &linfo64) == 0) {
+ if (file->st_dev == linfo64.lo_device &&
+ file->st_ino == linfo64.lo_inode &&
+ (isoff == 0 || offset == linfo64.lo_offset))
+ ret = 1;
+
+ } else if (ioctl(dev, LOOP_GET_STATUS, &linfo) == 0) {
+ if (file->st_dev == linfo.lo_device &&
+ file->st_ino == linfo.lo_inode &&
+ (isoff == 0 || offset == linfo.lo_offset))
+ ret = 1;
+ }
+
+ return ret;
+}
+
+/* check if the loop file is already used with the same given
+ * parameters. We check for device no, inode and offset.
+ * returns: associated devname or NULL
+ */
+char *
+loopfile_used (const char *filename, unsigned long long offset) {
+ struct looplist ll;
+ char *devname = NULL;
+ struct stat filestat;
+ int fd;
+
+ if (stat(filename, &filestat) == -1) {
+ perror(filename);
+ return NULL;
+ }
+
+ if (looplist_open(&ll, LLFLG_USEDONLY) == -1) {
+ error(_("%s: /dev directory does not exist."), progname);
+ return NULL;
+ }
+
+ while((fd = looplist_next(&ll)) != -1) {
+ int res = is_associated(fd, &filestat, offset, 1);
+ close(fd);
+ if (res == 1) {
+ devname = xstrdup(ll.name);
+ break;
+ }
+ }
+ looplist_close(&ll);
+
+ return devname;
+}
+
+int
+loopfile_used_with(char *devname, const char *filename, unsigned long long offset)
+{
+ struct stat statbuf;
+ int fd, ret;
+
+ if (!is_loop_device(devname))
+ return 0;
+
+ if (stat(filename, &statbuf) == -1)
+ return 0;
+
+ fd = open(devname, O_RDONLY);
+ if (fd == -1)
+ return 0;
+
+ ret = is_associated(fd, &statbuf, offset, 1);
+ close(fd);
+ return ret;
+}
+
+char *
+find_unused_loop_device (void) {
+ struct looplist ll;
+ char *devname = NULL;
+ int fd;
+
+ if (looplist_open(&ll, LLFLG_FREEONLY) == -1) {
+ error(_("%s: /dev directory does not exist."), progname);
+ return NULL;
+ }
+
+ if ((fd = looplist_next(&ll)) != -1) {
+ close(fd);
+ devname = xstrdup(ll.name);
+ }
+ looplist_close(&ll);
+ if (devname)
+ return devname;
+
+ if (!ll.ct_succ && ll.ct_perm)
+ error(_("%s: no permission to look at /dev/loop%s<N>"), progname,
+ (ll.flag & LLFLG_SUBDIR) ? "/" : "");
+ else if (ll.ct_succ)
+ error(_("%s: could not find any free loop device"), progname);
+ else
+ error(_(
+ "%s: Could not find any loop device. Maybe this kernel "
+ "does not know\n"
+ " about the loop device? (If so, recompile or "
+ "`modprobe loop'.)"), progname);
+ return NULL;
+}
+
+/*
+ * A function to read the passphrase either from the terminal or from
+ * an open file descriptor.
+ */
+static char *
+xgetpass(int pfd, const char *prompt) {
+ char *pass;
+ int buflen, i;
+
+ if (pfd < 0) /* terminal */
+ return getpass(prompt);
+
+ pass = NULL;
+ buflen = 0;
+ for (i=0; ; i++) {
+ if (i >= buflen-1) {
+ /* we're running out of space in the buffer.
+ * Make it bigger: */
+ char *tmppass = pass;
+ buflen += 128;
+ pass = realloc(tmppass, buflen);
+ if (pass == NULL) {
+ /* realloc failed. Stop reading. */
+ error(_("Out of memory while reading passphrase"));
+ pass = tmppass; /* the old buffer hasn't changed */
+ break;
+ }
+ }
+ if (read(pfd, pass+i, 1) != 1 ||
+ pass[i] == '\n' || pass[i] == 0)
+ break;
+ }
+
+ if (pass == NULL)
+ return "";
+
+ pass[i] = 0;
+ return pass;
+}
+
+static int
+digits_only(const char *s) {
+ while (*s)
+ if (!isdigit(*s++))
+ return 0;
+ return 1;
+}
+
+/*
+ * return codes:
+ * 0 - success
+ * 1 - error
+ * 2 - error (EBUSY)
+ */
+int
+set_loop(const char *device, const char *file, unsigned long long offset,
+ unsigned long long sizelimit, const char *encryption, int pfd, int *options,
+ int keysz, int hash_pass) {
+ struct loop_info64 loopinfo64;
+ int fd, ffd, mode, i;
+ char *pass;
+ char *filename;
+
+ if (verbose) {
+ char *xdev = loopfile_used(file, offset);
+
+ if (xdev) {
+ printf(_("warning: %s is already associated with %s\n"),
+ file, xdev);
+ free(xdev);
+ }
+ }
+
+ mode = (*options & SETLOOP_RDONLY) ? O_RDONLY : O_RDWR;
+ if ((ffd = open(file, mode)) < 0) {
+ if (!(*options & SETLOOP_RDONLY) &&
+ (errno == EROFS || errno == EACCES))
+ ffd = open(file, mode = O_RDONLY);
+ if (ffd < 0) {
+ perror(file);
+ return 1;
+ }
+ if (verbose)
+ printf(_("warning: %s: is write-protected, using read-only.\n"),
+ file);
+ *options |= SETLOOP_RDONLY;
+ }
+ if ((fd = open(device, mode)) < 0) {
+ perror (device);
+ close(ffd);
+ return 1;
+ }
+ memset(&loopinfo64, 0, sizeof(loopinfo64));
+
+ if (!(filename = canonicalize(file)))
+ filename = (char *) file;
+ xstrncpy((char *)loopinfo64.lo_file_name, filename, LO_NAME_SIZE);
+
+ if (encryption && *encryption) {
+ if (digits_only(encryption)) {
+ loopinfo64.lo_encrypt_type = atoi(encryption);
+ } else {
+ loopinfo64.lo_encrypt_type = LO_CRYPT_CRYPTOAPI;
+ snprintf((char *)loopinfo64.lo_crypt_name, LO_NAME_SIZE,
+ "%s", encryption);
+ }
+ }
+
+ loopinfo64.lo_offset = offset;
+ loopinfo64.lo_sizelimit = sizelimit;
+
+#ifdef MCL_FUTURE
+ /*
+ * Oh-oh, sensitive data coming up. Better lock into memory to prevent
+ * passwd etc being swapped out and left somewhere on disk.
+ */
+ if (loopinfo64.lo_encrypt_type != LO_CRYPT_NONE) {
+ if(mlockall(MCL_CURRENT | MCL_FUTURE)) {
+ perror("memlock");
+ fprintf(stderr, _("Couldn't lock into memory, exiting.\n"));
+ exit(1);
+ }
+ }
+#endif
+
+
+ if (keysz==0)
+ keysz=LO_KEY_SIZE*8;
+ switch (loopinfo64.lo_encrypt_type) {
+ case LO_CRYPT_NONE:
+ loopinfo64.lo_encrypt_key_size = 0;
+ break;
+ case LO_CRYPT_XOR:
+ pass = getpass(_("Password: "));
+ memset(loopinfo64.lo_encrypt_key, 0, LO_KEY_SIZE);
+ xstrncpy((char *)loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE);
+ memset(pass, 0, strlen(pass));
+ loopinfo64.lo_encrypt_key_size = LO_KEY_SIZE;
+ break;
+#define HASHLENGTH 20
+#if 0
+ case LO_CRYPT_FISH2:
+ case LO_CRYPT_BLOW:
+ case LO_CRYPT_IDEA:
+ case LO_CRYPT_CAST128:
+ case LO_CRYPT_SERPENT:
+ case LO_CRYPT_MARS:
+ case LO_CRYPT_RC6:
+ case LO_CRYPT_3DES:
+ case LO_CRYPT_DFC:
+ case LO_CRYPT_RIJNDAEL:
+ {
+ char keybits[2*HASHLENGTH];
+ char *pass2;
+ int passwdlen;
+ int keylength;
+ int i;
+
+ pass = xgetpass(pfd, _("Password: "));
+ passwdlen=strlen(pass);
+ pass2=malloc(passwdlen+2);
+ pass2[0]='A';
+ strcpy(pass2+1,pass);
+ rmd160_hash_buffer(keybits,pass,passwdlen);
+ rmd160_hash_buffer(keybits+HASHLENGTH,pass2,passwdlen+1);
+ memcpy((char*)loopinfo64.lo_encrypt_key,keybits,2*HASHLENGTH);
+ memset(pass, 0, passwdlen);
+ memset(pass2, 0, passwdlen+1);
+ free(pass2);
+ keylength=0;
+ for(i=0; crypt_type_tbl[i].id != -1; i++){
+ if(loopinfo64.lo_encrypt_type == crypt_type_tbl[i].id){
+ keylength = crypt_type_tbl[i].keylength;
+ break;
+ }
+ }
+ loopinfo64.lo_encrypt_key_size=keylength;
+ break;
+ }
+#endif
+ default:
+ if (hash_pass) {
+ char keybits[2*HASHLENGTH];
+ char *pass2;
+ int passwdlen;
+
+ pass = xgetpass(pfd, _("Password: "));
+ passwdlen=strlen(pass);
+ pass2=malloc(passwdlen+2);
+ pass2[0]='A';
+ strcpy(pass2+1,pass);
+ rmd160_hash_buffer(keybits,pass,passwdlen);
+ rmd160_hash_buffer(keybits+HASHLENGTH,pass2,passwdlen+1);
+ memset(pass, 0, passwdlen);
+ memset(pass2, 0, passwdlen+1);
+ free(pass2);
+
+ memcpy((char*)loopinfo64.lo_encrypt_key,keybits,keysz/8);
+ loopinfo64.lo_encrypt_key_size = keysz/8;
+ } else {
+ pass = xgetpass(pfd, _("Password: "));
+ memset(loopinfo64.lo_encrypt_key, 0, LO_KEY_SIZE);
+ xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE);
+ memset(pass, 0, strlen(pass));
+ loopinfo64.lo_encrypt_key_size = LO_KEY_SIZE;
+ }
+ }
+
+ if (ioctl(fd, LOOP_SET_FD, ffd) < 0) {
+ int rc = 1;
+
+ if (errno == EBUSY) {
+ if (verbose)
+ printf(_("ioctl LOOP_SET_FD failed: %s\n"),
+ strerror(errno));
+ rc = 2;
+ } else
+ perror("ioctl: LOOP_SET_FD");
+
+ close(fd);
+ close(ffd);
+ if (file != filename)
+ free(filename);
+ return rc;
+ }
+ close (ffd);
+
+ if (*options & SETLOOP_AUTOCLEAR)
+ loopinfo64.lo_flags = LO_FLAGS_AUTOCLEAR;
+
+ i = ioctl(fd, LOOP_SET_STATUS64, &loopinfo64);
+ if (i) {
+ struct loop_info loopinfo;
+ int errsv = errno;
+
+ i = loop_info64_to_old(&loopinfo64, &loopinfo);
+ if (i) {
+ errno = errsv;
+ *options &= ~SETLOOP_AUTOCLEAR;
+ perror("ioctl: LOOP_SET_STATUS64");
+ } else {
+ i = ioctl(fd, LOOP_SET_STATUS, &loopinfo);
+ if (i)
+ perror("ioctl: LOOP_SET_STATUS");
+ }
+ memset(&loopinfo, 0, sizeof(loopinfo));
+ }
+
+ if ((*options & SETLOOP_AUTOCLEAR) && !is_loopfd_autoclear(fd))
+ /* kernel doesn't support loop auto-destruction */
+ *options &= ~SETLOOP_AUTOCLEAR;
+
+ memset(&loopinfo64, 0, sizeof(loopinfo64));
+
+ if (i) {
+ ioctl (fd, LOOP_CLR_FD, 0);
+ close (fd);
+ if (file != filename)
+ free(filename);
+ return 1;
+ }
+
+ /*
+ * HACK: here we're leeking a file descriptor,
+ * but mount is a short-lived process anyway.
+ */
+ if (!(*options & SETLOOP_AUTOCLEAR))
+ close (fd);
+
+ if (verbose > 1)
+ printf(_("set_loop(%s,%s,%llu,%llu): success\n"),
+ device, filename, offset, sizelimit);
+ if (file != filename)
+ free(filename);
+ return 0;
+}
+
+int
+del_loop (const char *device) {
+ int fd, errsv;
+
+ if ((fd = open (device, O_RDONLY)) < 0) {
+ errsv = errno;
+ goto error;
+ }
+ if (ioctl (fd, LOOP_CLR_FD, 0) < 0) {
+ errsv = errno;
+ goto error;
+ }
+ close (fd);
+ if (verbose > 1)
+ printf(_("del_loop(%s): success\n"), device);
+ return 0;
+
+error:
+ fprintf(stderr, _("loop: can't delete device %s: %s\n"),
+ device, strerror(errsv));
+ if (fd >= 0)
+ close(fd);
+ return 1;
+}
+
+#else /* no LOOP_SET_FD defined */
+static void
+mutter(void) {
+ fprintf(stderr,
+ _("This mount was compiled without loop support. "
+ "Please recompile.\n"));
+}
+
+int
+set_loop(const char *device, const char *file, unsigned long long offset,
+ unsigned long long sizelimit, const char *encryption, int pfd, int *options,
+ int keysz, int hash_pass) {
+ mutter();
+ return 1;
+}
+
+int
+del_loop (const char *device) {
+ mutter();
+ return 1;
+}
+
+char *
+find_unused_loop_device (void) {
+ mutter();
+ return 0;
+}
+
+#endif /* !LOOP_SET_FD */
+
+#ifdef MAIN
+
+#ifdef LOOP_SET_FD
+
+#include <getopt.h>
+#include <stdarg.h>
+
+static void
+usage(void) {
+ fprintf(stderr, _("\nUsage:\n"
+ " %1$s loop_device give info\n"
+ " %1$s -a | --all list all used\n"
+ " %1$s -d | --detach <loopdev> [<loopdev> ...] delete\n"
+ " %1$s -f | --find find unused\n"
+ " %1$s -c | --set-capacity <loopdev> resize\n"
+ " %1$s -j | --associated <file> [-o <num>] list all associated with <file>\n"
+ " %1$s [ options ] {-f|--find|loopdev} <file> setup\n"),
+ progname);
+
+ fprintf(stderr, _("\nOptions:\n"
+ " -e | --encryption <type> enable data encryption with specified <name/num>\n"
+ " -h | --help this help\n"
+ " -o | --offset <num> start at offset <num> into file\n"
+ " --sizelimit <num> loop limited to only <num> bytes of the file\n"
+ " -p | --pass-fd <num> read passphrase from file descriptor <num>\n"
+ " -r | --read-only setup read-only loop device\n"
+ " --show print device name (with -f <file>)\n"
+ " -N | --nohashpass Do not hash the given password (Debian hashes)\n"
+ " -k | --keybits <num> specify number of bits in the hashed key given\n"
+ " to the cipher. Some ciphers support several key\n"
+ " sizes and might be more efficient with a smaller\n"
+ " key size. Key sizes < 128 are generally not\n"
+ " recommended\n"
+ " -v | --verbose verbose mode\n\n"));
+ exit(1);
+ }
+
+int
+main(int argc, char **argv) {
+ char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc;
+ char *keysize;
+ int delete, find, c, all, capacity;
+ int res = 0;
+ int showdev = 0;
+ int ro = 0;
+ int pfd = -1;
+ int keysz = 0;
+ int hash_pass = 1;
+ unsigned long long off, slimit;
+ struct option longopts[] = {
+ { "all", 0, 0, 'a' },
+ { "set-capacity", 0, 0, 'c' },
+ { "detach", 0, 0, 'd' },
+ { "encryption", 1, 0, 'e' },
+ { "find", 0, 0, 'f' },
+ { "help", 0, 0, 'h' },
+ { "keybits", 1, 0, 'k' },
+ { "nopasshash", 0, 0, 'N' },
+ { "nohashpass", 0, 0, 'N' },
+ { "associated", 1, 0, 'j' },
+ { "offset", 1, 0, 'o' },
+ { "sizelimit", 1, 0, 128 },
+ { "pass-fd", 1, 0, 'p' },
+ { "read-only", 0, 0, 'r' },
+ { "show", 0, 0, 's' },
+ { "verbose", 0, 0, 'v' },
+ { NULL, 0, 0, 0 }
+ };
+
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
+ capacity = delete = find = all = 0;
+ off = 0;
+ slimit = 0;
+ assoc = offset = sizelimit = encryption = passfd = NULL;
+ keysize = NULL;
+
+ progname = argv[0];
+ if ((p = strrchr(progname, '/')) != NULL)
+ progname = p+1;
+
+ while ((c = getopt_long(argc, argv, "acde:E:fhj:k:No:p:rsv",
+ longopts, NULL)) != -1) {
+ switch (c) {
+ case 'a':
+ all = 1;
+ break;
+ case 'c':
+ capacity = 1;
+ break;
+ case 'r':
+ ro = 1;
+ break;
+ case 'd':
+ delete = 1;
+ break;
+ case 'E':
+ case 'e':
+ encryption = optarg;
+ break;
+ case 'f':
+ find = 1;
+ break;
+ case 'j':
+ assoc = optarg;
+ case 'k':
+ keysize = optarg;
+ break;
+ case 'N':
+ hash_pass = 0;
+ break;
+ case 'o':
+ offset = optarg;
+ break;
+ case 'p':
+ passfd = optarg;
+ break;
+ case 's':
+ showdev = 1;
+ break;
+ case 'v':
+ verbose = 1;
+ break;
+
+ case 128: /* --sizelimit */
+ sizelimit = optarg;
+ break;
+
+ default:
+ usage();
+ }
+ }
+
+ if (argc == 1) {
+ usage();
+ } else if (delete) {
+ if (argc < optind+1 || encryption || offset || sizelimit ||
+ capacity || find || all || showdev || assoc || ro)
+ usage();
+ } else if (find) {
+ if (capacity || all || assoc || argc < optind || argc > optind+1)
+ usage();
+ } else if (all) {
+ if (argc > 2)
+ usage();
+ } else if (assoc) {
+ if (capacity || encryption || showdev || passfd || ro)
+ usage();
+ } else if (capacity) {
+ if (argc != optind + 1 || encryption || offset || sizelimit ||
+ showdev || ro)
+ usage();
+ } else {
+ if (argc < optind+1 || argc > optind+2)
+ usage();
+ }
+
+ if (offset && sscanf(offset, "%llu", &off) != 1)
+ usage();
+
+ if (sizelimit && sscanf(sizelimit, "%llu", &slimit) != 1)
+ usage();
+
+ if (all)
+ return show_used_loop_devices();
+ else if (assoc)
+ return show_associated_loop_devices(assoc, off, offset ? 1 : 0);
+ else if (find) {
+ device = find_unused_loop_device();
+ if (device == NULL)
+ return -1;
+ if (argc == optind) {
+ if (verbose)
+ printf(_("Loop device is %s\n"), device);
+ printf("%s\n", device);
+ return 0;
+ }
+ file = argv[optind];
+ } else if (!delete) {
+ device = argv[optind];
+ if (argc == optind+1)
+ file = NULL;
+ else
+ file = argv[optind+1];
+ }
+
+ if (delete) {
+ while (optind < argc)
+ res += del_loop(argv[optind++]);
+ } else if (capacity) {
+ res = set_capacity(device);
+ } else if (file == NULL)
+ res = show_loop(device);
+ else {
+ if (passfd && sscanf(passfd, "%d", &pfd) != 1)
+ usage();
+ if (keysize && sscanf(keysize,"%d",&keysz) != 1)
+ usage();
+ do {
+ res = set_loop(device, file, off, slimit, encryption, pfd, &ro, keysz, hash_pass);
+ if (res == 2 && find) {
+ if (verbose)
+ printf(_("stolen loop=%s...trying again\n"),
+ device);
+ free(device);
+ if (!(device = find_unused_loop_device()))
+ return -1;
+ }
+ } while (find && res == 2);
+
+ if (device) {
+ if (res == 2)
+ error(_("%s: %s: device is busy"), progname, device);
+ else if (res == 0) {
+ if (verbose)
+ printf(_("Loop device is %s\n"), device);
+ if (showdev && find)
+ printf("%s\n", device);
+ }
+ }
+ }
+ return res;
+}
+
+#else /* LOOP_SET_FD not defined */
+
+int
+main(int argc, char **argv) {
+ fprintf(stderr,
+ _("No loop support was available at compile time. "
+ "Please recompile.\n"));
+ return -1;
+}
+#endif /* !LOOP_SET_FD*/
+#endif /* MAIN */
diff --git a/mount/lomount.h b/mount/lomount.h
new file mode 100644
index 0000000..d24d8b6
--- /dev/null
+++ b/mount/lomount.h
@@ -0,0 +1,12 @@
+extern int set_loop(const char *, const char *, unsigned long long, unsigned long long,
+ const char *, int, int *, int, int);
+extern int del_loop(const char *);
+extern int is_loop_device(const char *);
+extern int is_loop_autoclear(const char *device);
+extern char * find_unused_loop_device(void);
+
+extern int loopfile_used_with(char *devname, const char *filename, unsigned long long offset);
+extern char *loopfile_used (const char *filename, unsigned long long offset);
+
+#define SETLOOP_RDONLY (1<<0) /* Open loop read-only */
+#define SETLOOP_AUTOCLEAR (1<<1) /* Automatically detach loop on close (2.6.25?) */
diff --git a/mount/loop.h b/mount/loop.h
new file mode 100644
index 0000000..64df339
--- /dev/null
+++ b/mount/loop.h
@@ -0,0 +1,69 @@
+#ifndef MNT_LOOP_H
+#define MNT_LOOP_H
+
+#include <linux/posix_types.h>
+#include <stdint.h>
+#include "linux_version.h"
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,68)
+#define my_dev_t __kernel_dev_t
+#else
+#define my_dev_t __kernel_old_dev_t
+#endif
+
+#define LO_CRYPT_NONE 0
+#define LO_CRYPT_XOR 1
+#define LO_CRYPT_DES 2
+#define LO_CRYPT_CRYPTOAPI 18
+
+#define LOOP_SET_FD 0x4C00
+#define LOOP_CLR_FD 0x4C01
+#define LOOP_SET_STATUS 0x4C02
+#define LOOP_GET_STATUS 0x4C03
+#define LOOP_SET_STATUS64 0x4C04
+#define LOOP_GET_STATUS64 0x4C05
+/* #define LOOP_CHANGE_FD 0x4C06 */
+#define LOOP_SET_CAPACITY 0x4C07
+
+/* Flags for loop_into{64,}->lo_flags */
+enum {
+ LO_FLAGS_READ_ONLY = 1,
+ LO_FLAGS_USE_AOPS = 2,
+ LO_FLAGS_AUTOCLEAR = 4, /* New in 2.6.25 */
+};
+
+#define LO_NAME_SIZE 64
+#define LO_KEY_SIZE 32
+
+struct loop_info {
+ int lo_number;
+ my_dev_t lo_device;
+ unsigned long lo_inode;
+ my_dev_t lo_rdevice;
+ int lo_offset;
+ int lo_encrypt_type;
+ int lo_encrypt_key_size;
+ int lo_flags;
+ char lo_name[LO_NAME_SIZE];
+ unsigned char lo_encrypt_key[LO_KEY_SIZE];
+ unsigned long lo_init[2];
+ char reserved[4];
+};
+
+struct loop_info64 {
+ uint64_t lo_device;
+ uint64_t lo_inode;
+ uint64_t lo_rdevice;
+ uint64_t lo_offset;
+ uint64_t lo_sizelimit; /* bytes, 0 == max available */
+ uint32_t lo_number;
+ uint32_t lo_encrypt_type;
+ uint32_t lo_encrypt_key_size;
+ uint32_t lo_flags;
+ uint8_t lo_file_name[LO_NAME_SIZE];
+ uint8_t lo_crypt_name[LO_NAME_SIZE];
+ uint8_t lo_encrypt_key[LO_KEY_SIZE];
+ uint64_t lo_init[2];
+};
+
+#endif /* MNT_LOOP_H */
diff --git a/mount/losetup.8 b/mount/losetup.8
new file mode 100644
index 0000000..f42afe5
--- /dev/null
+++ b/mount/losetup.8
@@ -0,0 +1,185 @@
+.TH LOSETUP 8 "2003-07-01" "Linux" "MAINTENANCE COMMANDS"
+.SH NAME
+losetup \- set up and control loop devices
+.SH SYNOPSIS
+.ad l
+Get info:
+.sp
+.in +5
+.B losetup
+.I loopdev
+.sp
+.B losetup -a
+.sp
+.B losetup -j
+.I file
+.RB [ \-o
+.IR offset ]
+.sp
+.in -5
+Delete loop:
+.sp
+.in +5
+.B "losetup \-d"
+.IR loopdev ...
+.sp
+.in -5
+Print name of first unused loop device:
+.sp
+.in +5
+.B "losetup \-f"
+.sp
+.in -5
+Setup loop device:
+.sp
+.in +5
+.B losetup
+.RB [{ \-e | \-E }
+.IR encryption ]
+.RB [ \-o
+.IR offset ]
+.RB [ \-\-sizelimit
+.IR limit ]
+.in +8
+.RB [ \-p
+.IR pfd ]
+.RB [ \-r ]
+.RB { \-f [ \-\-show ]| \fIloopdev\fP }
+.I file
+.sp
+.in -13
+Resize loop device:
+.sp
+.in +5
+.B "losetup \-c"
+.I loopdev
+.in -5
+.ad b
+.SH DESCRIPTION
+.B losetup
+is used to associate loop devices with regular files or block devices,
+to detach loop devices and to query the status of a loop device. If only the
+\fIloopdev\fP argument is given, the status of the corresponding loop
+device is shown.
+
+.SS "Encryption"
+It is possible to specify transfer functions (for encryption/decryption
+or other purposes) using one of the
+.B \-E
+and
+.B \-e
+options.
+There are two mechanisms to specify the desired encryption: by number
+and by name. If an encryption is specified by number then one
+has to make sure that the Linux kernel knows about the encryption with that
+number, probably by patching the kernel. Standard numbers that are
+always present are 0 (no encryption) and 1 (XOR encryption).
+When the cryptoloop module is loaded (or compiled in), it uses number 18.
+This cryptoloop module will take the name of an arbitrary encryption type
+and find the module that knows how to perform that encryption.
+.SH OPTIONS
+.IP "\fB\-a, \-\-all\fP"
+show status of all loop devices
+.IP "\fB\-c, \-\-set-capacity\fP \fIloopdev\fP
+force loop driver to reread size of the file associated with the specified loop device
+.IP "\fB\-d, \-\-detach\fP \fIloopdev\fP..."
+detach the file or device associated with the specified loop device(s)
+.IP "\fB\-e, \-E, \-\-encryption \fIencryption_type\fP"
+enable data encryption with specified name or number
+.IP "\fB\-f, \-\-find\fP"
+find the first unused loop device. If a
+.I file
+argument is present, use this device. Otherwise, print its name
+.IP "\fB\-h, \-\-help\fP"
+print help
+.IP "\fB\-j, \-\-associated \fIfile\fP"
+show status of all loop devices associated with given
+.I file
+.IP "\fB\-k, \-\-keybits \fInum\fP"
+set the number of bits to use in key to \fInum\fP.
+.IP "\fB\-N, \-\-nohashpass\fP"
+Do not hash the password. By default, Debian systems run the password through a
+hash function, non-Debian systems tend not to.
+.IP "\fB\-o, \-\-offset \fIoffset\fP"
+the data start is moved \fIoffset\fP bytes into the specified file or
+device
+.IP "\fB\-\-sizelimit \fIlimit\fP"
+the data end is set to no more than \fIsizelimit\fP bytes after the data start
+.IP "\fB\-p, \-\-pass-fd \fInum\fP"
+read the passphrase from file descriptor with number
+.I num
+instead of from the terminal
+.IP "\fB\-r, \-\-read-only\fP"
+setup read-only loop device
+.IP "\fB\-\-show\fP"
+print device name if the
+.I -f
+option and a
+.I file
+argument are present.
+
+The short form of this option (\fB\-s\fP) is deprecated. This short form could
+be in collision with Loop-AES implementation where the same option is used for
+\fB\-\-sizelimit\fP.
+.IP "\fB\-v, \-\-verbose\fP"
+verbose mode
+
+.SH RETURN VALUE
+.B losetup
+returns 0 on success, nonzero on failure. When
+.B losetup
+displays the status of a loop device, it returns 1 if the device
+is not configured and 2 if an error occurred which prevented
+.B losetup
+from determining the status of the device.
+
+.SH FILES
+.nf
+/dev/loop0, /dev/loop1, ... loop devices (major=7)
+.fi
+.SH EXAMPLE
+If you are using the loadable module you must have the module loaded
+first with the command
+.IP
+# modprobe loop
+.LP
+Maybe also encryption modules are needed.
+.IP
+# modprobe des
+# modprobe cryptoloop
+.LP
+The following commands can be used as an example of using the loop device.
+.nf
+.IP
+# dd if=/dev/zero of=/file bs=1k count=100
+# losetup -e des /dev/loop0 /file
+Password:
+Init (up to 16 hex digits):
+# mkfs -t ext2 /dev/loop0 100
+# mount -t ext2 /dev/loop0 /mnt
+ ...
+# umount /dev/loop0
+# losetup -d /dev/loop0
+.fi
+.LP
+If you are using the loadable module you may remove the module with
+the command
+.IP
+# rmmod loop
+.LP
+.fi
+.SH RESTRICTION
+DES encryption is painfully slow. On the other hand, XOR is terribly weak.
+Both are insecure nowadays. Some ciphers may require a licence for you to be
+allowed to use them.
+
+Cryptoloop is deprecated in favor of dm-crypt. For more details see
+.BR cryptsetup (8).
+.SH AVAILABILITY
+The losetup command is part of the util-linux-ng package and is available from
+ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
+.\" .SH AUTHORS
+.\" .nf
+.\" Original version: Theodore Ts'o <tytso@athena.mit.edu>
+.\" Original DES by: Eric Young <eay@psych.psy.uq.oz.au>
+.\" .fi
diff --git a/mount/mount.8 b/mount/mount.8
new file mode 100644
index 0000000..d64aa2b
--- /dev/null
+++ b/mount/mount.8
@@ -0,0 +1,2614 @@
+.\" Copyright (c) 1996-2004 Andries Brouwer
+.\"
+.\" This page is somewhat derived from a page that was
+.\" (c) 1980, 1989, 1991 The Regents of the University of California
+.\" and had been heavily modified by Rik Faith and myself.
+.\" (Probably no BSD text remains.)
+.\" Fragments of text were written by Werner Almesberger, Remy Card,
+.\" Stephen Tweedie and Eric Youngdale.
+.\"
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, write to the Free
+.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
+.\" USA.
+.\"
+.\" 960705, aeb: version for mount-2.7g
+.\" 970114, aeb: xiafs and ext are dead; romfs is new
+.\" 970623, aeb: -F option
+.\" 970914, reg: -s option
+.\" 981111, K.Garloff: /etc/filesystems
+.\" 990111, aeb: documented /sbin/mount.smbfs
+.\" 990730, Yann Droneaud <lch@multimania.com>: updated page
+.\" 991214, Elrond <Elrond@Wunder-Nett.org>: added some docs on devpts
+.\" 010714, Michael K. Johnson <johnsonm@redhat.com> added -O
+.\" 010725, Nikita Danilov <NikitaDanilov@Yahoo.COM>: reiserfs options
+.\" 011124, Karl Eichwalder <ke@gnu.franken.de>: tmpfs options
+.\"
+.TH MOUNT 8 "2004-12-16" "Linux 2.6" "Linux Programmer's Manual"
+.SH NAME
+mount \- mount a filesystem
+.SH SYNOPSIS
+.B mount
+.RB [ \-lhV ]
+.LP
+.BI "mount \-a
+.RB [ \-fFnrsvw ]
+.RB [ \-t
+.IR vfstype ]
+.RB [ \-O
+.IR optlist ]
+.LP
+.B mount
+.RB [ \-fnrsvw ]
+.RB [ \-o
+.IR option [ \fB,\fPoption ]...]
+.IR device | dir
+.LP
+.B mount
+.RB [ \-fnrsvw ]
+.RB [ \-t
+.IB vfstype ]
+.RB [ \-o
+.IR options ]
+.I device dir
+.SH DESCRIPTION
+All files accessible in a Unix system are arranged in one big
+tree, the file hierarchy, rooted at
+.BR / .
+These files can be spread out over several devices. The
+.B mount
+command serves to attach the filesystem found on some device
+to the big file tree. Conversely, the
+.BR umount (8)
+command will detach it again.
+
+The standard form of the
+.B mount
+command, is
+.RS
+
+.br
+.BI "mount \-t" " type device dir"
+.br
+
+.RE
+This tells the kernel to attach the filesystem found on
+.I device
+(which is of type
+.IR type )
+at the directory
+.IR dir .
+The previous contents (if any) and owner and mode of
+.I dir
+become invisible, and as long as this filesystem remains mounted,
+the pathname
+.I dir
+refers to the root of the filesystem on
+.IR device .
+
+.B The listing and help.
+.RS
+Three forms of invocation do not actually mount anything:
+.TP
+.B "mount \-h"
+prints a help message
+.TP
+.B "mount \-V"
+prints a version string
+.TP
+.BR "mount " [ -l "] [" "-t \fItype\fP" ]
+lists all mounted filesystems (of type
+.IR type ).
+The option \-l adds the labels in this listing.
+See below.
+.RE
+
+.B The bind mounts.
+.RS
+.\" In fact since 2.3.99. At first the syntax was mount -t bind.
+Since Linux 2.4.0 it is possible to remount part of the
+file hierarchy somewhere else. The call is
+.RS
+.br
+.B mount --bind
+.I olddir newdir
+.RE
+or shortoption
+.RS
+.br
+.B mount -B
+.I olddir newdir
+.RE
+or fstab entry is:
+.RS
+.br
+.I /olddir
+.I /newdir
+.B none bind
+.RE
+
+After this call the same contents is accessible in two places.
+One can also remount a single file (on a single file).
+
+This call attaches only (part of) a single filesystem, not possible
+submounts. The entire file hierarchy including submounts is attached
+a second place using
+.RS
+.br
+.B mount --rbind
+.I olddir newdir
+.RE
+or shortoption
+.RS
+.br
+.B mount -R
+.I olddir newdir
+.RE
+.\" available since Linux 2.4.11.
+
+Note that the filesystem mount options will remain the same as those
+on the original mount point, and cannot be changed by passing the -o
+option along with --bind/--rbind.
+.RE
+
+.B The move operation.
+.RS
+Since Linux 2.5.1 it is possible to atomically move a mounted tree
+to another place. The call is
+.RS
+.br
+.B mount --move
+.I olddir newdir
+.RE
+or shortoption
+.RS
+.br
+.B mount -M
+.I olddir newdir
+.RE
+.RE
+
+.B The shared subtrees operations.
+.RS
+Since Linux 2.6.15 it is possible to mark a mount and its submounts as shared,
+private, slave or unbindable. A shared mount provides ability to create mirrors
+of that mount such that mounts and umounts within any of the mirrors propagate
+to the other mirror. A slave mount receives propagation from its master, but
+any not vice-versa. A private mount carries no propagation abilities. A
+unbindable mount is a private mount which cannot cloned through a bind
+operation. Detailed semantics is documented in Documentation/sharedsubtree.txt
+file in the kernel source tree.
+
+.RS
+.nf
+.BI "mount --make-shared " mountpoint
+.BI "mount --make-slave " mountpoint
+.BI "mount --make-private " mountpoint
+.BI "mount --make-unbindable " mountpoint
+.fi
+.RE
+
+The following commands allows one to recursively change the type of all the
+mounts under a given mountpoint.
+
+.RS
+.nf
+.BI "mount --make-rshared " mountpoint
+.BI "mount --make-rslave " mountpoint
+.BI "mount --make-rprivate " mountpoint
+.BI "mount --make-runbindable " mountpoint
+.fi
+.RE
+.RE
+.RE
+
+.B The device indication.
+.RS
+Most devices are indicated by a file name (of a block special device), like
+.IR /dev/sda1 ,
+but there are other possibilities. For example, in the case of an NFS mount,
+.I device
+may look like
+.IR knuth.cwi.nl:/dir .
+It is possible to indicate a block special device using its
+volume
+.B LABEL
+or
+.B UUID
+(see the \-L and \-U options below).
+
+.B The device indication.
+.RS
+Most devices are indicated by a file name (of a block special device), like
+.IR /dev/sda1 ,
+but there are other possibilities. For example, in the case of an NFS mount,
+.I device
+may look like
+.IR knuth.cwi.nl:/dir .
+It is possible to indicate a block special device using its
+volume
+.B LABEL
+or
+.B UUID
+(see the \-L and \-U options below).
+
+The
+.I proc
+filesystem is not associated with a special device, and when
+mounting it, an arbitrary keyword, such as
+.I proc
+can be used instead of a device specification.
+(The customary choice
+.I none
+is less fortunate: the error message `none busy' from
+.B umount
+can be confusing.)
+.RE
+
+.B The /etc/fstab, /etc/mtab and /proc/mounts files.
+.RS
+The file
+.I /etc/fstab
+(see
+.BR fstab (5)),
+may contain lines describing what devices are usually
+mounted where, using which options.
+.LP
+The command
+.RS
+.sp
+.B mount \-a
+.RB [ \-t
+.IR type ]
+.RB [ \-O
+.IR optlist ]
+.sp
+.RE
+(usually given in a bootscript) causes all filesystems mentioned in
+.I fstab
+(of the proper type and/or having or not having the proper options)
+to be mounted as indicated, except for those whose line contains the
+.B noauto
+keyword. Adding the
+.B \-F
+option will make mount fork, so that the
+filesystems are mounted simultaneously.
+.LP
+When mounting a filesystem mentioned in
+.IR fstab
+or
+.IR mtab ,
+it suffices to give only the device, or only the mount point.
+
+
+The programs
+.B mount
+and
+.B umount
+maintain a list of currently mounted filesystems in the file
+.IR /etc/mtab .
+If no arguments are given to
+.BR mount ,
+this list is printed.
+
+When the
+.I proc
+filesystem is mounted (say at
+.IR /proc ),
+the files
+.I /etc/mtab
+and
+.I /proc/mounts
+have very similar contents. The former has somewhat
+more information, such as the mount options used,
+but is not necessarily up-to-date (cf. the
+.B \-n
+option below). It is possible to replace
+.I /etc/mtab
+by a symbolic link to
+.IR /proc/mounts ,
+and especially when you have very large numbers of mounts
+things will be much faster with that symlink,
+but some information is lost that way, and in particular
+working with the loop device will be less convenient,
+and using the "user" option will fail.
+.RE
+
+.B The non-superuser mounts.
+.RS
+Normally, only the superuser can mount filesystems.
+However, when
+.I fstab
+contains the
+.B user
+option on a line, anybody can mount the corresponding system.
+.LP
+Thus, given a line
+.RS
+.sp
+.B "/dev/cdrom /cd iso9660 ro,user,noauto,unhide"
+.sp
+.RE
+any user can mount the iso9660 filesystem found on his CDROM
+using the command
+.RS
+.sp
+.B "mount /dev/cdrom"
+.sp
+.RE
+or
+.RS
+.sp
+.B "mount /cd"
+.sp
+.RE
+For more details, see
+.BR fstab (5).
+Only the user that mounted a filesystem can unmount it again.
+If any user should be able to unmount, then use
+.B users
+instead of
+.B user
+in the
+.I fstab
+line.
+The
+.B owner
+option is similar to the
+.B user
+option, with the restriction that the user must be the owner
+of the special file. This may be useful e.g. for
+.I /dev/fd
+if a login script makes the console user owner of this device.
+The
+.B group
+option is similar, with the restriction that the user must be
+member of the group of the special file.
+.RE
+
+.SH COMMAND LINE OPTIONS
+The full set of mount options used by an invocation of
+.B mount
+is determined by first extracting the
+mount options for the filesystem from the
+.I fstab
+table, then applying any options specified by the
+.B \-o
+argument, and finally applying a
+.BR \-r " or " \-w
+option, when present.
+
+Command line options available for the
+.B mount
+command:
+.TP
+.B \-V
+Output version.
+.TP
+.B \-h
+Print a help message.
+.TP
+.B \-v
+Verbose mode.
+.TP
+.B \-a
+Mount all filesystems (of the given types) mentioned in
+.IR fstab .
+.TP
+.B \-F
+(Used in conjunction with
+.BR \-a .)
+Fork off a new incarnation of mount for each device.
+This will do the mounts on different devices or different NFS servers
+in parallel.
+This has the advantage that it is faster; also NFS timeouts go in
+parallel. A disadvantage is that the mounts are done in undefined order.
+Thus, you cannot use this option if you want to mount both
+.I /usr
+and
+.IR /usr/spool .
+.TP
+.B \-f
+Causes everything to be done except for the actual system call; if it's not
+obvious, this ``fakes'' mounting the filesystem. This option is useful in
+conjunction with the
+.B \-v
+flag to determine what the
+.B mount
+command is trying to do. It can also be used to add entries for devices
+that were mounted earlier with the -n option. The -f option checks for
+existing record in /etc/mtab and fails when the record already
+exists (with regular non-fake mount, this check is done by kernel).
+.TP
+.B \-i
+Don't call the /sbin/mount.<filesystem> helper even if it exists.
+.TP
+.B \-l
+Add the labels in the mount output. Mount must have
+permission to read the disk device (e.g. be suid root) for this to work.
+One can set such a label for ext2, ext3 or ext4 using the
+.BR e2label (8)
+utility, or for XFS using
+.BR xfs_admin (8),
+or for reiserfs using
+.BR reiserfstune (8).
+.TP
+.B \-n
+Mount without writing in
+.IR /etc/mtab .
+This is necessary for example when
+.I /etc
+is on a read-only filesystem.
+.TP
+.BI \-p " num"
+In case of a loop mount with encryption, read the passphrase from
+file descriptor
+.I num
+instead of from the terminal.
+.TP
+.B \-s
+Tolerate sloppy mount options rather than failing. This will ignore
+mount options not supported by a filesystem type. Not all filesystems
+support this option. This option exists for support of the Linux
+autofs\-based automounter.
+.TP
+.B \-r
+Mount the filesystem read-only. A synonym is
+.BR "\-o ro" .
+
+Note that, depending on the filesystem type, state and kernel behavior, the
+system may still write to the device. For example, Ext3 or ext4 will replay its
+journal if the filesystem is dirty. To prevent this kind of write access, you
+may want to mount ext3 or ext4 filesystem with "ro,noload" mount options or
+set the block device to read-only mode, see command
+.BR blockdev (8).
+.TP
+.B \-w
+Mount the filesystem read/write. This is the default. A synonym is
+.BR "\-o rw" .
+.TP
+.BI \-L " label"
+Mount the partition that has the specified
+.IR label .
+.TP
+.BI \-U " uuid"
+Mount the partition that has the specified
+.IR uuid .
+These two options require the file
+.I /proc/partitions
+(present since Linux 2.1.116) to exist.
+.TP
+.BI \-t " vfstype"
+The argument following the
+.B \-t
+is used to indicate the filesystem type. The filesystem types which are
+currently supported include:
+.IR adfs ,
+.IR affs ,
+.IR autofs ,
+.IR cifs ,
+.IR coda ,
+.IR coherent ,
+.IR cramfs ,
+.IR debugfs ,
+.IR devpts ,
+.IR efs ,
+.IR ext ,
+.IR ext2 ,
+.IR ext3 ,
+.IR ext4 ,
+.IR hfs ,
+.IR hfsplus ,
+.IR hpfs ,
+.IR iso9660 ,
+.IR jfs ,
+.IR minix ,
+.IR msdos ,
+.IR ncpfs ,
+.IR nfs ,
+.IR nfs4 ,
+.IR ntfs ,
+.IR proc ,
+.IR qnx4 ,
+.IR ramfs ,
+.IR reiserfs ,
+.IR romfs ,
+.IR smbfs ,
+.IR sysv ,
+.IR tmpfs ,
+.IR udf ,
+.IR ufs ,
+.IR umsdos ,
+.IR usbfs ,
+.IR vfat ,
+.IR xenix ,
+.IR xfs ,
+.IR xiafs .
+Note that coherent, sysv and xenix are equivalent and that
+.I xenix
+and
+.I coherent
+will be removed at some point in the future \(em use
+.I sysv
+instead. Since kernel version 2.1.21 the types
+.I ext
+and
+.I xiafs
+do not exist anymore. Earlier,
+.I usbfs
+was known as
+.IR usbdevfs .
+Note, the real list of all supported filesystems depends on your
+kernel.
+
+For most types all the
+.B mount
+program has to do is issue a simple
+.IR mount (2)
+system call, and no detailed knowledge of the filesystem type is required.
+For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) ad hoc code is
+necessary. The nfs, nfs4, cifs, smbfs, and ncpfs filesystems
+have a separate mount program. In order to make it possible to
+treat all types in a uniform way, mount will execute the program
+.BI /sbin/mount. TYPE
+(if that exists) when called with type
+.IR TYPE .
+Since various versions of the
+.B smbmount
+program have different calling conventions,
+.B /sbin/mount.smbfs
+may have to be a shell script that sets up the desired call.
+
+If no
+.B \-t
+option is given, or if the
+.B auto
+type is specified, mount will try to guess the desired type.
+Mount uses the blkid or volume_id library for guessing the filesystem
+type; if that does not turn up anything that looks familiar,
+mount will try to read the file
+.IR /etc/filesystems ,
+or, if that does not exist,
+.IR /proc/filesystems .
+All of the filesystem types listed there will be tried,
+except for those that are labeled "nodev" (e.g.,
+.IR devpts ,
+.I proc
+and
+.IR nfs ).
+If
+.I /etc/filesystems
+ends in a line with a single * only, mount will read
+.I /proc/filesystems
+afterwards.
+
+The
+.B auto
+type may be useful for user-mounted floppies.
+Creating a file
+.I /etc/filesystems
+can be useful to change the probe order (e.g., to try vfat before msdos
+or ext3 before ext2) or if you use a kernel module autoloader.
+Warning: the probing uses a heuristic (the presence of appropriate `magic'),
+and could recognize the wrong filesystem type, possibly with catastrophic
+consequences. If your data is valuable, don't ask
+.B mount
+to guess.
+
+More than one type may be specified in a comma separated
+list. The list of filesystem types can be prefixed with
+.B no
+to specify the filesystem types on which no action should be taken.
+(This can be meaningful with the
+.B \-a
+option.)
+
+For example, the command:
+.RS
+.RS
+.B "mount \-a \-t nomsdos,ext"
+.RE
+mounts all filesystems except those of type
+.I msdos
+and
+.IR ext .
+.RE
+.TP
+.B \-O
+Used in conjunction with
+.BR \-a ,
+to limit the set of filesystems to which the
+.B \-a
+is applied. Like
+.B \-t
+in this regard except that it is useless except in the context of
+.BR \-a .
+For example, the command:
+.RS
+.RS
+.sp
+.B "mount \-a \-O no_netdev"
+.sp
+.RE
+mounts all filesystems except those which have the option
+.I _netdev
+specified in the options field in the
+.I /etc/fstab
+file.
+
+It is different from
+.B \-t
+in that each option is matched exactly; a leading
+.B no
+at the beginning of one option does not negate the rest.
+
+The
+.B \-t
+and
+.B \-O
+options are cumulative in effect; that is, the command
+.RS
+.sp
+.B "mount \-a \-t ext2 \-O _netdev"
+.sp
+.RE
+mounts all ext2 filesystems with the _netdev option, not all filesystems
+that are either ext2 or have the _netdev option specified.
+.RE
+.TP
+.B \-o
+Options are specified with a
+.B \-o
+flag followed by a comma separated string of options. For example:
+.RS
+.RS
+.B "mount LABEL=mydisk \-o noatime,nouser"
+.RE
+
+For more details, see
+.B FILESYSTEM INDEPENDENT MOUNT OPTIONS
+and
+.B FILESYSTEM SPECIFIC MOUNT OPTIONS
+sections.
+.RE
+.TP
+.B \-B, \-\-bind
+Remount a subtree somewhere else (so that its contents are available
+in both places). See above.
+.TP
+.B \-R, \-\-rbind
+Remount a subtree and all possible submounts somewhere else (so that its
+contents are available in both places). See above.
+.TP
+.B \-M, \-\-move
+Move a subtree to some other place. See above.
+.RE
+
+.SH FILESYSTEM INDEPENDENT MOUNT OPTIONS
+Some of these options are only useful when they appear in the
+.I /etc/fstab
+file.
+
+Some of these options could be enabled or disabled by default
+in the system kernel. To check the current setting see the options
+in /proc/mounts.
+
+The following options apply to any filesystem that is being
+mounted (but not every filesystem actually honors them - e.g., the
+.B sync
+option today has effect only for ext2, ext3, fat, vfat and ufs):
+
+.TP
+.B async
+All I/O to the filesystem should be done asynchronously. (See also the
+.B sync
+option.)
+.TP
+.B atime
+Update inode access time for each access. See also the
+.B strictatime
+mount option.
+.TP
+.B noatime
+Do not update inode access times on this filesystem (e.g, for faster
+access on the news spool to speed up news servers).
+.TP
+.B auto
+Can be mounted with the
+.B \-a
+option.
+.TP
+.B noauto
+Can only be mounted explicitly (i.e., the
+.B \-a
+option will not cause the filesystem to be mounted).
+.TP
+\fBcontext=\fP\fIcontext\fP, \fBfscontext=\fP\fIcontext\fP, \fBdefcontext=\fP\fIcontext\fP and \fBrootcontext=\fP\fIcontext\fP
+The
+.BR context=
+option is useful when mounting filesystems that do not support
+extended attributes, such as a floppy or hard disk formatted with VFAT, or
+systems that are not normally running under SELinux, such as an ext3 formatted
+disk from a non-SELinux workstation. You can also use
+.BR context=
+on filesystems you do not trust, such as a floppy. It also helps in compatibility with
+xattr-supporting filesystems on earlier 2.4.<x> kernel versions. Even where
+xattrs are supported, you can save time not having to label every file by
+assigning the entire disk one security context.
+
+A commonly used option for removable media is
+.BR context=system_u:object_r:removable_t .
+
+Two other options are
+.BR fscontext=
+and
+.BR defcontext= ,
+both of which are mutually exclusive of the context option. This means you
+can use fscontext and defcontext with each other, but neither can be used with
+context.
+
+The
+.BR fscontext=
+option works for all filesystems, regardless of their xattr
+support. The fscontext option sets the overarching filesystem label to a
+specific security context. This filesystem label is separate from the
+individual labels on the files. It represents the entire filesystem for
+certain kinds of permission checks, such as during mount or file creation.
+Individual file labels are still obtained from the xattrs on the files
+themselves. The context option actually sets the aggregate context that
+fscontext provides, in addition to supplying the same label for individual
+files.
+
+You can set the default security context for unlabeled files using
+.BR defcontext=
+option. This overrides the value set for unlabeled files in the policy and requires a
+filesystem that supports xattr labeling.
+
+The
+.BR rootcontext=
+option allows you to explicitly label the root inode of a FS being mounted
+before that FS or inode because visable to userspace. This was found to be
+useful for things like stateless linux.
+
+For more details, see
+.BR selinux (8)
+
+.TP
+.B defaults
+Use default options:
+.BR rw ", " suid ", " dev ", " exec ", " auto ", " nouser ", and " async.
+.TP
+.B dev
+Interpret character or block special devices on the filesystem.
+.TP
+.B nodev
+Do not interpret character or block special devices on the file
+system.
+.TP
+.B diratime
+Update directory inode access times on this filesystem. This is the default.
+.TP
+.B nodiratime
+Do not update directory inode access times on this filesystem.
+.TP
+.B dirsync
+All directory updates within the filesystem should be done synchronously.
+This affects the following system calls: creat, link, unlink, symlink,
+mkdir, rmdir, mknod and rename.
+.TP
+.B exec
+Permit execution of binaries.
+.TP
+.B noexec
+Do not allow direct execution of any binaries on the mounted filesystem.
+(Until recently it was possible to run binaries anyway using a command like
+/lib/ld*.so /mnt/binary. This trick fails since Linux 2.4.25 / 2.6.0.)
+.TP
+.B group
+Allow an ordinary (i.e., non-root) user to mount the filesystem if one
+of his groups matches the group of the device.
+This option implies the options
+.BR nosuid " and " nodev
+(unless overridden by subsequent options, as in the option line
+.BR group,dev,suid ).
+.TP
+.B encryption
+Specifies an encryption algorithm to use. Used in conjunction with the
+.BR loop " option."
+.TP
+.B keybits
+Specifies the key size to use for an encryption algorithm. Used in conjunction
+with the
+.BR loop " and " encryption " options."
+.B nofail
+Do not report errors for this device if it does not exist.
+.B iversion
+Every time the inode is modified, the i_version field will be incremented.
+.TP
+.B noiversion
+Do not increment the i_version inode field.
+.TP
+.B mand
+Allow mandatory locks on this filesystem. See
+.BR fcntl (2).
+.TP
+.B nomand
+Do not allow mandatory locks on this filesystem.
+.TP
+.B _netdev
+The filesystem resides on a device that requires network access
+(used to prevent the system from attempting to mount these filesystems
+until the network has been enabled on the system).
+.TP
+.B nofail
+Do not report errors for this device if it does not exist.
+.TP
+.B relatime
+Update inode access times relative to modify or change time. Access
+time is only updated if the previous access time was earlier than the
+current modify or change time. (Similar to noatime, but doesn't break
+mutt or other applications that need to know if a file has been read
+since the last time it was modified.)
+.TP
+.B norelatime
+Do not use
+.B relatime
+feature. See also the
+.B strictatime
+mount option.
+.TP
+.B strictatime
+Allows to explicitly requesting full atime updates. This makes it
+possible for kernel to defaults to
+.B relatime
+or
+.B noatime
+but still allow userspace to override it. For more details about the default
+system mount options see /proc/mounts.
+.TP
+.B nostrictatime
+Use the kernel's default behaviour for inode access time updates.
+.TP
+.B suid
+Allow set-user-identifier or set-group-identifier bits to take
+effect.
+.TP
+.B nosuid
+Do not allow set-user-identifier or set-group-identifier bits to take
+effect. (This seems safe, but is in fact rather unsafe if you have
+suidperl(1) installed.)
+.TP
+.B owner
+Allow an ordinary (i.e., non-root) user to mount the filesystem if he
+is the owner of the device.
+This option implies the options
+.BR nosuid " and " nodev
+(unless overridden by subsequent options, as in the option line
+.BR owner,dev,suid ).
+.TP
+.B remount
+Attempt to remount an already-mounted filesystem. This is commonly
+used to change the mount flags for a filesystem, especially to make a
+readonly filesystem writeable. It does not change device or mount point.
+
+The remount functionality follows the standard way how the mount command works
+with options from fstab. It means the mount command doesn't read fstab (or
+mtab) only when a
+.IR device
+and
+.IR dir
+are fully specified.
+
+.BR "mount -o remount,rw /dev/foo /dir"
+
+After this call all old mount options are replaced and arbitrary stuff from
+fstab is ignored, except the loop= option which is internally generated and
+maintained by the mount command.
+
+.BR "mount -o remount,rw /dir"
+
+After this call mount reads fstab (or mtab) and merges these options with
+options from command line (
+.B -o
+).
+.TP
+.B ro
+Mount the filesystem read-only.
+.TP
+.B rw
+Mount the filesystem read-write.
+.TP
+.B sync
+All I/O to the filesystem should be done synchronously. In case of media with limited number of write cycles
+(e.g. some flash drives) "sync" may cause life-cycle shortening.
+.TP
+.B user
+Allow an ordinary user to mount the filesystem.
+The name of the mounting user is written to mtab so that he can unmount
+the filesystem again.
+This option implies the options
+.BR noexec ", " nosuid ", and " nodev
+(unless overridden by subsequent options, as in the option line
+.BR user,exec,dev,suid ).
+.TP
+.B nouser
+Forbid an ordinary (i.e., non-root) user to mount the filesystem.
+This is the default.
+.TP
+.B users
+Allow every user to mount and unmount the filesystem.
+This option implies the options
+.BR noexec ", " nosuid ", and " nodev
+(unless overridden by subsequent options, as in the option line
+.BR users,exec,dev,suid ).
+
+.SH "FILESYSTEM SPECIFIC MOUNT OPTIONS"
+The following options apply only to certain filesystems.
+We sort them by filesystem. They all follow the
+.B \-o
+flag.
+
+What options are supported depends a bit on the running kernel.
+More info may be found in the kernel source subdirectory
+.IR Documentation/filesystems .
+
+.SH "Mount options for adfs"
+.TP
+\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
+Set the owner and group of the files in the filesystem (default: uid=gid=0).
+.TP
+\fBownmask=\fP\fIvalue\fP and \fBothmask=\fP\fIvalue\fP
+Set the permission mask for ADFS 'owner' permissions and 'other' permissions,
+respectively (default: 0700 and 0077, respectively).
+See also
+.IR /usr/src/linux/Documentation/filesystems/adfs.txt .
+.SH "Mount options for affs"
+.TP
+\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
+Set the owner and group of the root of the filesystem (default: uid=gid=0,
+but with option
+.B uid
+or
+.B gid
+without specified value, the uid and gid of the current process are taken).
+.TP
+\fBsetuid=\fP\fIvalue\fP and \fBsetgid=\fP\fIvalue\fP
+Set the owner and group of all files.
+.TP
+.BI mode= value
+Set the mode of all files to
+.IR value " & 0777"
+disregarding the original permissions.
+Add search permission to directories that have read permission.
+The value is given in octal.
+.TP
+.B protect
+Do not allow any changes to the protection bits on the filesystem.
+.TP
+.B usemp
+Set uid and gid of the root of the filesystem to the uid and gid
+of the mount point upon the first sync or umount, and then
+clear this option. Strange...
+.TP
+.B verbose
+Print an informational message for each successful mount.
+.TP
+.BI prefix= string
+Prefix used before volume name, when following a link.
+.TP
+.BI volume= string
+Prefix (of length at most 30) used before '/' when following a symbolic link.
+.TP
+.BI reserved= value
+(Default: 2.) Number of unused blocks at the start of the device.
+.TP
+.BI root= value
+Give explicitly the location of the root block.
+.TP
+.BI bs= value
+Give blocksize. Allowed values are 512, 1024, 2048, 4096.
+.TP
+.BR grpquota | noquota | quota | usrquota
+These options are accepted but ignored.
+(However, quota utilities may react to such strings in
+.IR /etc/fstab .)
+
+.SH "Mount options for cifs"
+See the options section of the
+.BR mount.cifs (8)
+man page (smbfs package must be installed).
+
+.SH "Mount options for coherent"
+None.
+
+.SH "Mount options for debugfs"
+The debugfs filesystem is a pseudo filesystem, traditionally mounted on
+.IR /sys/kernel/debug .
+.\" or just /debug
+.\" present since 2.6.11
+There are no mount options.
+
+.SH "Mount options for devpts"
+The devpts filesystem is a pseudo filesystem, traditionally mounted on
+.IR /dev/pts .
+In order to acquire a pseudo terminal, a process opens
+.IR /dev/ptmx ;
+the number of the pseudo terminal is then made available to the process
+and the pseudo terminal slave can be accessed as
+.IR /dev/pts/ <number>.
+.TP
+\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
+This sets the owner or the group of newly created PTYs to
+the specified values. When nothing is specified, they will
+be set to the UID and GID of the creating process.
+For example, if there is a tty group with GID 5, then
+.B gid=5
+will cause newly created PTYs to belong to the tty group.
+.TP
+.BI mode= value
+Set the mode of newly created PTYs to the specified value.
+The default is 0600.
+A value of
+.B mode=620
+and
+.B gid=5
+makes "mesg y" the default on newly created PTYs.
+.TP
+\fBnewinstance
+Create a private instance of devpts filesystem, such that
+indices of ptys allocated in this new instance are
+independent of indices created in other instances of devpts.
+
+All mounts of devpts without this
+.B newinstance
+option share the same set of pty indices (i.e legacy mode).
+Each mount of devpts with the
+.B newinstance
+option has a private set of pty indices.
+
+This option is mainly used to support containers in the
+linux kernel. It is implemented in linux kernel versions
+starting with 2.6.29. Further, this mount option is valid
+only if CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the
+kernel configuration.
+
+To use this option effectively,
+.IR /dev/ptmx
+must be a symbolic link to
+.IR pts/ptmx.
+See
+.IR Documentation/filesystems/devpts.txt
+in the linux kernel source tree for details.
+.TP
+.BI ptmxmode= value
+
+Set the mode for the new
+.IR ptmx
+device node in the devpts filesystem.
+
+With the support for multiple instances of devpts (see
+.B newinstance
+option above), each instance has a private
+.IR ptmx
+node in the root of the devpts filesystem (typically
+.IR /dev/pts/ptmx).
+
+For compatibility with older versions of the kernel, the
+default mode of the new
+.IR ptmx
+node is 0000.
+.BI ptmxmode= value
+specifies a more useful mode for the
+.IR ptmx
+node and is highly recommended when the
+.B newinstance
+option is specified.
+
+This option is only implemented in linux kernel versions
+starting with 2.6.29. Further this option is valid only if
+CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the kernel
+configuration.
+
+.SH "Mount options for ext"
+None.
+Note that the `ext' filesystem is obsolete. Don't use it.
+Since Linux version 2.1.21 extfs is no longer part of the kernel source.
+
+.SH "Mount options for ext2"
+The `ext2' filesystem is the standard Linux filesystem.
+.\" Due to a kernel bug, it may be mounted with random mount options
+.\" (fixed in Linux 2.0.4).
+Since Linux 2.5.46, for most mount options the default
+is determined by the filesystem superblock. Set them with
+.BR tune2fs (8).
+.TP
+.BR acl | noacl
+Support POSIX Access Control Lists (or not).
+.\" requires CONFIG_EXT2_FS_POSIX_ACL
+.TP
+.BR bsddf | minixdf
+Set the behaviour for the
+.I statfs
+system call. The
+.B minixdf
+behaviour is to return in the
+.I f_blocks
+field the total number of blocks of the filesystem, while the
+.B bsddf
+behaviour (which is the default) is to subtract the overhead blocks
+used by the ext2 filesystem and not available for file storage. Thus
+.nf
+
+% mount /k -o minixdf; df /k; umount /k
+Filesystem 1024-blocks Used Available Capacity Mounted on
+/dev/sda6 2630655 86954 2412169 3% /k
+% mount /k -o bsddf; df /k; umount /k
+Filesystem 1024-blocks Used Available Capacity Mounted on
+/dev/sda6 2543714 13 2412169 0% /k
+
+.fi
+(Note that this example shows that one can add command line options
+to the options given in
+.IR /etc/fstab .)
+
+.TP
+.BR check= { none | nocheck }
+No checking is done at mount time. This is the default. This is fast.
+It is wise to invoke
+.BR e2fsck (8)
+every now and then, e.g. at boot time.
+.TP
+.B debug
+Print debugging info upon each (re)mount.
+.TP
+.BR errors= { continue | remount-ro | panic }
+Define the behaviour when an error is encountered.
+(Either ignore errors and just mark the filesystem erroneous and continue,
+or remount the filesystem read-only, or panic and halt the system.)
+The default is set in the filesystem superblock, and can be
+changed using
+.BR tune2fs (8).
+.TP
+.BR grpid | bsdgroups " and " nogrpid | sysvgroups
+These options define what group id a newly created file gets.
+When
+.BR grpid
+is set, it takes the group id of the directory in which it is created;
+otherwise (the default) it takes the fsgid of the current process, unless
+the directory has the setgid bit set, in which case it takes the gid
+from the parent directory, and also gets the setgid bit set
+if it is a directory itself.
+.TP
+.BR grpquota | noquota | quota | usrquota
+These options are accepted but ignored.
+.TP
+.BR nobh
+Do not attach buffer_heads to file pagecache. (Since 2.5.49.)
+.TP
+.BR nouid32
+Disables 32-bit UIDs and GIDs. This is for interoperability with older
+kernels which only store and expect 16-bit values.
+.TP
+.BR oldalloc " or " orlov
+Use old allocator or Orlov allocator for new inodes. Orlov is default.
+.TP
+\fBresgid=\fP\fIn\fP and \fBresuid=\fP\fIn\fP
+The ext2 filesystem reserves a certain percentage of the available
+space (by default 5%, see
+.BR mke2fs (8)
+and
+.BR tune2fs (8)).
+These options determine who can use the reserved blocks.
+(Roughly: whoever has the specified uid, or belongs to the specified group.)
+.TP
+.BI sb= n
+Instead of block 1, use block
+.I n
+as superblock. This could be useful when the filesystem has been damaged.
+(Earlier, copies of the superblock would be made every 8192 blocks: in
+block 1, 8193, 16385, ... (and one got thousands of copies on
+a big filesystem). Since version 1.08,
+.B mke2fs
+has a \-s (sparse superblock) option to reduce the number of backup
+superblocks, and since version 1.15 this is the default. Note
+that this may mean that ext2 filesystems created by a recent
+.B mke2fs
+cannot be mounted r/w under Linux 2.0.*.)
+The block number here uses 1k units. Thus, if you want to use logical
+block 32768 on a filesystem with 4k blocks, use "sb=131072".
+.TP
+.BR user_xattr | nouser_xattr
+Support "user." extended attributes (or not).
+.\" requires CONFIG_EXT2_FS_XATTR
+
+
+.SH "Mount options for ext3"
+The ext3 filesystem is a version of the ext2 filesystem which has been
+enhanced with journalling. It supports the same options as ext2 as
+well as the following additions:
+.\" .TP
+.\" .BR abort
+.\" Mount the filesystem in abort mode, as if a fatal error has occurred.
+.TP
+.BR journal=update
+Update the ext3 filesystem's journal to the current format.
+.TP
+.BR journal=inum
+When a journal already exists, this option is ignored. Otherwise, it
+specifies the number of the inode which will represent the ext3 filesystem's
+journal file; ext3 will create a new journal, overwriting the old contents
+of the file whose inode number is
+.IR inum .
+.TP
+.BR noload
+Do not load the ext3 filesystem's journal on mounting.
+.TP
+.BR data= { journal | ordered | writeback }
+Specifies the journalling mode for file data. Metadata is always journaled.
+To use modes other than
+.B ordered
+on the root filesystem, pass the mode to the kernel as boot parameter, e.g.
+.IR rootflags=data=journal .
+.RS
+.TP
+.B journal
+All data is committed into the journal prior to being written into the
+main filesystem.
+.TP
+.B ordered
+This is the default mode. All data is forced directly out to the main file
+system prior to its metadata being committed to the journal.
+.TP
+.B writeback
+Data ordering is not preserved - data may be written into the main
+filesystem after its metadata has been committed to the journal.
+This is rumoured to be the highest-throughput option. It guarantees
+internal filesystem integrity, however it can allow old data to appear
+in files after a crash and journal recovery.
+.RE
+.TP
+.BR barrier=0 " / " barrier=1 "
+This enables/disables barriers. barrier=0 disables it, barrier=1 enables it.
+The ext3 filesystem does not enable write barriers by default.
+.TP
+.BI commit= nrsec
+Sync all data and metadata every
+.I nrsec
+seconds. The default value is 5 seconds. Zero means default.
+.TP
+.BR user_xattr
+Enable Extended User Attributes. See the
+.BR attr (5)
+manual page.
+.TP
+.BR acl
+Enable POSIX Access Control Lists. See the
+.BR acl (5)
+manual page.
+
+.SH "Mount options for ext4"
+The ext4 filesystem is an an advanced level of the ext3 filesystem which
+incorporates scalability and reliability enhancements for supporting large
+filesystem.
+
+The options
+.B journal_dev, noload, data, commit, orlov, oldalloc, [no]user_xattr
+.B [no]acl, bsddf, minixdf, debug, errors, data_err, grpid, bsdgroups, nogrpid
+.B sysvgroups, resgid, resuid, sb, quota, noquota, grpquota, usrquota
+and
+.B [no]bh
+are backwardly compatible with ext3 or ext2.
+.TP
+.BR journal_checksum
+Enable checksumming of the journal transactions. This will allow the recovery
+code in e2fsck and the kernel to detect corruption in the kernel. It is a
+compatible change and will be ignored by older kernels.
+.TP
+.BR journal_async_commit
+Commit block can be written to disk without waiting for descriptor blocks. If
+enabled older kernels cannot mount the device. This will enable
+'journal_checksum' internally.
+.TP
+.BR journal=update
+Update the ext4 filesystem's journal to the current format.
+.TP
+.BR barrier=0 " / " barrier=1 " / " barrier " / " nobarrier
+This enables/disables the use of write barriers in the jbd code. barrier=0
+disables, barrier=1 enables. This also requires an IO stack which can support
+barriers, and if jbd gets an error on a barrier write, it will disable again
+with a warning. Write barriers enforce proper on-disk ordering of journal
+commits, making volatile disk write caches safe to use, at some performance
+penalty. If your disks are battery-backed in one way or another, disabling
+barriers may safely improve performance. The mount options "barrier" and
+"nobarrier" can also be used to enable or disable barriers, for consistency
+with other ext4 mount options.
+
+The ext4 filesystem enables write barriers by default.
+.TP
+.BI inode_readahead= n
+This tuning parameter controls the maximum number of inode table blocks that
+ext4's inode table readahead algorithm will pre-read into the buffer cache.
+The default value is 32 blocks.
+.TP
+.BI stripe= n
+Number of filesystem blocks that mballoc will try to use for allocation size
+and alignment. For RAID5/6 systems this should be the number of data disks *
+RAID chunk size in filesystem blocks.
+.TP
+.BR delalloc
+Deferring block allocation until write-out time.
+.TP
+.BR nodelalloc
+Disable delayed allocation. Blocks are allocation when data is copied from user
+to page cache.
+.TP
+.BI max_batch_time= usec
+Maximum amount of time ext4 should wait for additional filesystem operations to
+be batch together with a synchronous write operation. Since a synchronous
+write operation is going to force a commit and then a wait for the I/O
+complete, it doesn't cost much, and can be a huge throughput win, we wait for a
+small amount of time to see if any other transactions can piggyback on the
+synchronous write. The algorithm used is designed to automatically tune for
+the speed of the disk, by measuring the amount of time (on average) that it
+takes to finish committing a transaction. Call this time the "commit time".
+If the time that the transactoin has been running is less than the commit time,
+ext4 will try sleeping for the commit time to see if other operations will join
+the transaction. The commit time is capped by the max_batch_time, which
+defaults to 15000us (15ms). This optimization can be turned off entirely by
+setting max_batch_time to 0.
+.TP
+.BI min_batch_time= usec
+This parameter sets the commit time (as described above) to be at least
+min_batch_time. It defaults to zero microseconds. Increasing this parameter
+may improve the throughput of multi-threaded, synchronous workloads on very
+fast disks, at the cost of increasing latency.
+.TP
+.BI journal_ioprio= prio
+The I/O priority (from 0 to 7, where 0 is the highest priorty) which should be
+used for I/O operations submitted by kjournald2 during a commit operation.
+This defaults to 3, which is a slightly higher priority than the default I/O
+priority.
+.TP
+.BR auto_da_alloc | noauto_da_alloc
+Many broken applications don't use fsync() when noauto_da_alloc
+replacing existing files via patterns such as
+
+fd = open("foo.new")/write(fd,..)/close(fd)/ rename("foo.new", "foo")
+
+or worse yet
+
+fd = open("foo", O_TRUNC)/write(fd,..)/close(fd).
+
+If auto_da_alloc is enabled, ext4 will detect the replace-via-rename and
+replace-via-truncate patterns and force that any delayed allocation blocks are
+allocated such that at the next journal commit, in the default data=ordered
+mode, the data blocks of the new file are forced to disk before the rename()
+operation is commited. This provides roughly the same level of guarantees as
+ext3, and avoids the "zero-length" problem that can happen when a system
+crashes before the delayed allocation blocks are forced to disk.
+
+.SH "Mount options for fat"
+(Note:
+.I fat
+is not a separate filesystem, but a common part of the
+.IR msdos ,
+.I umsdos
+and
+.I vfat
+filesystems.)
+.TP
+.BR blocksize= { 512 | 1024 | 2048 }
+Set blocksize (default 512). This option is obsolete.
+.TP
+\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
+Set the owner and group of all files.
+(Default: the uid and gid of the current process.)
+.TP
+.BI umask= value
+Set the umask (the bitmask of the permissions that are
+.B not
+present). The default is the umask of the current process.
+The value is given in octal.
+.TP
+.BI dmask= value
+Set the umask applied to directories only.
+The default is the umask of the current process.
+The value is given in octal.
+.\" Present since Linux 2.5.43.
+.TP
+.BI fmask= value
+Set the umask applied to regular files only.
+The default is the umask of the current process.
+The value is given in octal.
+.\" Present since Linux 2.5.43.
+.TP
+.BI allow_utime= value
+This option controls the permission check of mtime/atime.
+.RS
+.TP
+.B 20
+If current process is in group of file's group ID, you can change timestamp.
+.TP
+.B 2
+Other users can change timestamp.
+.PP
+The default is set from `dmask' option. (If the directory is writable,
+.B utime(2)
+is also allowed. I.e. ~dmask & 022)
+
+Normally
+.B utime(2)
+checks current process is owner of the file, or it has
+CAP_FOWNER capability. But FAT filesystem doesn't have uid/gid on disk, so
+normal check is too unflexible. With this option you can relax it.
+.RE
+.TP
+.BI check= value
+Three different levels of pickyness can be chosen:
+.RS
+.TP
+.BR r [ elaxed ]
+Upper and lower case are accepted and equivalent, long name parts are
+truncated (e.g.
+.I verylongname.foobar
+becomes
+.IR verylong.foo ),
+leading and embedded spaces are accepted in each name part (name and extension).
+.TP
+.BR n [ ormal ]
+Like "relaxed", but many special characters (*, ?, <, spaces, etc.) are
+rejected. This is the default.
+.TP
+.BR s [ trict ]
+Like "normal", but names may not contain long parts and special characters
+that are sometimes used on Linux, but are not accepted by MS-DOS are
+rejected. (+, =, spaces, etc.)
+.RE
+.TP
+.BI codepage= value
+Sets the codepage for converting to shortname characters on FAT
+and VFAT filesystems. By default, codepage 437 is used.
+.TP
+.BR conv= {b [ inary ]| t [ ext ]| a [ uto ]}
+The
+.I fat
+filesystem can perform CRLF<-->NL (MS-DOS text format to UNIX text
+format) conversion in the kernel. The following conversion modes are
+available:
+.RS
+.TP
+.B binary
+no translation is performed. This is the default.
+.TP
+.B text
+CRLF<-->NL translation is performed on all files.
+.TP
+.B auto
+CRLF<-->NL translation is performed on all files that don't have a
+"well-known binary" extension. The list of known extensions can be found at
+the beginning of
+.I fs/fat/misc.c
+(as of 2.0, the list is: exe, com, bin, app, sys, drv, ovl, ovr, obj,
+lib, dll, pif, arc, zip, lha, lzh, zoo, tar, z, arj, tz, taz, tzp, tpz,
+gz, tgz, deb, gif, bmp, tif, gl, jpg, pcx, tfm, vf, gf, pk, pxl, dvi).
+.PP
+Programs that do computed lseeks won't like in-kernel text conversion.
+Several people have had their data ruined by this translation. Beware!
+
+For filesystems mounted in binary mode, a conversion tool
+(fromdos/todos) is available. This option is obsolete.
+.RE
+.TP
+.BI cvf_format= module
+Forces the driver to use the CVF (Compressed Volume File) module
+.RI cvf_ module
+instead of auto-detection. If the kernel supports kmod, the
+cvf_format=xxx option also controls on-demand CVF module loading.
+This option is obsolete.
+.TP
+.BI cvf_option= option
+Option passed to the CVF module. This option is obsolete.
+.TP
+.B debug
+Turn on the
+.I debug
+flag. A version string and a list of filesystem parameters will be
+printed (these data are also printed if the parameters appear to be
+inconsistent).
+.TP
+.BR fat= {12 | 16 | 32 }
+Specify a 12, 16 or 32 bit fat. This overrides
+the automatic FAT type detection routine. Use with caution!
+.TP
+.BI iocharset= value
+Character set to use for converting between 8 bit characters
+and 16 bit Unicode characters. The default is iso8859-1.
+Long filenames are stored on disk in Unicode format.
+.TP
+.BI tz=UTC
+This option disables the conversion of timestamps
+between local time (as used by Windows on FAT) and UTC
+(which Linux uses internally). This is particuluarly
+useful when mounting devices (like digital cameras)
+that are set to UTC in order to avoid the pitfalls of
+local time.
+.TP
+.B quiet
+Turn on the
+.I quiet
+flag. Attempts to chown or chmod files do not return errors,
+although they fail. Use with caution!
+.TP
+.B showexec
+If set, the execute permission bits of the file will be allowed only if
+the extension part of the name is .EXE, .COM, or .BAT. Not set by default.
+.TP
+.B sys_immutable
+If set, ATTR_SYS attribute on FAT is handled as IMMUTABLE flag on Linux.
+Not set by default.
+.TP
+.B flush
+If set, the filesystem will try to flush to disk more early than normal.
+Not set by default.
+.TP
+.B usefree
+Use the "free clusters" value stored on FSINFO. It'll
+be used to determine number of free clusters without
+scanning disk. But it's not used by default, because
+recent Windows don't update it correctly in some
+case. If you are sure the "free clusters" on FSINFO is
+correct, by this option you can avoid scanning disk.
+.TP
+.BR dots ", " nodots ", " dotsOK= [ yes | no ]
+Various misguided attempts to force Unix or DOS conventions
+onto a FAT filesystem.
+
+.SH "Mount options for hfs"
+.TP
+.BI creator= cccc ", type=" cccc
+Set the creator/type values as shown by the MacOS finder
+used for creating new files. Default values: '????'.
+.TP
+.BI uid= n ", gid=" n
+Set the owner and group of all files.
+(Default: the uid and gid of the current process.)
+.TP
+.BI dir_umask= n ", file_umask=" n ", umask=" n
+Set the umask used for all directories, all regular files, or all
+files and directories. Defaults to the umask of the current process.
+.TP
+.BI session= n
+Select the CDROM session to mount.
+Defaults to leaving that decision to the CDROM driver.
+This option will fail with anything but a CDROM as underlying device.
+.TP
+.BI part= n
+Select partition number n from the device.
+Only makes sense for CDROMS.
+Defaults to not parsing the partition table at all.
+.TP
+.B quiet
+Don't complain about invalid mount options.
+
+.SH "Mount options for hpfs"
+.TP
+\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
+Set the owner and group of all files. (Default: the uid and gid
+of the current process.)
+.TP
+.BI umask= value
+Set the umask (the bitmask of the permissions that are
+.B not
+present). The default is the umask of the current process.
+The value is given in octal.
+.TP
+.BR case= { lower | asis }
+Convert all files names to lower case, or leave them.
+(Default:
+.BR case=lower .)
+.TP
+.BR conv= { binary | text | auto }
+For
+.BR conv=text ,
+delete some random CRs (in particular, all followed by NL)
+when reading a file.
+For
+.BR conv=auto ,
+choose more or less at random between
+.BR conv=binary " and " conv=text .
+For
+.BR conv=binary ,
+just read what is in the file. This is the default.
+.TP
+.B nocheck
+Do not abort mounting when certain consistency checks fail.
+
+.SH "Mount options for iso9660"
+ISO 9660 is a standard describing a filesystem structure to be used
+on CD-ROMs. (This filesystem type is also seen on some DVDs. See also the
+.I udf
+filesystem.)
+
+Normal
+.I iso9660
+filenames appear in a 8.3 format (i.e., DOS-like restrictions on filename
+length), and in addition all characters are in upper case. Also there is
+no field for file ownership, protection, number of links, provision for
+block/character devices, etc.
+
+Rock Ridge is an extension to iso9660 that provides all of these unix like
+features. Basically there are extensions to each directory record that
+supply all of the additional information, and when Rock Ridge is in use,
+the filesystem is indistinguishable from a normal UNIX filesystem (except
+that it is read-only, of course).
+.TP
+.B norock
+Disable the use of Rock Ridge extensions, even if available. Cf.\&
+.BR map .
+.TP
+.B nojoliet
+Disable the use of Microsoft Joliet extensions, even if available. Cf.\&
+.BR map .
+.TP
+.BR check= { r [ elaxed ]| s [ trict ]}
+With
+.BR check=relaxed ,
+a filename is first converted to lower case before doing the lookup.
+This is probably only meaningful together with
+.B norock
+and
+.BR map=normal .
+(Default:
+.BR check=strict .)
+.TP
+\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
+Give all files in the filesystem the indicated user or group id,
+possibly overriding the information found in the Rock Ridge extensions.
+(Default:
+.BR uid=0,gid=0 .)
+.TP
+.BR map= { n [ ormal ]| o [ ff ]| a [ corn ]}
+For non-Rock Ridge volumes, normal name translation maps upper
+to lower case ASCII, drops a trailing `;1', and converts `;' to `.'.
+With
+.B map=off
+no name translation is done. See
+.BR norock .
+(Default:
+.BR map=normal .)
+.B map=acorn
+is like
+.BR map=normal
+but also apply Acorn extensions if present.
+.TP
+.BI mode= value
+For non-Rock Ridge volumes, give all files the indicated mode.
+(Default: read permission for everybody.)
+Since Linux 2.1.37 one no longer needs to specify the mode in
+decimal. (Octal is indicated by a leading 0.)
+.TP
+.B unhide
+Also show hidden and associated files.
+(If the ordinary files and the associated or hidden files have
+the same filenames, this may make the ordinary files inaccessible.)
+.TP
+.BR block= { 512 | 1024 | 2048 }
+Set the block size to the indicated value.
+(Default:
+.BR block=1024 .)
+.TP
+.BR conv= { a [ uto ]| b [ inary ]| m [ text ]| t [ ext ]}
+(Default:
+.BR conv=binary .)
+Since Linux 1.3.54 this option has no effect anymore.
+(And non-binary settings used to be very dangerous,
+possibly leading to silent data corruption.)
+.TP
+.B cruft
+If the high byte of the file length contains other garbage,
+set this mount option to ignore the high order bits of the file length.
+This implies that a file cannot be larger than 16MB.
+.TP
+.BI session= x
+Select number of session on multisession CD. (Since 2.3.4.)
+.TP
+.BI sbsector= xxx
+Session begins from sector xxx. (Since 2.3.4.)
+.LP
+The following options are the same as for vfat and specifying them only makes
+sense when using discs encoded using Microsoft's Joliet extensions.
+.TP
+.BI iocharset= value
+Character set to use for converting 16 bit Unicode characters on CD
+to 8 bit characters. The default is iso8859-1.
+.TP
+.B utf8
+Convert 16 bit Unicode characters on CD to UTF-8.
+
+.SH "Mount options for jfs"
+.TP
+.BI iocharset= name
+Character set to use for converting from Unicode to ASCII. The default is
+to do no conversion. Use
+.B iocharset=utf8
+for UTF8 translations. This requires CONFIG_NLS_UTF8 to be set in
+the kernel
+.I ".config"
+file.
+.TP
+.BI resize= value
+Resize the volume to
+.I value
+blocks. JFS only supports growing a volume, not shrinking it. This option
+is only valid during a remount, when the volume is mounted read-write. The
+.B resize
+keyword with no value will grow the volume to the full size of the partition.
+.TP
+.B nointegrity
+Do not write to the journal. The primary use of this option is to allow
+for higher performance when restoring a volume from backup media. The
+integrity of the volume is not guaranteed if the system abnormally abends.
+.TP
+.B integrity
+Default. Commit metadata changes to the journal. Use this option to remount
+a volume where the
+.B nointegrity
+option was previously specified in order to restore normal behavior.
+.TP
+.BR errors= { continue | remount-ro | panic }
+Define the behaviour when an error is encountered.
+(Either ignore errors and just mark the filesystem erroneous and continue,
+or remount the filesystem read-only, or panic and halt the system.)
+.TP
+.BR noquota | quota | usrquota | grpquota
+These options are accepted but ignored.
+
+.SH "Mount options for minix"
+None.
+
+.SH "Mount options for msdos"
+See mount options for fat.
+If the
+.I msdos
+filesystem detects an inconsistency, it reports an error and sets the file
+system read-only. The filesystem can be made writeable again by remounting
+it.
+
+.SH "Mount options for ncpfs"
+Just like
+.IR nfs ", the " ncpfs
+implementation expects a binary argument (a
+.IR "struct ncp_mount_data" )
+to the mount system call. This argument is constructed by
+.BR ncpmount (8)
+and the current version of
+.B mount
+(2.12) does not know anything about ncpfs.
+
+.SH "Mount options for nfs and nfs4"
+See the options section of the
+.BR nfs (5)
+man page (nfs-common package must be installed).
+
+The
+.IR nfs " and " nfs4
+implementation expects a binary argument (a
+.IR "struct nfs_mount_data" )
+to the mount system call. This argument is constructed by
+.BR mount.nfs (8)
+and the current version of
+.B mount
+(2.13) does not know anything about nfs and nfs4.
+
+.SH "Mount options for ntfs"
+.TP
+.BI iocharset= name
+Character set to use when returning file names.
+Unlike VFAT, NTFS suppresses names that contain
+unconvertible characters. Deprecated.
+.\" since 2.5.11
+.TP
+.BI nls= name
+New name for the option earlier called
+.IR iocharset .
+.\" since 2.5.11
+.TP
+.BR utf8
+Use UTF-8 for converting file names.
+.TP
+.BR uni_xlate= { 0 | 1 | 2 }
+For 0 (or `no' or `false'), do not use escape sequences
+for unknown Unicode characters.
+For 1 (or `yes' or `true') or 2, use vfat-style 4-byte escape sequences
+starting with ":". Here 2 give a little-endian encoding
+and 1 a byteswapped bigendian encoding.
+.TP
+.B posix=[0|1]
+If enabled (posix=1), the filesystem distinguishes between
+upper and lower case. The 8.3 alias names are presented as
+hard links instead of being suppressed. This option is obsolete.
+.TP
+\fBuid=\fP\fIvalue\fP, \fBgid=\fP\fIvalue\fP and \fBumask=\fP\fIvalue\fP
+Set the file permission on the filesystem.
+The umask value is given in octal.
+By default, the files are owned by root and not readable by somebody else.
+
+.SH "Mount options for proc"
+.TP
+\fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
+These options are recognized, but have no effect as far as I can see.
+
+.SH "Mount options for ramfs"
+Ramfs is a memory based filesystem. Mount it and you have it. Unmount it
+and it is gone. Present since Linux 2.3.99pre4.
+There are no mount options.
+
+.SH "Mount options for reiserfs"
+Reiserfs is a journaling filesystem.
+.TP
+.BR conv
+Instructs version 3.6 reiserfs software to mount a version 3.5 filesystem,
+using the 3.6 format for newly created objects. This filesystem will no
+longer be compatible with reiserfs 3.5 tools.
+.TP
+.BR hash= { rupasov | tea | r5 | detect }
+Choose which hash function reiserfs will use to find files within directories.
+.RS
+.TP
+.B rupasov
+A hash invented by Yury Yu. Rupasov. It is fast and preserves locality,
+mapping lexicographically close file names to close hash values.
+This option should not be used, as it causes a high probability of hash
+collisions.
+.TP
+.B tea
+A Davis-Meyer function implemented by Jeremy Fitzhardinge.
+It uses hash permuting bits in the name. It gets high randomness
+and, therefore, low probability of hash collisions at some CPU cost.
+This may be used if EHASHCOLLISION errors are experienced with the r5 hash.
+.TP
+.B r5
+A modified version of the rupasov hash. It is used by default and is
+the best choice unless the filesystem has huge directories and
+unusual file-name patterns.
+.TP
+.B detect
+Instructs
+.IR mount
+to detect which hash function is in use by examining
+the filesystem being mounted, and to write this information into
+the reiserfs superblock. This is only useful on the first mount of
+an old format filesystem.
+.RE
+.TP
+.BR hashed_relocation
+Tunes the block allocator. This may provide performance improvements
+in some situations.
+.TP
+.BR no_unhashed_relocation
+Tunes the block allocator. This may provide performance improvements
+in some situations.
+.TP
+.BR noborder
+Disable the border allocator algorithm invented by Yury Yu. Rupasov.
+This may provide performance improvements in some situations.
+.TP
+.BR nolog
+Disable journalling. This will provide slight performance improvements in
+some situations at the cost of losing reiserfs's fast recovery from crashes.
+Even with this option turned on, reiserfs still performs all journalling
+operations, save for actual writes into its journalling area. Implementation
+of
+.IR nolog
+is a work in progress.
+.TP
+.BR notail
+By default, reiserfs stores small files and `file tails' directly into its
+tree. This confuses some utilities such as
+.BR LILO (8).
+This option is used to disable packing of files into the tree.
+.TP
+.BR replayonly
+Replay the transactions which are in the journal, but do not actually
+mount the filesystem. Mainly used by
+.IR reiserfsck .
+.TP
+.BI resize= number
+A remount option which permits online expansion of reiserfs partitions.
+Instructs reiserfs to assume that the device has
+.I number
+blocks.
+This option is designed for use with devices which are under logical
+volume management (LVM).
+There is a special
+.I resizer
+utility which can be obtained from
+.IR ftp://ftp.namesys.com/pub/reiserfsprogs .
+.TP
+.BR user_xattr
+Enable Extended User Attributes. See the
+.BR attr (5)
+manual page.
+.TP
+.BR acl
+Enable POSIX Access Control Lists. See the
+.BR acl (5)
+manual page.
+
+.SH "Mount options for romfs"
+None.
+
+.SH "Mount options for smbfs"
+Just like
+.IR nfs ", the " smbfs
+implementation expects a binary argument (a
+.IR "struct smb_mount_data" )
+to the mount system call. This argument is constructed by
+.BR smbmount (8)
+and the current version of
+.B mount
+(2.12) does not know anything about smbfs.
+
+.SH "Mount options for sysv"
+None.
+
+.SH "Mount options for tmpfs"
+.TP
+.BI size= nbytes
+Override default maximum size of the filesystem.
+The size is given in bytes, and rounded up to entire pages.
+The default is half of the memory. The size parameter also accepts a suffix %
+to limit this tmpfs instance to that percentage of your physical RAM:
+the default, when neither size nor nr_blocks is specified, is size=50%
+.TP
+.B nr_blocks=
+The same as size, but in blocks of PAGE_CACHE_SIZE
+.TP
+.B nr_inodes=
+The maximum number of inodes for this instance. The default
+is half of the number of your physical RAM pages, or (on a
+machine with highmem) the number of lowmem RAM pages,
+whichever is the lower.
+.PP
+The tmpfs mount options for sizing (
+.BR size ,
+.BR nr_blocks ,
+and
+.BR nr_inodes )
+accept a suffix
+.BR k ,
+.B m
+or
+.B g
+for Ki, Mi, Gi (binary kilo, mega and giga) and can be changed on remount.
+
+.TP
+.B mode=
+Set initial permissions of the root directory.
+.TP
+.B uid=
+The user id.
+.TP
+.B gid=
+The group id.
+.TP
+.B mpol=[default|prefer:Node|bind:NodeList|interleave|interleave:NodeList]
+Set the NUMA memory allocation policy for all files in that
+instance (if the kernel CONFIG_NUMA is enabled) - which can be adjusted on the
+fly via 'mount -o remount ...'
+.RS
+.TP
+.B default
+prefers to allocate memory from the local node
+.TP
+.B prefer:Node
+prefers to allocate memory from the given Node
+.TP
+.B bind:NodeList
+allocates memory only from nodes in NodeList
+.TP
+.B interleave
+prefers to allocate from each node in turn
+.TP
+.B interleave:NodeList
+allocates from each node of NodeList in turn.
+.PP
+The NodeList format is a comma-separated list of decimal numbers and ranges, a
+range being two hyphen-separated decimal numbers, the smallest and largest node
+numbers in the range. For example, mpol=bind:0-3,5,7,9-15
+
+Note that trying to mount a tmpfs with an mpol option will fail if the
+running kernel does not support NUMA; and will fail if its nodelist
+specifies a node which is not online. If your system relies on that
+tmpfs being mounted, but from time to time runs a kernel built without
+NUMA capability (perhaps a safe recovery kernel), or with fewer nodes
+online, then it is advisable to omit the mpol option from automatic
+mount options. It can be added later, when the tmpfs is already mounted
+on MountPoint, by 'mount -o remount,mpol=Policy:NodeList MountPoint'.
+.PE
+
+.SH "Mount options for udf"
+udf is the "Universal Disk Format" filesystem defined by the Optical
+Storage Technology Association, and is often used for DVD-ROM.
+See also
+.IR iso9660 .
+.TP
+.B gid=
+Set the default group.
+.TP
+.B umask=
+Set the default umask.
+The value is given in octal.
+.TP
+.B uid=
+Set the default user.
+.TP
+.B unhide
+Show otherwise hidden files.
+.TP
+.B undelete
+Show deleted files in lists.
+.TP
+.B nostrict
+Unset strict conformance.
+.\" .TP
+.\" .B utf8
+.\" (unused).
+.TP
+.B iocharset
+Set the NLS character set.
+.TP
+.B bs=
+Set the block size. (May not work unless 2048.)
+.TP
+.B novrs
+Skip volume sequence recognition.
+.TP
+.B session=
+Set the CDROM session counting from 0. Default: last session.
+.TP
+.B anchor=
+Override standard anchor location. Default: 256.
+.TP
+.B volume=
+Override the VolumeDesc location. (unused)
+.TP
+.B partition=
+Override the PartitionDesc location. (unused)
+.TP
+.B lastblock=
+Set the last block of the filesystem.
+.TP
+.B fileset=
+Override the fileset block location. (unused)
+.TP
+.B rootdir=
+Override the root directory location. (unused)
+
+.SH "Mount options for ufs"
+.TP
+.BI ufstype= value
+UFS is a filesystem widely used in different operating systems.
+The problem are differences among implementations. Features of some
+implementations are undocumented, so its hard to recognize the
+type of ufs automatically.
+That's why the user must specify the type of ufs by mount option.
+Possible values are:
+.RS
+.TP
+.B old
+Old format of ufs, this is the default, read only.
+(Don't forget to give the \-r option.)
+.TP
+.B 44bsd
+For filesystems created by a BSD-like system (NetBSD,FreeBSD,OpenBSD).
+.TP
+.B sun
+For filesystems created by SunOS or Solaris on Sparc.
+.TP
+.B sunx86
+For filesystems created by Solaris on x86.
+.TP
+.B hp
+For filesystems created by HP-UX, read-only.
+.TP
+.B nextstep
+For filesystems created by NeXTStep (on NeXT station) (currently read only).
+.TP
+.B nextstep-cd
+For NextStep CDROMs (block_size == 2048), read-only.
+.TP
+.B openstep
+For filesystems created by OpenStep (currently read only).
+The same filesystem type is also used by Mac OS X.
+.RE
+
+.TP
+.BI onerror= value
+Set behaviour on error:
+.RS
+.TP
+.B panic
+If an error is encountered, cause a kernel panic.
+.TP
+.RB [ lock | umount | repair ]
+These mount options don't do anything at present;
+when an error is encountered only a console message is printed.
+.RE
+
+.SH "Mount options for umsdos"
+See mount options for msdos.
+The
+.B dotsOK
+option is explicitly killed by
+.IR umsdos .
+
+.SH "Mount options for vfat"
+First of all, the mount options for
+.I fat
+are recognized.
+The
+.B dotsOK
+option is explicitly killed by
+.IR vfat .
+Furthermore, there are
+.TP
+.B uni_xlate
+Translate unhandled Unicode characters to special escaped sequences.
+This lets you backup and restore filenames that are created with any
+Unicode characters. Without this option, a '?' is used when no
+translation is possible. The escape character is ':' because it is
+otherwise illegal on the vfat filesystem. The escape sequence
+that gets used, where u is the unicode character,
+is: ':', (u & 0x3f), ((u>>6) & 0x3f), (u>>12).
+.TP
+.B posix
+Allow two files with names that only differ in case.
+.TP
+.B nonumtail
+First try to make a short name without sequence number,
+before trying
+.IR name~num.ext .
+.TP
+.B utf8
+UTF8 is the filesystem safe 8-bit encoding of Unicode that is used by the
+console. It can be be enabled for the filesystem with this option or disabled
+with utf8=0, utf8=no or utf8=false. If `uni_xlate' gets set, UTF8 gets
+disabled.
+.TP
+.BR shortname= { lower | win95 | winnt | mixed }
+
+Defines the behaviour for creation and display of filenames which fit into
+8.3 characters. If a long name for a file exists, it will always be
+preferred display. There are four modes:
+:
+.RS
+.TP
+.I lower
+Force the short name to lower case upon display; store a long name when
+the short name is not all upper case. This mode is the default.
+.TP
+.I win95
+Force the short name to upper case upon display; store a long name when
+the short name is not all upper case.
+.TP
+.I winnt
+Display the shortname as is; store a long name when the short name is
+not all lower case or all upper case.
+.TP
+.I mixed
+Display the short name as is; store a long name when the short name is not
+all upper case.
+.RE
+
+
+.SH "Mount options for usbfs"
+.TP
+\fBdevuid=\fP\fIuid\fP and \fBdevgid=\fP\fIgid\fP and \fBdevmode=\fP\fImode\fP
+Set the owner and group and mode of the device files in the usbfs filesystem
+(default: uid=gid=0, mode=0644). The mode is given in octal.
+.TP
+\fBbusuid=\fP\fIuid\fP and \fBbusgid=\fP\fIgid\fP and \fBbusmode=\fP\fImode\fP
+Set the owner and group and mode of the bus directories in the usbfs
+filesystem (default: uid=gid=0, mode=0555). The mode is given in octal.
+.TP
+\fBlistuid=\fP\fIuid\fP and \fBlistgid=\fP\fIgid\fP and \fBlistmode=\fP\fImode\fP
+Set the owner and group and mode of the file
+.I devices
+(default: uid=gid=0, mode=0444). The mode is given in octal.
+
+.SH "Mount options for xenix"
+None.
+
+.SH "Mount options for xfs"
+.TP
+.BI allocsize= size
+Sets the buffered I/O end-of-file preallocation size when
+doing delayed allocation writeout (default size is 64KiB).
+Valid values for this option are page size (typically 4KiB)
+through to 1GiB, inclusive, in power-of-2 increments.
+.TP
+.BR attr2 | noattr2
+The options enable/disable (default is disabled for backward
+compatibility on-disk) an "opportunistic" improvement to be
+made in the way inline extended attributes are stored on-disk.
+When the new form is used for the first time (by setting or
+removing extended attributes) the on-disk superblock feature
+bit field will be updated to reflect this format being in use.
+.TP
+.B barrier
+Enables the use of block layer write barriers for writes into
+the journal and unwritten extent conversion. This allows for
+drive level write caching to be enabled, for devices that
+support write barriers.
+.TP
+.B dmapi
+Enable the DMAPI (Data Management API) event callouts.
+Use with the
+.B mtpt
+option.
+.TP
+.BR grpid | bsdgroups " and " nogrpid | sysvgroups
+These options define what group ID a newly created file gets.
+When grpid is set, it takes the group ID of the directory in
+which it is created; otherwise (the default) it takes the fsgid
+of the current process, unless the directory has the setgid bit
+set, in which case it takes the gid from the parent directory,
+and also gets the setgid bit set if it is a directory itself.
+.TP
+.BI ihashsize= value
+Sets the number of hash buckets available for hashing the
+in-memory inodes of the specified mount point. If a value
+of zero is used, the value selected by the default algorithm
+will be displayed in
+.IR /proc/mounts .
+.TP
+.BR ikeep | noikeep
+When inode clusters are emptied of inodes, keep them around
+on the disk (ikeep) - this is the traditional XFS behaviour
+and is still the default for now. Using the noikeep option,
+inode clusters are returned to the free space pool.
+.TP
+.B inode64
+Indicates that XFS is allowed to create inodes at any location
+in the filesystem, including those which will result in inode
+numbers occupying more than 32 bits of significance. This is
+provided for backwards compatibility, but causes problems for
+backup applications that cannot handle large inode numbers.
+.TP
+.BR largeio | nolargeio
+If
+.B nolargeio
+is specified, the optimal I/O reported in
+st_blksize by
+.BR stat (2)
+will be as small as possible to allow user
+applications to avoid inefficient read/modify/write I/O.
+If
+.B largeio
+is specified, a filesystem that has a
+.B swidth
+specified
+will return the
+.B swidth
+value (in bytes) in st_blksize. If the
+filesystem does not have a
+.B swidth
+specified but does specify
+an
+.B allocsize
+then
+.B allocsize
+(in bytes) will be returned
+instead.
+If neither of these two options are specified, then filesystem
+will behave as if
+.B nolargeio
+was specified.
+.TP
+.BI logbufs= value
+Set the number of in-memory log buffers. Valid numbers range
+from 2-8 inclusive.
+The default value is 8 buffers for filesystems with a
+blocksize of 64KiB, 4 buffers for filesystems with a blocksize
+of 32KiB, 3 buffers for filesystems with a blocksize of 16KiB
+and 2 buffers for all other configurations. Increasing the
+number of buffers may increase performance on some workloads
+at the cost of the memory used for the additional log buffers
+and their associated control structures.
+.TP
+.BI logbsize= value
+Set the size of each in-memory log buffer.
+Size may be specified in bytes, or in kilobytes with a "k" suffix.
+Valid sizes for version 1 and version 2 logs are 16384 (16k) and
+32768 (32k). Valid sizes for version 2 logs also include
+65536 (64k), 131072 (128k) and 262144 (256k).
+The default value for machines with more than 32MiB of memory
+is 32768, machines with less memory use 16384 by default.
+.TP
+\fBlogdev=\fP\fIdevice\fP and \fBrtdev=\fP\fIdevice\fP
+Use an external log (metadata journal) and/or real-time device.
+An XFS filesystem has up to three parts: a data section, a log section,
+and a real-time section.
+The real-time section is optional, and the log section can be separate
+from the data section or contained within it.
+Refer to
+.BR xfs (5).
+.TP
+.BI mtpt= mountpoint
+Use with the
+.B dmapi
+option. The value specified here will be
+included in the DMAPI mount event, and should be the path of
+the actual mountpoint that is used.
+.TP
+.B noalign
+Data allocations will not be aligned at stripe unit boundaries.
+.TP
+.B noatime
+Access timestamps are not updated when a file is read.
+.TP
+.B norecovery
+The filesystem will be mounted without running log recovery.
+If the filesystem was not cleanly unmounted, it is likely to
+be inconsistent when mounted in
+.B norecovery
+mode.
+Some files or directories may not be accessible because of this.
+Filesystems mounted
+.B norecovery
+must be mounted read-only or the mount will fail.
+.TP
+.B nouuid
+Don't check for double mounted filesystems using the filesystem uuid.
+This is useful to mount LVM snapshot volumes.
+.TP
+.B osyncisosync
+Make O_SYNC writes implement true O_SYNC. WITHOUT this option,
+Linux XFS behaves as if an
+.B osyncisdsync
+option is used,
+which will make writes to files opened with the O_SYNC flag set
+behave as if the O_DSYNC flag had been used instead.
+This can result in better performance without compromising
+data safety.
+However if this option is not in effect, timestamp updates from
+O_SYNC writes can be lost if the system crashes.
+If timestamp updates are critical, use the
+.B osyncisosync
+option.
+.TP
+.BR uquota | usrquota | uqnoenforce | quota
+User disk quota accounting enabled, and limits (optionally)
+enforced. Refer to
+.BR xfs_quota (8)
+for further details.
+.TP
+.BR gquota | grpquota | gqnoenforce
+Group disk quota accounting enabled and limits (optionally)
+enforced. Refer to
+.BR xfs_quota (8)
+for further details.
+.TP
+.BR pquota | prjquota | pqnoenforce
+Project disk quota accounting enabled and limits (optionally)
+enforced. Refer to
+.BR xfs_quota (8)
+for further details.
+.TP
+\fBsunit=\fP\fIvalue\fP and \fBswidth=\fP\fIvalue\fP
+Used to specify the stripe unit and width for a RAID device or a stripe
+volume.
+.I value
+must be specified in 512-byte block units.
+If this option is not specified and the filesystem was made on a stripe
+volume or the stripe width or unit were specified for the RAID device at
+mkfs time, then the mount system call will restore the value from the
+superblock.
+For filesystems that are made directly on RAID devices, these options can be
+used to override the information in the superblock if the underlying disk
+layout changes after the filesystem has been created.
+The
+.B swidth
+option is required if the
+.B sunit
+option has been specified,
+and must be a multiple of the
+.B sunit
+value.
+.TP
+.B swalloc
+Data allocations will be rounded up to stripe width boundaries
+when the current end of file is being extended and the file
+size is larger than the stripe width size.
+
+.SH "Mount options for xiafs"
+None. Although nothing is wrong with xiafs, it is not used much,
+and is not maintained. Probably one shouldn't use it.
+Since Linux version 2.1.21 xiafs is no longer part of the kernel source.
+
+.SH "THE LOOP DEVICE"
+One further possible type is a mount via the loop device. For example,
+the command
+
+.nf
+.B " mount /tmp/fdimage /mnt -t vfat -o loop=/dev/loop3
+.fi
+
+will set up the loop device
+.I /dev/loop3
+to correspond to the file
+.IR /tmp/fdimage ,
+and then mount this device on
+.IR /mnt .
+
+This type of mount knows about four options, namely
+.BR loop ", " offset ", " sizelimit " and " encryption ,
+that are really options to
+.BR \%losetup (8).
+If the mount requires a passphrase, you will be prompted for one unless
+you specify a file descriptor to read from instead with the
+.BR \-\-pass-fd
+option.
+(These options can be used in addition to those specific
+to the filesystem type.)
+
+If no explicit loop device is mentioned
+(but just an option `\fB\-o loop\fP' is given), then
+.B mount
+will try to find some unused loop device and use that.
+
+Since Linux 2.6.25 is supported auto-destruction of loop devices and
+then any loop device allocated by
+.B mount
+will be freed by
+.B umount
+independently on
+.IR /etc/mtab .
+
+You can also free a loop device by hand, using `losetup -d' or `umount -d`.
+
+.SH RETURN CODES
+.B mount
+has the following return codes (the bits can be ORed):
+.TP
+.BR 0
+success
+.TP
+.BR 1
+incorrect invocation or permissions
+.TP
+.BR 2
+system error (out of memory, cannot fork, no more loop devices)
+.TP
+.BR 4
+internal
+.B mount
+bug
+.TP
+.BR 8
+user interrupt
+.TP
+.BR 16
+problems writing or locking /etc/mtab
+.TP
+.BR 32
+mount failure
+.TP
+.BR 64
+some mount succeeded
+
+.SH NOTES
+The syntax of external mount helpers is:
+
+.RS
+.BI /sbin/mount. <suffix>
+.I spec dir
+.RB [ \-sfnv ]
+.RB [ \-o
+.IR options ]
+.RE
+
+where the <suffix> is filesystem type and \-sfnvo options have same meaning like
+standard mount options.
+
+.SH FILES
+.TP 18n
+.I /etc/fstab
+filesystem table
+.TP
+.I /etc/mtab
+table of mounted filesystems
+.TP
+.I /etc/mtab~
+lock file
+.TP
+.I /etc/mtab.tmp
+temporary file
+.TP
+.I /etc/filesystems
+a list of filesystem types to try
+
+.SH "SEE ALSO"
+.BR mount (2),
+.BR umount (2),
+.BR fstab (5),
+.BR umount (8),
+.BR swapon (8),
+.BR nfs (5),
+.BR xfs (5),
+.BR e2label (8),
+.BR xfs_admin (8),
+.BR mountd (8),
+.BR nfsd (8),
+.BR mke2fs (8),
+.BR tune2fs (8),
+.BR losetup (8)
+.SH BUGS
+It is possible for a corrupted filesystem to cause a crash.
+.PP
+Some Linux filesystems don't support
+.B "\-o sync and \-o dirsync"
+(the ext2, ext3, fat and vfat filesystems
+.I do
+support synchronous updates (a la BSD) when mounted with the
+.B sync
+option).
+.PP
+The
+.B "\-o remount"
+may not be able to change mount parameters (all
+.IR ext2fs -specific
+parameters, except
+.BR sb ,
+are changeable with a remount, for example, but you can't change
+.B gid
+or
+.B umask
+for the
+.IR fatfs ).
+.PP
+Mount by label or uuid will work only if your devices have the names listed in
+.IR /proc/partitions .
+In particular, it may well fail if the kernel was compiled with devfs
+but devfs is not mounted.
+.PP
+It is possible that files
+.IR /etc/mtab
+and
+.IR /proc/mounts
+don't match. The first file is based only on the mount command options, but the
+content of the second file also depends on the kernel and others settings (e.g.
+remote NFS server. In particular case the mount command may reports unreliable
+information about a NFS mount point and the /proc/mounts file usually contains
+more reliable information.)
+.PP
+Checking files on NFS filesystem referenced by file descriptors (i.e. the
+.BR fcntl
+and
+.BR ioctl
+families of functions) may lead to inconsistent result due to the lack of
+consistency check in kernel even if noac is used.
+.SH HISTORY
+A
+.B mount
+command existed in Version 5 AT&T UNIX.
+.SH AVAILABILITY
+The mount command is part of the util-linux-ng package and is available from
+ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
+
diff --git a/mount/mount.c b/mount/mount.c
new file mode 100644
index 0000000..fdd5689
--- /dev/null
+++ b/mount/mount.c
@@ -0,0 +1,2305 @@
+/*
+ * A mount(8) for Linux.
+ *
+ * Modifications by many people. Distributed under GPL.
+ */
+
+#include <unistd.h>
+#include <ctype.h>
+#include <errno.h>
+#include <string.h>
+#include <getopt.h>
+#include <stdio.h>
+
+#include <pwd.h>
+#include <grp.h>
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <sys/mount.h>
+
+#include <mntent.h>
+
+#ifdef HAVE_LIBSELINUX
+#include <selinux/selinux.h>
+#include <selinux/context.h>
+#endif
+
+#include "pathnames.h"
+#include "fsprobe.h"
+#include "devname.h"
+#include "mount_constants.h"
+#include "sundries.h"
+#include "xmalloc.h"
+#include "mount_mntent.h"
+#include "fstab.h"
+#include "lomount.h"
+#include "loop.h"
+#include "getusername.h"
+#include "env.h"
+#include "nls.h"
+#include "blkdev.h"
+
+#define DO_PS_FIDDLING
+
+#ifdef DO_PS_FIDDLING
+#include "setproctitle.h"
+#endif
+
+/* True for fake mount (-f). */
+static int fake = 0;
+
+/* True if we are allowed to call /sbin/mount.${FSTYPE} */
+static int external_allowed = 1;
+
+/* Don't write an entry in /etc/mtab (-n). */
+static int nomtab = 0;
+
+/* True for explicit readonly (-r). */
+static int readonly = 0;
+
+/* Nonzero for chatty (-v). */
+int verbose = 0;
+
+/* Do we hash the password or not */
+int hash_pass = 1;
+
+/* Nonzero for sloppy (-s). */
+static int sloppy = 0;
+
+/* True for explicit read/write (-w). */
+static int readwrite = 0;
+
+/* True for all mount (-a). */
+static int mount_all = 0;
+
+/* True for fork() during all mount (-F). */
+static int optfork = 0;
+
+/* Add volumelabel in a listing of mounted devices (-l). */
+static int list_with_volumelabel = 0;
+
+/* Nonzero for mount {bind|move|make-shared|make-private|
+ * make-unbindable|make-slave}
+ */
+static int mounttype = 0;
+
+/* True if (ruid != euid) or (0 != ruid), i.e. only "user" mounts permitted. */
+static int restricted = 1;
+
+/* Contains the fd to read the passphrase from, if any. */
+static int pfd = -1;
+
+/* Contains the preferred keysize in bits we want to use */
+static int keysz = 0;
+
+/* mount(2) options */
+struct mountargs {
+ const char *spec;
+ const char *node;
+ const char *type;
+ int flags;
+ void *data;
+};
+
+/* Map from -o and fstab option strings to the flag argument to mount(2). */
+struct opt_map {
+ const char *opt; /* option name */
+ int skip; /* skip in mtab option string */
+ int inv; /* true if flag value should be inverted */
+ int mask; /* flag mask value */
+};
+
+/* Custom mount options for our own purposes. */
+/* Maybe these should now be freed for kernel use again */
+#define MS_NOAUTO 0x80000000
+#define MS_USERS 0x40000000
+#define MS_USER 0x20000000
+#define MS_OWNER 0x10000000
+#define MS_GROUP 0x08000000
+#define MS_COMMENT 0x02000000
+#define MS_LOOP 0x00010000
+
+/* Options that we keep the mount system call from seeing. */
+#define MS_NOSYS (MS_NOAUTO|MS_USERS|MS_USER|MS_COMMENT|MS_LOOP)
+
+/* Options that we keep from appearing in the options field in the mtab. */
+#define MS_NOMTAB (MS_REMOUNT|MS_NOAUTO|MS_USERS|MS_USER)
+
+#define MS_PROPAGATION (MS_SHARED|MS_SLAVE|MS_UNBINDABLE|MS_PRIVATE)
+
+/* Options that we make ordinary users have by default. */
+#define MS_SECURE (MS_NOEXEC|MS_NOSUID|MS_NODEV)
+
+/* Options that we make owner-mounted devices have by default */
+#define MS_OWNERSECURE (MS_NOSUID|MS_NODEV)
+
+static const struct opt_map opt_map[] = {
+ { "defaults", 0, 0, 0 }, /* default options */
+ { "ro", 1, 0, MS_RDONLY }, /* read-only */
+ { "rw", 1, 1, MS_RDONLY }, /* read-write */
+ { "exec", 0, 1, MS_NOEXEC }, /* permit execution of binaries */
+ { "noexec", 0, 0, MS_NOEXEC }, /* don't execute binaries */
+ { "suid", 0, 1, MS_NOSUID }, /* honor suid executables */
+ { "nosuid", 0, 0, MS_NOSUID }, /* don't honor suid executables */
+ { "dev", 0, 1, MS_NODEV }, /* interpret device files */
+ { "nodev", 0, 0, MS_NODEV }, /* don't interpret devices */
+ { "sync", 0, 0, MS_SYNCHRONOUS}, /* synchronous I/O */
+ { "async", 0, 1, MS_SYNCHRONOUS}, /* asynchronous I/O */
+ { "dirsync", 0, 0, MS_DIRSYNC}, /* synchronous directory modifications */
+ { "remount", 0, 0, MS_REMOUNT}, /* Alter flags of mounted FS */
+ { "bind", 0, 0, MS_BIND }, /* Remount part of tree elsewhere */
+ { "rbind", 0, 0, MS_BIND|MS_REC }, /* Idem, plus mounted subtrees */
+ { "auto", 0, 1, MS_NOAUTO }, /* Can be mounted using -a */
+ { "noauto", 0, 0, MS_NOAUTO }, /* Can only be mounted explicitly */
+ { "users", 0, 0, MS_USERS }, /* Allow ordinary user to mount */
+ { "nousers", 0, 1, MS_USERS }, /* Forbid ordinary user to mount */
+ { "user", 0, 0, MS_USER }, /* Allow ordinary user to mount */
+ { "nouser", 0, 1, MS_USER }, /* Forbid ordinary user to mount */
+ { "owner", 0, 0, MS_OWNER }, /* Let the owner of the device mount */
+ { "noowner", 0, 1, MS_OWNER }, /* Device owner has no special privs */
+ { "group", 0, 0, MS_GROUP }, /* Let the group of the device mount */
+ { "nogroup", 0, 1, MS_GROUP }, /* Device group has no special privs */
+ { "_netdev", 0, 0, MS_COMMENT}, /* Device requires network */
+ { "comment", 0, 0, MS_COMMENT}, /* fstab comment only (kudzu,_netdev)*/
+
+ /* add new options here */
+#ifdef MS_NOSUB
+ { "sub", 0, 1, MS_NOSUB }, /* allow submounts */
+ { "nosub", 0, 0, MS_NOSUB }, /* don't allow submounts */
+#endif
+#ifdef MS_SILENT
+ { "quiet", 0, 0, MS_SILENT }, /* be quiet */
+ { "loud", 0, 1, MS_SILENT }, /* print out messages. */
+#endif
+#ifdef MS_MANDLOCK
+ { "mand", 0, 0, MS_MANDLOCK }, /* Allow mandatory locks on this FS */
+ { "nomand", 0, 1, MS_MANDLOCK }, /* Forbid mandatory locks on this FS */
+#endif
+ { "loop", 1, 0, MS_LOOP }, /* use a loop device */
+#ifdef MS_NOATIME
+ { "atime", 0, 1, MS_NOATIME }, /* Update access time */
+ { "noatime", 0, 0, MS_NOATIME }, /* Do not update access time */
+#endif
+#ifdef MS_I_VERSION
+ { "iversion", 0, 0, MS_I_VERSION }, /* Update inode I_version time */
+ { "noiversion", 0, 1, MS_I_VERSION }, /* Don't update inode I_version time */
+#endif
+#ifdef MS_NODIRATIME
+ { "diratime", 0, 1, MS_NODIRATIME }, /* Update dir access times */
+ { "nodiratime", 0, 0, MS_NODIRATIME },/* Do not update dir access times */
+#endif
+#ifdef MS_RELATIME
+ { "relatime", 0, 0, MS_RELATIME }, /* Update access times relative to
+ mtime/ctime */
+ { "norelatime", 0, 1, MS_RELATIME }, /* Update access time without regard
+ to mtime/ctime */
+#endif
+#ifdef MS_STRICTATIME
+ { "strictatime", 0, 0, MS_STRICTATIME }, /* Strict atime semantics */
+ { "nostrictatime", 0, 1, MS_STRICTATIME }, /* kernel default atime */
+#endif
+ { "nofail", 0, 0, MS_COMMENT}, /* Do not fail if ENOENT on dev */
+ { NULL, 0, 0, 0 }
+};
+
+static int opt_nofail = 0;
+
+static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_sizelimit,
+ *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper;
+static const char *opt_keybits, *opt_nohashpass;
+
+static int mounted (const char *spec0, const char *node0);
+static int check_special_mountprog(const char *spec, const char *node,
+ const char *type, int flags, char *extra_opts, int *status);
+
+static struct string_opt_map {
+ char *tag;
+ int skip;
+ const char **valptr;
+} string_opt_map[] = {
+ { "loop=", 0, &opt_loopdev },
+ { "vfs=", 1, &opt_vfstype },
+ { "offset=", 0, &opt_offset },
+ { "sizelimit=", 0, &opt_sizelimit },
+ { "encryption=", 0, &opt_encryption },
+ { "keybits=", 0, &opt_keybits },
+ { "nohashpass", 0, &opt_nohashpass },
+ { "speed=", 0, &opt_speed },
+ { "comment=", 1, &opt_comment },
+ { "uhelper=", 0, &opt_uhelper },
+ { NULL, 0, NULL }
+};
+
+static void
+clear_string_opts(void) {
+ struct string_opt_map *m;
+
+ for (m = &string_opt_map[0]; m->tag; m++)
+ *(m->valptr) = NULL;
+}
+
+static int
+parse_string_opt(char *s) {
+ struct string_opt_map *m;
+ int lth;
+
+ for (m = &string_opt_map[0]; m->tag; m++) {
+ lth = strlen(m->tag);
+ if (!strncmp(s, m->tag, lth)) {
+ *(m->valptr) = xstrdup(s + lth);
+ return 1;
+ }
+ }
+ return 0;
+}
+
+/* Report on a single mount. */
+static void
+print_one (const struct my_mntent *me) {
+ if (mount_quiet)
+ return;
+ printf ("%s on %s", me->mnt_fsname, me->mnt_dir);
+ if (me->mnt_type != NULL && *(me->mnt_type) != '\0')
+ printf (" type %s", me->mnt_type);
+ if (me->mnt_opts != NULL)
+ printf (" (%s)", me->mnt_opts);
+ if (list_with_volumelabel && is_pseudo_fs(me->mnt_type) == 0) {
+ const char *devname = spec_to_devname(me->mnt_fsname);
+
+ if (devname) {
+ const char *label;
+
+ label = fsprobe_get_label_by_devname(devname);
+ my_free(devname);
+
+ if (label) {
+ printf (" [%s]", label);
+ my_free(label);
+ }
+ }
+ }
+ printf ("\n");
+}
+
+/* Report on everything in mtab (of the specified types if any). */
+static int
+print_all (char *types) {
+ struct mntentchn *mc, *mc0;
+
+ mc0 = mtab_head();
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) {
+ if (matching_type (mc->m.mnt_type, types))
+ print_one (&(mc->m));
+ }
+ exit (0);
+}
+
+/* reallocates its first arg */
+static char *
+append_opt(char *s, const char *opt, const char *val)
+{
+ if (!opt)
+ return s;
+ if (!s) {
+ if (!val)
+ return xstrdup(opt); /* opt */
+
+ return xstrconcat3(NULL, opt, val); /* opt=val */
+ }
+ if (!val)
+ return xstrconcat3(s, ",", opt); /* s,opt */
+
+ return xstrconcat4(s, ",", opt, val); /* s,opt=val */
+}
+
+static char *
+append_numopt(char *s, const char *opt, long num)
+{
+ char buf[32];
+
+ snprintf(buf, sizeof(buf), "%ld", num);
+ return append_opt(s, opt, buf);
+}
+
+#ifdef HAVE_LIBSELINUX
+/* strip quotes from a "string"
+ * Warning: This function modify the "str" argument.
+ */
+static char *
+strip_quotes(char *str)
+{
+ char *end = NULL;
+
+ if (*str != '"')
+ return str;
+
+ end = strrchr(str, '"');
+ if (end == NULL || end == str)
+ die (EX_USAGE, _("mount: improperly quoted option string '%s'"), str);
+
+ *end = '\0';
+ return str+1;
+}
+
+/* translates SELinux context from human to raw format and
+ * appends it to the mount extra options.
+ *
+ * returns -1 on error and 0 on success
+ */
+static int
+append_context(const char *optname, char *optdata, char **extra_opts)
+{
+ security_context_t raw = NULL;
+ char *data = NULL;
+
+ if (is_selinux_enabled() != 1)
+ /* ignore the option if we running without selinux */
+ return 0;
+
+ if (optdata==NULL || *optdata=='\0' || optname==NULL)
+ return -1;
+
+ /* TODO: use strip_quotes() for all mount options? */
+ data = *optdata =='"' ? strip_quotes(optdata) : optdata;
+
+ if (selinux_trans_to_raw_context(
+ (security_context_t) data, &raw) == -1 ||
+ raw == NULL)
+ return -1;
+
+ if (verbose)
+ printf(_("mount: translated %s '%s' to '%s'\n"),
+ optname, data, (char *) raw);
+
+ *extra_opts = append_opt(*extra_opts, optname, NULL);
+ *extra_opts = xstrconcat4(*extra_opts, "\"", (char *) raw, "\"");
+
+ freecon(raw);
+ return 0;
+}
+#endif
+
+/*
+ * Look for OPT in opt_map table and return mask value.
+ * If OPT isn't found, tack it onto extra_opts (which is non-NULL).
+ * For the options uid= and gid= replace user or group name by its value.
+ */
+static inline void
+parse_opt(char *opt, int *mask, char **extra_opts) {
+ const struct opt_map *om;
+
+ for (om = opt_map; om->opt != NULL; om++)
+ if (streq (opt, om->opt)) {
+ if (om->inv)
+ *mask &= ~om->mask;
+ else
+ *mask |= om->mask;
+ if ((om->mask == MS_USER || om->mask == MS_USERS)
+ && !om->inv)
+ *mask |= MS_SECURE;
+ if ((om->mask == MS_OWNER || om->mask == MS_GROUP)
+ && !om->inv)
+ *mask |= MS_OWNERSECURE;
+#ifdef MS_SILENT
+ if (om->mask == MS_SILENT && om->inv) {
+ mount_quiet = 1;
+ verbose = 0;
+ }
+#endif
+ if (streq(opt, "nofail"))
+ opt_nofail = 1;
+ return;
+ }
+
+ /* convert nonnumeric ids to numeric */
+ if (!strncmp(opt, "uid=", 4) && !isdigit(opt[4])) {
+ struct passwd *pw = getpwnam(opt+4);
+
+ if (pw) {
+ *extra_opts = append_numopt(*extra_opts,
+ "uid=", pw->pw_uid);
+ return;
+ }
+ }
+ if (!strncmp(opt, "gid=", 4) && !isdigit(opt[4])) {
+ struct group *gr = getgrnam(opt+4);
+
+ if (gr) {
+ *extra_opts = append_numopt(*extra_opts,
+ "gid=", gr->gr_gid);
+ return;
+ }
+ }
+
+#ifdef HAVE_LIBSELINUX
+ if (strncmp(opt, "context=", 8) == 0 && *(opt+8)) {
+ if (append_context("context=", opt+8, extra_opts) == 0)
+ return;
+ }
+ if (strncmp(opt, "fscontext=", 10) == 0 && *(opt+10)) {
+ if (append_context("fscontext=", opt+10, extra_opts) == 0)
+ return;
+ }
+ if (strncmp(opt, "defcontext=", 11) == 0 && *(opt+11)) {
+ if (append_context("defcontext=", opt+11, extra_opts) == 0)
+ return;
+ }
+ if (strncmp(opt, "rootcontext=", 12) == 0 && *(opt+12)) {
+ if (append_context("rootcontext=", opt+12, extra_opts) == 0)
+ return;
+ }
+#endif
+ *extra_opts = append_opt(*extra_opts, opt, NULL);
+}
+
+/* Take -o options list and compute 4th and 5th args to mount(2). flags
+ gets the standard options (indicated by bits) and extra_opts all the rest */
+static void
+parse_opts (const char *options, int *flags, char **extra_opts) {
+ *flags = 0;
+ *extra_opts = NULL;
+
+ clear_string_opts();
+
+ if (options != NULL) {
+ char *opts = xstrdup(options);
+ int open_quote = 0;
+ char *opt, *p;
+
+ for (p=opts, opt=NULL; p && *p; p++) {
+ if (!opt)
+ opt = p; /* begin of the option item */
+ if (*p == '"')
+ open_quote ^= 1; /* reverse the status */
+ if (open_quote)
+ continue; /* still in quoted block */
+ if (*p == ',')
+ *p = '\0'; /* terminate the option item */
+ /* end of option item or last item */
+ if (*p == '\0' || *(p+1) == '\0') {
+ if (!parse_string_opt(opt))
+ parse_opt(opt, flags, extra_opts);
+ opt = NULL;
+ }
+ }
+ free(opts);
+ }
+
+ if (readonly)
+ *flags |= MS_RDONLY;
+ if (readwrite)
+ *flags &= ~MS_RDONLY;
+
+ if (mounttype & MS_PROPAGATION)
+ *flags &= ~MS_BIND;
+ *flags |= mounttype;
+}
+
+/* Try to build a canonical options string. */
+static char *
+fix_opts_string (int flags, const char *extra_opts, const char *user) {
+ const struct opt_map *om;
+ const struct string_opt_map *m;
+ char *new_opts;
+
+ new_opts = append_opt(NULL, (flags & MS_RDONLY) ? "ro" : "rw", NULL);
+ for (om = opt_map; om->opt != NULL; om++) {
+ if (om->skip)
+ continue;
+ if (om->inv || !om->mask || (flags & om->mask) != om->mask)
+ continue;
+ new_opts = append_opt(new_opts, om->opt, NULL);
+ flags &= ~om->mask;
+ }
+ for (m = &string_opt_map[0]; m->tag; m++) {
+ if (!m->skip && *(m->valptr))
+ new_opts = append_opt(new_opts, m->tag, *(m->valptr));
+ }
+ if (extra_opts && *extra_opts)
+ new_opts = append_opt(new_opts, extra_opts, NULL);
+
+ if (user)
+ new_opts = append_opt(new_opts, "user=", user);
+
+ return new_opts;
+}
+
+static int
+already (const char *spec0, const char *node0) {
+ struct mntentchn *mc;
+ int ret = 1;
+ char *spec = canonicalize_spec(spec0);
+ char *node = canonicalize(node0);
+
+ if ((mc = getmntfile(node)) != NULL)
+ error (_("mount: according to mtab, "
+ "%s is already mounted on %s"),
+ mc->m.mnt_fsname, node);
+ else if (spec && strcmp (spec, "none") &&
+ (mc = getmntfile(spec)) != NULL)
+ error (_("mount: according to mtab, %s is mounted on %s"),
+ spec, mc->m.mnt_dir);
+ else
+ ret = 0;
+
+ free(spec);
+ free(node);
+
+ return ret;
+}
+
+/* Create mtab with a root entry. */
+static void
+create_mtab (void) {
+ struct mntentchn *fstab;
+ struct my_mntent mnt;
+ int flags;
+ mntFILE *mfp;
+
+ lock_mtab();
+
+ mfp = my_setmntent (_PATH_MOUNTED, "a+");
+ if (mfp == NULL || mfp->mntent_fp == NULL) {
+ int errsv = errno;
+ die (EX_FILEIO, _("mount: can't open %s for writing: %s"),
+ _PATH_MOUNTED, strerror (errsv));
+ }
+
+ /* Find the root entry by looking it up in fstab */
+ if ((fstab = getfs_by_dir ("/")) || (fstab = getfs_by_dir ("root"))) {
+ char *extra_opts;
+ parse_opts (fstab->m.mnt_opts, &flags, &extra_opts);
+ mnt.mnt_dir = "/";
+ mnt.mnt_fsname = spec_to_devname(fstab->m.mnt_fsname);
+ mnt.mnt_type = fstab->m.mnt_type;
+ mnt.mnt_opts = fix_opts_string (flags, extra_opts, NULL);
+ mnt.mnt_freq = mnt.mnt_passno = 0;
+ free(extra_opts);
+
+ if (mnt.mnt_fsname && my_addmntent (mfp, &mnt) == 1) {
+ int errsv = errno;
+ die (EX_FILEIO, _("mount: error writing %s: %s"),
+ _PATH_MOUNTED, strerror (errsv));
+ }
+ }
+ if (fchmod (fileno (mfp->mntent_fp), 0644) < 0)
+ if (errno != EROFS) {
+ int errsv = errno;
+ die (EX_FILEIO,
+ _("mount: error changing mode of %s: %s"),
+ _PATH_MOUNTED, strerror (errsv));
+ }
+ my_endmntent (mfp);
+
+ unlock_mtab();
+
+ reset_mtab_info();
+}
+
+/* count successful mount system calls */
+static int mountcount = 0;
+
+/*
+ * do_mount_syscall()
+ * Mount a single file system. Keep track of successes.
+ * returns: 0: OK, -1: error in errno
+ */
+static int
+do_mount_syscall (struct mountargs *args) {
+ int flags = args->flags;
+
+ if ((flags & MS_MGC_MSK) == 0)
+ flags |= MS_MGC_VAL;
+
+ if (verbose > 2)
+ printf("mount: mount(2) syscall: source: \"%s\", target: \"%s\", "
+ "filesystemtype: \"%s\", mountflags: %d, data: %s\n",
+ args->spec, args->node, args->type, flags, (char *) args->data);
+
+ return mount (args->spec, args->node, args->type, flags, args->data);
+}
+
+/*
+ * do_mount()
+ * Mount a single file system, possibly invoking an external handler to
+ * do so. Keep track of successes.
+ * returns: 0: OK, -1: error in errno
+ */
+static int
+do_mount (struct mountargs *args, int *special, int *status) {
+ int ret;
+ if (check_special_mountprog(args->spec, args->node, args->type,
+ args->flags, args->data, status)) {
+ *special = 1;
+ ret = 0;
+ } else
+ ret = do_mount_syscall(args);
+
+ if (ret == 0)
+ mountcount++;
+ return ret;
+}
+
+/*
+ * check_special_mountprog()
+ * If there is a special mount program for this type, exec it.
+ * returns: 0: no exec was done, 1: exec was done, status has result
+ */
+static int
+check_special_mountprog(const char *spec, const char *node, const char *type, int flags,
+ char *extra_opts, int *status) {
+ char mountprog[120];
+ struct stat statbuf;
+ int res;
+
+ if (!external_allowed)
+ return 0;
+
+ if (type == NULL || strcmp(type, "none") == 0)
+ return 0;
+
+ if (strlen(type) < 100) {
+ sprintf(mountprog, "/sbin/mount.%s", type);
+ if (stat(mountprog, &statbuf) == 0) {
+ if (verbose)
+ fflush(stdout);
+ res = fork();
+ if (res == 0) {
+ char *oo, *mountargs[10];
+ int i = 0;
+
+ if(setgid(getgid()) < 0)
+ die(EX_FAIL, _("mount: cannot set group id: %s"), strerror(errno));
+
+ if(setuid(getuid()) < 0)
+ die(EX_FAIL, _("mount: cannot set user id: %s"), strerror(errno));
+
+ oo = fix_opts_string (flags, extra_opts, NULL);
+ mountargs[i++] = mountprog; /* 1 */
+ mountargs[i++] = (char *) spec; /* 2 */
+ mountargs[i++] = (char *) node; /* 3 */
+ if (sloppy && strncmp(type, "nfs", 3) == 0)
+ mountargs[i++] = "-s"; /* 4 */
+ if (fake)
+ mountargs[i++] = "-f"; /* 5 */
+ if (nomtab)
+ mountargs[i++] = "-n"; /* 6 */
+ if (verbose)
+ mountargs[i++] = "-v"; /* 7 */
+ if (oo && *oo) {
+ mountargs[i++] = "-o"; /* 8 */
+ mountargs[i++] = oo; /* 9 */
+ }
+ mountargs[i] = NULL; /* 10 */
+
+ if (verbose > 2) {
+ i = 0;
+ while(mountargs[i]) {
+ printf("mount: external mount: argv[%d] = \"%s\"\n",
+ i, mountargs[i]);
+ i++;
+ }
+ fflush(stdout);
+ }
+
+ execv(mountprog, mountargs);
+ exit(1); /* exec failed */
+ } else if (res != -1) {
+ int st;
+ wait(&st);
+ *status = (WIFEXITED(st) ? WEXITSTATUS(st) : EX_SYSERR);
+ return 1;
+ } else {
+ int errsv = errno;
+ error(_("mount: cannot fork: %s"), strerror(errsv));
+ }
+ }
+ }
+ return 0;
+}
+
+
+/* list of already tested filesystems by procfsloop_mount() */
+static struct tried {
+ struct tried *next;
+ char *type;
+} *tried = NULL;
+
+static int
+was_tested(const char *fstype) {
+ struct tried *t;
+
+ if (fsprobe_known_fstype(fstype))
+ return 1;
+ for (t = tried; t; t = t->next) {
+ if (!strcmp(t->type, fstype))
+ return 1;
+ }
+ return 0;
+}
+
+static void
+set_tested(const char *fstype) {
+ struct tried *t = xmalloc(sizeof(struct tried));
+
+ t->next = tried;
+ t->type = xstrdup(fstype);
+ tried = t;
+}
+
+static void
+free_tested(void) {
+ struct tried *t, *tt;
+
+ t = tried;
+ while(t) {
+ free(t->type);
+ tt = t->next;
+ free(t);
+ t = tt;
+ }
+ tried = NULL;
+}
+
+static char *
+procfsnext(FILE *procfs) {
+ char line[100];
+ char fsname[100];
+
+ while (fgets(line, sizeof(line), procfs)) {
+ if (sscanf (line, "nodev %[^\n]\n", fsname) == 1) continue;
+ if (sscanf (line, " %[^ \n]\n", fsname) != 1) continue;
+ return xstrdup(fsname);
+ }
+ return 0;
+}
+
+/* Only use /proc/filesystems here, this is meant to test what
+ the kernel knows about, so /etc/filesystems is irrelevant.
+ Return: 1: yes, 0: no, -1: cannot open procfs */
+static int
+known_fstype_in_procfs(const char *type)
+{
+ FILE *procfs;
+ char *fsname;
+ int ret = -1;
+
+ procfs = fopen(_PATH_PROC_FILESYSTEMS, "r");
+ if (procfs) {
+ ret = 0;
+ while ((fsname = procfsnext(procfs)) != NULL)
+ if (!strcmp(fsname, type)) {
+ ret = 1;
+ break;
+ }
+ fclose(procfs);
+ procfs = NULL;
+ }
+ return ret;
+}
+
+/* Try all types in FILESYSTEMS, except those in *types,
+ in case *types starts with "no" */
+/* return: 0: OK, -1: error in errno, 1: type not found */
+/* when 0 or -1 is returned, *types contains the type used */
+/* when 1 is returned, *types is NULL */
+static int
+procfsloop_mount(int (*mount_fn)(struct mountargs *, int *, int *),
+ struct mountargs *args,
+ const char **types,
+ int *special, int *status)
+{
+ char *files[2] = { _PATH_FILESYSTEMS, _PATH_PROC_FILESYSTEMS };
+ FILE *procfs;
+ char *fsname;
+ const char *notypes = NULL;
+ int no = 0;
+ int ret = 1;
+ int errsv = 0;
+ int i;
+
+ if (*types && !strncmp(*types, "no", 2)) {
+ no = 1;
+ notypes = (*types) + 2;
+ }
+ *types = NULL;
+
+ /* Use _PATH_PROC_FILESYSTEMS only when _PATH_FILESYSTEMS
+ * (/etc/filesystems) does not exist. In some cases trying a
+ * filesystem that the kernel knows about on the wrong data will crash
+ * the kernel; in such cases _PATH_FILESYSTEMS can be used to list the
+ * filesystems that we are allowed to try, and in the order they should
+ * be tried. End _PATH_FILESYSTEMS with a line containing a single '*'
+ * only, if _PATH_PROC_FILESYSTEMS should be tried afterwards.
+ */
+ for (i=0; i<2; i++) {
+ procfs = fopen(files[i], "r");
+ if (!procfs)
+ continue;
+ while ((fsname = procfsnext(procfs)) != NULL) {
+ if (!strcmp(fsname, "*")) {
+ fclose(procfs);
+ goto nexti;
+ }
+ if (was_tested (fsname))
+ continue;
+ if (no && matching_type(fsname, notypes))
+ continue;
+ set_tested (fsname);
+ args->type = fsname;
+ if (verbose)
+ printf(_("Trying %s\n"), fsname);
+ if ((*mount_fn) (args, special, status) == 0) {
+ *types = fsname;
+ ret = 0;
+ break;
+ } else if (errno != EINVAL &&
+ known_fstype_in_procfs(fsname) == 1) {
+ *types = "guess";
+ ret = -1;
+ errsv = errno;
+ break;
+ }
+ }
+ free_tested();
+ fclose(procfs);
+ errno = errsv;
+ return ret;
+ nexti:;
+ }
+ return 1;
+}
+
+static const char *
+guess_fstype_by_devname(const char *devname)
+{
+ const char *type = fsprobe_get_fstype_by_devname(devname);
+
+ if (verbose) {
+ printf (_("mount: you didn't specify a filesystem type for %s\n"), devname);
+
+ if (!type)
+ printf (_(" I will try all types mentioned in %s or %s\n"),
+ _PATH_FILESYSTEMS, _PATH_PROC_FILESYSTEMS);
+ else if (!strcmp(type, MNTTYPE_SWAP))
+ printf (_(" and it looks like this is swapspace\n"));
+ else
+ printf (_(" I will try type %s\n"), type);
+ }
+ return type;
+}
+
+/*
+ * guess_fstype_and_mount()
+ * Mount a single file system. Guess the type when unknown.
+ * returns: 0: OK, -1: error in errno, 1: other error
+ * don't exit on non-fatal errors.
+ * on return types is filled with the type used.
+ */
+static int
+guess_fstype_and_mount(const char *spec, const char *node, const char **types,
+ int flags, char *mount_opts, int *special, int *status) {
+ struct mountargs args = { spec, node, NULL, flags & ~MS_NOSYS, mount_opts };
+
+ if (*types && strcasecmp (*types, "auto") == 0)
+ *types = NULL;
+
+ if (!*types && !(flags & MS_REMOUNT)) {
+ *types = guess_fstype_by_devname(spec);
+ if (*types) {
+ if (!strcmp(*types, MNTTYPE_SWAP)) {
+ error(_("%s looks like swapspace - not mounted"), spec);
+ *types = NULL;
+ return 1;
+ } else {
+ args.type = *types;
+ return do_mount (&args, special, status);
+ }
+ }
+ }
+
+ /* Accept a comma-separated list of types, and try them one by one */
+ /* A list like "nonfs,.." indicates types not to use */
+ if (*types && strncmp(*types, "no", 2) && strchr(*types,',')) {
+ char *t = strdup(*types);
+ char *p;
+
+ while((p = strchr(t,',')) != NULL) {
+ *p = 0;
+ args.type = *types = t;
+ if (do_mount (&args, special, status) == 0)
+ return 0;
+ t = p+1;
+ }
+ /* do last type below */
+ *types = t;
+ }
+
+ if (*types || (flags & MS_REMOUNT)) {
+ args.type = *types;
+ return do_mount (&args, special, status);
+ }
+
+ return procfsloop_mount(do_mount, &args, types, special, status);
+}
+
+/*
+ * restricted_check()
+ * Die if the user is not allowed to do this.
+ */
+static void
+restricted_check(const char *spec, const char *node, int *flags, char **user) {
+ if (restricted) {
+ /*
+ * MS_OWNER: Allow owners to mount when fstab contains
+ * the owner option. Note that this should never be used
+ * in a high security environment, but may be useful to give
+ * people at the console the possibility of mounting a floppy.
+ * MS_GROUP: Allow members of device group to mount. (Martin Dickopp)
+ */
+ if (*flags & (MS_OWNER | MS_GROUP)) {
+ struct stat sb;
+
+ if (!strncmp(spec, "/dev/", 5) && stat(spec, &sb) == 0) {
+
+ if (*flags & MS_OWNER) {
+ if (getuid() == sb.st_uid)
+ *flags |= MS_USER;
+ }
+
+ if (*flags & MS_GROUP) {
+ if (getgid() == sb.st_gid)
+ *flags |= MS_USER;
+ else {
+ int n = getgroups(0, NULL);
+
+ if (n > 0) {
+ gid_t *groups = xmalloc(n * sizeof(*groups));
+ if (getgroups(n, groups) == n) {
+ int i;
+ for (i = 0; i < n; i++) {
+ if (groups[i] == sb.st_gid) {
+ *flags |= MS_USER;
+ break;
+ }
+ }
+ }
+ free(groups);
+ }
+ }
+ }
+ }
+ }
+
+ /* James Kehl <mkehl@gil.com.au> came with a similar patch:
+ allow an arbitrary user to mount when he is the owner of
+ the mount-point and has write-access to the device.
+ This is even less secure. Let me skip it for the time being;
+ there should be an explicit fstab line allowing such things. */
+
+ if (!(*flags & (MS_USER | MS_USERS))) {
+ if (already (spec, node))
+ die (EX_USAGE, _("mount failed"));
+ else
+ die (EX_USAGE, _("mount: only root can mount %s on %s"), spec, node);
+ }
+ if (*flags & MS_USER)
+ *user = getusername();
+ }
+
+ *flags &= ~(MS_OWNER | MS_GROUP);
+}
+
+/* Check, if there already exists a mounted loop device on the mountpoint node
+ * with the same parameters.
+ */
+static int
+is_mounted_same_loopfile(const char *node0, const char *loopfile, unsigned long long offset)
+{
+ struct mntentchn *mnt = NULL;
+ char *node;
+ int res = 0;
+
+ node = canonicalize(node0);
+
+ /* Search for mountpoint node in mtab,
+ * procceed if any of these has the loop option set or
+ * the device is a loop device
+ */
+ mnt = getmntdirbackward(node, mnt);
+ if (!mnt) {
+ free(node);
+ return 0;
+ }
+ for(; mnt && res == 0; mnt = getmntdirbackward(node, mnt)) {
+ char *p;
+
+ if (strncmp(mnt->m.mnt_fsname, "/dev/loop", 9) == 0)
+ res = loopfile_used_with((char *) mnt->m.mnt_fsname,
+ loopfile, offset);
+
+ else if ((p = strstr(mnt->m.mnt_opts, "loop="))) {
+ char *dev = xstrdup(p+5);
+ if ((p = strchr(dev, ',')))
+ *p = '\0';
+ res = loopfile_used_with(dev, loopfile, offset);
+ free(dev);
+ }
+ }
+
+ free(node);
+ return res;
+}
+
+static int
+loop_check(const char **spec, const char **type, int *flags,
+ int *loop, const char **loopdev, const char **loopfile,
+ const char *node) {
+ int looptype;
+ unsigned long long offset, sizelimit;
+
+ /*
+ * In the case of a loop mount, either type is of the form lo@/dev/loop5
+ * or the option "-o loop=/dev/loop5" or just "-o loop" is given, or
+ * mount just has to figure things out for itself from the fact that
+ * spec is not a block device. We do not test for a block device
+ * immediately: maybe later other types of mountable objects will occur.
+ */
+
+ *loopdev = opt_loopdev;
+
+ looptype = (*type && strncmp("lo@", *type, 3) == 0);
+ if (looptype) {
+ if (*loopdev)
+ error(_("mount: loop device specified twice"));
+ *loopdev = *type + 3;
+ *type = opt_vfstype;
+ } else if (opt_vfstype) {
+ if (*type)
+ error(_("mount: type specified twice"));
+ else
+ *type = opt_vfstype;
+ }
+
+ *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_sizelimit || opt_encryption || opt_keybits);
+ *loopfile = *spec;
+
+ if (*loop) {
+ *flags |= MS_LOOP;
+ if (fake) {
+ if (verbose)
+ printf(_("mount: skipping the setup of a loop device\n"));
+ } else {
+ int loop_opts = SETLOOP_AUTOCLEAR; /* always attempt autoclear */
+ int res;
+
+ if (*flags & MS_RDONLY)
+ loop_opts |= SETLOOP_RDONLY;
+
+ offset = opt_offset ? strtoull(opt_offset, NULL, 0) : 0;
+ sizelimit = opt_sizelimit ? strtoull(opt_sizelimit, NULL, 0) : 0;
+
+ if (is_mounted_same_loopfile(node, *loopfile, offset)) {
+ error(_("mount: according to mtab %s is already mounted on %s as loop"), *loopfile, node);
+ return EX_FAIL;
+ }
+
+ do {
+ if (!*loopdev || !**loopdev)
+ *loopdev = find_unused_loop_device();
+ if (!*loopdev)
+ return EX_SYSERR; /* no more loop devices */
+ if (verbose)
+ printf(_("mount: going to use the loop device %s\n"), *loopdev);
+ if (!keysz && opt_keybits)
+ keysz = strtoul(opt_keybits, NULL, 0);
+ if (opt_nohashpass)
+ hash_pass=0;
+ if ((res = set_loop(*loopdev, *loopfile, offset, sizelimit,
+ opt_encryption, pfd, &loop_opts, keysz, hash_pass))) {
+ if (res == 2) {
+ /* loop dev has been grabbed by some other process,
+ try again, if not given explicitly */
+ if (!opt_loopdev) {
+ if (verbose)
+ printf(_("mount: stolen loop=%s ...trying again\n"), *loopdev);
+ my_free(*loopdev);
+ *loopdev = NULL;
+ continue;
+ }
+ error(_("mount: stolen loop=%s"), *loopdev);
+ return EX_FAIL;
+
+ } else {
+ if (verbose)
+ printf(_("mount: failed setting up loop device\n"));
+ if (!opt_loopdev) {
+ my_free(*loopdev);
+ *loopdev = NULL;
+ }
+ return EX_FAIL;
+ }
+ }
+ } while (!*loopdev);
+
+ if (verbose > 1)
+ printf(_("mount: setup loop device successfully\n"));
+ *spec = *loopdev;
+
+ if (loop_opts & SETLOOP_RDONLY)
+ *flags |= MS_RDONLY;
+
+ if (loop_opts & SETLOOP_AUTOCLEAR)
+ /* Prevent recording loop dev in mtab for cleanup on umount */
+ *loop = 0;
+ }
+ }
+
+ return 0;
+}
+
+static void
+update_mtab_entry(const char *spec, const char *node, const char *type,
+ const char *opts, int flags, int freq, int pass) {
+ struct my_mntent mnt;
+
+ mnt.mnt_fsname = is_pseudo_fs(type) ? xstrdup(spec) : canonicalize(spec);
+ mnt.mnt_dir = canonicalize (node);
+ mnt.mnt_type = type;
+ mnt.mnt_opts = opts;
+ mnt.mnt_freq = freq;
+ mnt.mnt_passno = pass;
+
+ /* We get chatty now rather than after the update to mtab since the
+ mount succeeded, even if the write to /etc/mtab should fail. */
+ if (verbose)
+ print_one (&mnt);
+
+ if (!nomtab && mtab_does_not_exist()) {
+ if (verbose > 1)
+ printf(_("mount: no %s found - creating it..\n"),
+ _PATH_MOUNTED);
+ create_mtab ();
+ }
+
+ if (!nomtab && mtab_is_writable()) {
+ if (flags & MS_REMOUNT)
+ update_mtab (mnt.mnt_dir, &mnt);
+ else if (flags & MS_MOVE)
+ update_mtab(mnt.mnt_fsname, &mnt);
+ else {
+ mntFILE *mfp;
+
+ lock_mtab();
+ mfp = my_setmntent(_PATH_MOUNTED, "a+");
+ if (mfp == NULL || mfp->mntent_fp == NULL) {
+ int errsv = errno;
+ error(_("mount: can't open %s: %s"), _PATH_MOUNTED,
+ strerror (errsv));
+ } else {
+ if ((my_addmntent (mfp, &mnt)) == 1) {
+ int errsv = errno;
+ error(_("mount: error writing %s: %s"),
+ _PATH_MOUNTED, strerror (errsv));
+ }
+ }
+ my_endmntent(mfp);
+ unlock_mtab();
+ }
+ }
+ my_free(mnt.mnt_fsname);
+ my_free(mnt.mnt_dir);
+}
+
+static void
+set_pfd(char *s) {
+ if (!isdigit(*s))
+ die(EX_USAGE,
+ _("mount: argument to -p or --pass-fd must be a number"));
+ pfd = atoi(optarg);
+}
+
+static void
+cdrom_setspeed(const char *spec) {
+#define CDROM_SELECT_SPEED 0x5322 /* Set the CD-ROM speed */
+ if (opt_speed) {
+ int cdrom;
+ int speed = atoi(opt_speed);
+
+ if ((cdrom = open(spec, O_RDONLY | O_NONBLOCK)) < 0)
+ die(EX_FAIL,
+ _("mount: cannot open %s for setting speed"),
+ spec);
+ if (ioctl(cdrom, CDROM_SELECT_SPEED, speed) < 0)
+ die(EX_FAIL, _("mount: cannot set speed: %s"),
+ strerror(errno));
+ close(cdrom);
+ }
+}
+
+/*
+ * try_mount_one()
+ * Try to mount one file system.
+ *
+ * returns: 0: OK, EX_SYSERR, EX_FAIL, return code from nfsmount,
+ * return status from wait
+ */
+static int
+try_mount_one (const char *spec0, const char *node0, const char *types0,
+ const char *opts0, int freq, int pass, int ro) {
+ int res = 0, status = 0, special = 0;
+ int mnt5_res = 0; /* only for gcc */
+ int mnt_err;
+ int flags;
+ char *extra_opts; /* written in mtab */
+ char *mount_opts; /* actually used on system call */
+ const char *opts, *spec, *node, *types;
+ char *user = 0;
+ int loop = 0;
+ const char *loopdev = 0, *loopfile = 0;
+ struct stat statbuf;
+ int retries = 0; /* Nr of retries for mount in case of ENOMEDIUM */
+
+ /* copies for freeing on exit */
+ const char *opts1, *spec1, *node1, *types1, *extra_opts1;
+
+ if (verbose > 2) {
+ printf("mount: spec: \"%s\"\n", spec0);
+ printf("mount: node: \"%s\"\n", node0);
+ printf("mount: types: \"%s\"\n", types0);
+ printf("mount: opts: \"%s\"\n", opts0);
+ }
+
+ spec = spec1 = xstrdup(spec0);
+ node = node1 = xstrdup(node0);
+ types = types1 = xstrdup(types0);
+ opts = opts1 = xstrdup(opts0);
+
+ parse_opts (opts, &flags, &extra_opts);
+ extra_opts1 = extra_opts;
+
+ /* quietly succeed for fstab entries that don't get mounted automatically */
+ if (mount_all && (flags & MS_NOAUTO))
+ goto out;
+
+ restricted_check(spec, node, &flags, &user);
+
+ /* The "mount -f" checks for for existing record in /etc/mtab (with
+ * regular non-fake mount this is usually done by kernel)
+ */
+ if (!(flags & MS_REMOUNT) && fake && mounted (spec, node))
+ die(EX_USAGE, _("mount: according to mtab, "
+ "%s is already mounted on %s\n"),
+ spec, node);
+
+ mount_opts = extra_opts;
+
+ if (opt_speed)
+ cdrom_setspeed(spec);
+
+ if (!(flags & MS_REMOUNT)) {
+ /*
+ * Don't set up a (new) loop device if we only remount - this left
+ * stale assignments of files to loop devices. Nasty when used for
+ * encryption.
+ */
+ res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile, node);
+ if (res)
+ goto out;
+ }
+
+ if (loop)
+ opt_loopdev = loopdev;
+
+ if (flags & (MS_BIND | MS_MOVE | MS_PROPAGATION))
+ types = "none";
+
+ /*
+ * Call mount.TYPE for types that require a separate mount program.
+ * For the moment these types are ncpfs and smbfs. Maybe also vxfs.
+ * All such special things must occur isolated in the types string.
+ */
+ if (check_special_mountprog(spec, node, types, flags, extra_opts, &status)) {
+ res = status;
+ goto out;
+ }
+
+mount_retry:
+ block_signals (SIG_BLOCK);
+
+ if (!fake) {
+ mnt5_res = guess_fstype_and_mount (spec, node, &types, flags & ~MS_NOSYS,
+ mount_opts, &special, &status);
+
+ if (special) {
+ block_signals (SIG_UNBLOCK);
+ res = status;
+ goto out;
+ }
+ }
+
+ if (fake || mnt5_res == 0) {
+ /* Mount succeeded, report this (if verbose) and write mtab entry. */
+
+ if (!(mounttype & MS_PROPAGATION)) {
+ update_mtab_entry(loop ? loopfile : spec,
+ node,
+ types ? types : "unknown",
+ fix_opts_string (flags & ~MS_NOMTAB, extra_opts, user),
+ flags,
+ freq,
+ pass);
+ }
+
+ block_signals (SIG_UNBLOCK);
+ res = 0;
+ goto out;
+ }
+
+ mnt_err = errno;
+
+ if (loop)
+ del_loop(spec);
+
+ block_signals (SIG_UNBLOCK);
+
+ /* Mount failed, complain, but don't die. */
+
+ if (types == 0) {
+ if (restricted)
+ error (_("mount: I could not determine the filesystem type, "
+ "and none was specified"));
+ else
+ error (_("mount: you must specify the filesystem type"));
+ } else if (mnt5_res != -1) {
+ /* should not happen */
+ error (_("mount: mount failed"));
+ } else {
+ switch (mnt_err) {
+ case EPERM:
+ if (geteuid() == 0) {
+ if (stat (node, &statbuf) || !S_ISDIR(statbuf.st_mode))
+ error (_("mount: mount point %s is not a directory"), node);
+ else
+ error (_("mount: permission denied"));
+ } else
+ error (_("mount: must be superuser to use mount"));
+ break;
+ case EBUSY:
+ if (flags & MS_REMOUNT) {
+ error (_("mount: %s is busy"), node);
+ } else if (!strcmp(types, "proc") && !strcmp(node, "/proc")) {
+ /* heuristic: if /proc/version exists, then probably proc is mounted */
+ if (stat ("/proc/version", &statbuf)) /* proc mounted? */
+ error (_("mount: %s is busy"), node); /* no */
+ else if (!mount_all || verbose) /* yes, don't mention it */
+ error (_("mount: proc already mounted"));
+ } else {
+ error (_("mount: %s already mounted or %s busy"), spec, node);
+ already (spec, node);
+ }
+ break;
+ case ENOENT:
+ if (lstat (node, &statbuf))
+ error (_("mount: mount point %s does not exist"), node);
+ else if (stat (node, &statbuf))
+ error (_("mount: mount point %s is a symbolic link to nowhere"),
+ node);
+ else if (stat (spec, &statbuf)) {
+ if (opt_nofail)
+ goto out;
+ error (_("mount: special device %s does not exist"), spec);
+ } else {
+ errno = mnt_err;
+ perror("mount");
+ }
+ break;
+ case ENOTDIR:
+ if (stat (node, &statbuf) || ! S_ISDIR(statbuf.st_mode))
+ error (_("mount: mount point %s is not a directory"), node);
+ else if (stat (spec, &statbuf) && errno == ENOTDIR) {
+ if (opt_nofail)
+ goto out;
+ error (_("mount: special device %s does not exist\n"
+ " (a path prefix is not a directory)\n"), spec);
+ } else {
+ errno = mnt_err;
+ perror("mount");
+ }
+ break;
+ case EINVAL:
+ { int fd;
+ unsigned long long size = 0;
+
+ if (flags & MS_REMOUNT) {
+ error (_("mount: %s not mounted already, or bad option"), node);
+ } else {
+ error (_("mount: wrong fs type, bad option, bad superblock on %s,\n"
+ " missing codepage or helper program, or other error"),
+ spec);
+
+ if (stat(spec, &statbuf) < 0) {
+ if (errno == ENOENT) /* network FS? */
+ error(_(
+ " (for several filesystems (e.g. nfs, cifs) you might\n"
+ " need a /sbin/mount.<type> helper program)"));
+
+ } else if (S_ISBLK(statbuf.st_mode)
+ && (fd = open(spec, O_RDONLY | O_NONBLOCK)) >= 0) {
+
+ if (blkdev_get_size(fd, &size) == 0) {
+ if (size == 0 && !loop)
+ error(_(
+ " (could this be the IDE device where you in fact use\n"
+ " ide-scsi so that sr0 or sda or so is needed?)"));
+
+ if (size && size <= 2)
+ error(_(
+ " (aren't you trying to mount an extended partition,\n"
+ " instead of some logical partition inside?)"));
+
+ close(fd);
+ }
+ }
+ error(_(
+ " In some cases useful info is found in syslog - try\n"
+ " dmesg | tail or so\n"));
+ }
+ break;
+ }
+ case EMFILE:
+ error (_("mount table full")); break;
+ case EIO:
+ error (_("mount: %s: can't read superblock"), spec); break;
+ case ENODEV:
+ {
+ int pfs = known_fstype_in_procfs(types);
+
+ if (pfs == 1 || !strcmp(types, "guess"))
+ error(_("mount: %s: unknown device"), spec);
+ else if (pfs == 0) {
+ char *lowtype, *p;
+ int u;
+
+ error (_("mount: unknown filesystem type '%s'"), types);
+
+ /* maybe this loser asked for FAT or ISO9660 or isofs */
+ lowtype = xstrdup(types);
+ u = 0;
+ for(p=lowtype; *p; p++) {
+ if(tolower(*p) != *p) {
+ *p = tolower(*p);
+ u++;
+ }
+ }
+ if (u && known_fstype_in_procfs(lowtype) == 1)
+ error (_("mount: probably you meant %s"), lowtype);
+ else if (!strncmp(lowtype, "iso", 3) &&
+ known_fstype_in_procfs("iso9660") == 1)
+ error (_("mount: maybe you meant 'iso9660'?"));
+ else if (!strncmp(lowtype, "fat", 3) &&
+ known_fstype_in_procfs("vfat") == 1)
+ error (_("mount: maybe you meant 'vfat'?"));
+ free(lowtype);
+ } else
+ error (_("mount: %s has wrong device number or fs type %s not supported"),
+ spec, types);
+ break;
+ }
+ case ENOTBLK:
+ if (opt_nofail)
+ goto out;
+ if (stat (spec, &statbuf)) /* strange ... */
+ error (_("mount: %s is not a block device, and stat fails?"), spec);
+ else if (S_ISBLK(statbuf.st_mode))
+ error (_("mount: the kernel does not recognize %s as a block device\n"
+ " (maybe `insmod driver'?)"), spec);
+ else if (S_ISREG(statbuf.st_mode))
+ error (_("mount: %s is not a block device (maybe try `-o loop'?)"),
+ spec);
+ else
+ error (_("mount: %s is not a block device"), spec);
+ break;
+ case ENXIO:
+ if (opt_nofail)
+ goto out;
+ error (_("mount: %s is not a valid block device"), spec); break;
+ case EACCES: /* pre-linux 1.1.38, 1.1.41 and later */
+ case EROFS: /* linux 1.1.38 and later */
+ { char *bd = (loop ? "" : _("block device "));
+ if (ro || (flags & MS_RDONLY)) {
+ error (_("mount: cannot mount %s%s read-only"),
+ bd, spec);
+ break;
+ } else if (readwrite) {
+ error (_("mount: %s%s is write-protected but explicit `-w' flag given"),
+ bd, spec);
+ break;
+ } else if (flags & MS_REMOUNT) {
+ error (_("mount: cannot remount %s%s read-write, is write-protected"),
+ bd, spec);
+ break;
+ } else {
+ opts = opts0;
+ types = types0;
+
+ if (opts) {
+ char *opts2 = append_opt(xstrdup(opts), "ro", NULL);
+ my_free(opts1);
+ opts = opts1 = opts2;
+ } else
+ opts = "ro";
+ if (types && !strcmp(types, "guess"))
+ types = 0;
+ error (_("mount: %s%s is write-protected, mounting read-only"),
+ bd, spec0);
+ res = try_mount_one (spec0, node0, types, opts, freq, pass, 1);
+ goto out;
+ }
+ break;
+ }
+ case ENOMEDIUM:
+ if (retries < CRDOM_NOMEDIUM_RETRIES) {
+ if (verbose)
+ printf(_("mount: no medium found on %s ...trying again\n"),
+ spec);
+ sleep(3);
+ ++retries;
+ goto mount_retry;
+ }
+ error(_("mount: no medium found on %s"), spec);
+ break;
+ default:
+ error ("mount: %s", strerror (mnt_err)); break;
+ }
+ }
+ res = EX_FAIL;
+
+ out:
+
+#if defined(HAVE_LIBSELINUX) && defined(HAVE_SECURITY_GET_INITIAL_CONTEXT)
+ if (res != EX_FAIL && verbose && is_selinux_enabled() > 0) {
+ security_context_t raw = NULL, def = NULL;
+
+ if (getfilecon(node, &raw) > 0 &&
+ security_get_initial_context("file", &def) == 0) {
+
+ if (!selinux_file_context_cmp(raw, def))
+ printf(_("mount: %s does not contain SELinux labels.\n"
+ " You just mounted an file system that supports labels which does not\n"
+ " contain labels, onto an SELinux box. It is likely that confined\n"
+ " applications will generate AVC messages and not be allowed access to\n"
+ " this file system. For more details see restorecon(8) and mount(8).\n"),
+ node);
+ }
+ freecon(raw);
+ freecon(def);
+ }
+#endif
+
+ my_free(extra_opts1);
+ my_free(spec1);
+ my_free(node1);
+ my_free(opts1);
+ my_free(types1);
+
+ return res;
+}
+
+static char *
+subst_string(const char *s, const char *sub, int sublen, const char *repl) {
+ char *n;
+
+ n = (char *) xmalloc(strlen(s)-sublen+strlen(repl)+1);
+ strncpy (n, s, sub-s);
+ strcpy (n + (sub-s), repl);
+ strcat (n, sub+sublen);
+ return n;
+}
+
+static char *
+usersubst(const char *opts) {
+ char *s, *w;
+ char id[40];
+
+ if (!opts)
+ return NULL;
+
+ s = "uid=useruid";
+ if (opts && (w = strstr(opts, s)) != NULL) {
+ sprintf(id, "uid=%d", getuid());
+ opts = subst_string(opts, w, strlen(s), id);
+ }
+ s = "gid=usergid";
+ if (opts && (w = strstr(opts, s)) != NULL) {
+ sprintf(id, "gid=%d", getgid());
+ opts = subst_string(opts, w, strlen(s), id);
+ }
+ return xstrdup(opts);
+}
+
+static int
+is_existing_file (const char *s) {
+ struct stat statbuf;
+
+ return (stat(s, &statbuf) == 0);
+}
+
+/*
+ * Return 0 for success (either mounted sth or -a and NOAUTO was given)
+ */
+static int
+mount_one (const char *spec, const char *node, const char *types,
+ const char *fstabopts, char *cmdlineopts, int freq, int pass) {
+ const char *nspec;
+ char *opts;
+
+ /* Substitute values in opts, if required */
+ opts = usersubst(fstabopts);
+
+ /* Merge the fstab and command line options. */
+ opts = append_opt(opts, cmdlineopts, NULL);
+
+ if (types == NULL && !mounttype && !is_existing_file(spec)) {
+ if (strchr (spec, ':') != NULL) {
+ types = "nfs";
+ if (verbose)
+ printf(_("mount: no type was given - "
+ "I'll assume nfs because of "
+ "the colon\n"));
+ } else if(!strncmp(spec, "//", 2)) {
+ types = "cifs";
+ if (verbose)
+ printf(_("mount: no type was given - "
+ "I'll assume cifs because of "
+ "the // prefix\n"));
+ }
+ }
+
+ /* Handle possible LABEL= and UUID= forms of spec */
+ if (types == NULL || (strncmp(types, "nfs", 3) &&
+ strncmp(types, "cifs", 4) &&
+ strncmp(types, "smbfs", 5))) {
+ nspec = spec_to_devname(spec);
+ if (nspec)
+ spec = nspec;
+ }
+
+ return try_mount_one (spec, node, types, opts, freq, pass, 0);
+}
+
+/* Check if an fsname/dir pair was already in the old mtab. */
+static int
+mounted (const char *spec0, const char *node0) {
+ struct mntentchn *mc, *mc0;
+ const char *spec, *node;
+ int ret = 0;
+
+ /* Handle possible UUID= and LABEL= in spec */
+ spec = spec_to_devname(spec0);
+ if (!spec)
+ return ret;
+
+ node = canonicalize(node0);
+
+ mc0 = mtab_head();
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
+ if (streq (spec, mc->m.mnt_fsname) &&
+ streq (node, mc->m.mnt_dir)) {
+ ret = 1;
+ break;
+ }
+
+ my_free(spec);
+ my_free(node);
+
+ return ret;
+}
+
+/* avoid using stat() on things we are not going to mount anyway.. */
+static int
+has_noauto (const char *opts) {
+ char *s;
+
+ if (!opts)
+ return 0;
+ s = strstr(opts, "noauto");
+ if (!s)
+ return 0;
+ return (s == opts || s[-1] == ',') && (s[6] == 0 || s[6] == ',');
+}
+
+/* Mount all filesystems of the specified types except swap and root. */
+/* With the --fork option: fork and let different incarnations of
+ mount handle different filesystems. However, try to avoid several
+ simultaneous mounts on the same physical disk, since that is very slow. */
+#define DISKMAJOR(m) (((int) m) & ~0xf)
+
+static int
+do_mount_all (char *types, char *options, char *test_opts) {
+ struct mntentchn *mc, *mc0, *mtmp;
+ int status = 0;
+ struct stat statbuf;
+ struct child {
+ pid_t pid;
+ char *group;
+ struct mntentchn *mec;
+ struct mntentchn *meclast;
+ struct child *nxt;
+ } childhead, *childtail, *cp;
+ char major[22];
+ char *g, *colon;
+
+ /* build a chain of what we have to do, or maybe
+ several chains, one for each major or NFS host */
+ childhead.nxt = 0;
+ childtail = &childhead;
+ mc0 = fstab_head();
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) {
+ if (has_noauto (mc->m.mnt_opts))
+ continue;
+ if (matching_type (mc->m.mnt_type, types)
+ && matching_opts (mc->m.mnt_opts, test_opts)
+ && !streq (mc->m.mnt_dir, "/")
+ && !streq (mc->m.mnt_dir, "root")) {
+
+ if (mounted (mc->m.mnt_fsname, mc->m.mnt_dir)) {
+ if (verbose)
+ printf(_("mount: %s already mounted "
+ "on %s\n"),
+ mc->m.mnt_fsname,
+ mc->m.mnt_dir);
+ continue;
+ }
+
+ mtmp = (struct mntentchn *) xmalloc(sizeof(*mtmp));
+ *mtmp = *mc;
+ mtmp->nxt = 0;
+ g = NULL;
+ if (optfork) {
+ if (stat(mc->m.mnt_fsname, &statbuf) == 0 &&
+ S_ISBLK(statbuf.st_mode)) {
+ sprintf(major, "#%x",
+ DISKMAJOR(statbuf.st_rdev));
+ g = major;
+ }
+ if (strcmp(mc->m.mnt_type, "nfs") == 0) {
+ g = xstrdup(mc->m.mnt_fsname);
+ colon = strchr(g, ':');
+ if (colon)
+ *colon = '\0';
+ }
+ }
+ if (g) {
+ for (cp = childhead.nxt; cp; cp = cp->nxt)
+ if (cp->group &&
+ strcmp(cp->group, g) == 0) {
+ cp->meclast->nxt = mtmp;
+ cp->meclast = mtmp;
+ goto fnd;
+ }
+ }
+ cp = (struct child *) xmalloc(sizeof *cp);
+ cp->nxt = 0;
+ cp->mec = cp->meclast = mtmp;
+ cp->group = xstrdup(g);
+ cp->pid = 0;
+ childtail->nxt = cp;
+ childtail = cp;
+ fnd:;
+
+ }
+ }
+
+ /* now do everything */
+ for (cp = childhead.nxt; cp; cp = cp->nxt) {
+ pid_t p = -1;
+ if (optfork) {
+ p = fork();
+ if (p == -1) {
+ int errsv = errno;
+ error(_("mount: cannot fork: %s"),
+ strerror (errsv));
+ }
+ else if (p != 0)
+ cp->pid = p;
+ }
+
+ /* if child, or not forked, do the mounting */
+ if (p == 0 || p == -1) {
+ for (mc = cp->mec; mc; mc = mc->nxt) {
+ status |= mount_one (mc->m.mnt_fsname,
+ mc->m.mnt_dir,
+ mc->m.mnt_type,
+ mc->m.mnt_opts,
+ options, 0, 0);
+ }
+ if (mountcount)
+ status |= EX_SOMEOK;
+ if (p == 0)
+ exit(status);
+ }
+ }
+
+ /* wait for children, if any */
+ while ((cp = childhead.nxt) != NULL) {
+ childhead.nxt = cp->nxt;
+ if (cp->pid) {
+ int ret;
+ keep_waiting:
+ if(waitpid(cp->pid, &ret, 0) == -1) {
+ if (errno == EINTR)
+ goto keep_waiting;
+ perror("waitpid");
+ } else if (WIFEXITED(ret))
+ status |= WEXITSTATUS(ret);
+ else
+ status |= EX_SYSERR;
+ }
+ }
+ if (mountcount)
+ status |= EX_SOMEOK;
+ return status;
+}
+
+static struct option longopts[] = {
+ { "all", 0, 0, 'a' },
+ { "fake", 0, 0, 'f' },
+ { "fork", 0, 0, 'F' },
+ { "help", 0, 0, 'h' },
+ { "no-mtab", 0, 0, 'n' },
+ { "read-only", 0, 0, 'r' },
+ { "ro", 0, 0, 'r' },
+ { "verbose", 0, 0, 'v' },
+ { "version", 0, 0, 'V' },
+ { "read-write", 0, 0, 'w' },
+ { "rw", 0, 0, 'w' },
+ { "options", 1, 0, 'o' },
+ { "test-opts", 1, 0, 'O' },
+ { "pass-fd", 1, 0, 'p' },
+ { "keybits", 1, 0, 'k' },
+ { "types", 1, 0, 't' },
+ { "bind", 0, 0, 'B' },
+ { "move", 0, 0, 'M' },
+ { "guess-fstype", 1, 0, 134 },
+ { "rbind", 0, 0, 'R' },
+ { "make-shared", 0, 0, 136 },
+ { "make-slave", 0, 0, 137 },
+ { "make-private", 0, 0, 138 },
+ { "make-unbindable", 0, 0, 139 },
+ { "make-rshared", 0, 0, 140 },
+ { "make-rslave", 0, 0, 141 },
+ { "make-rprivate", 0, 0, 142 },
+ { "make-runbindable", 0, 0, 143 },
+ { "internal-only", 0, 0, 'i' },
+ { NULL, 0, 0, 0 }
+};
+
+/* Keep the usage message at max 22 lines, each at most 70 chars long.
+ The user should not need a pager to read it. */
+static void
+usage (FILE *fp, int n) {
+ fprintf(fp, _(
+ "Usage: mount -V : print version\n"
+ " mount -h : print this help\n"
+ " mount : list mounted filesystems\n"
+ " mount -l : idem, including volume labels\n"
+ "So far the informational part. Next the mounting.\n"
+ "The command is `mount [-t fstype] something somewhere'.\n"
+ "Details found in /etc/fstab may be omitted.\n"
+ " mount -a [-t|-O] ... : mount all stuff from /etc/fstab\n"
+ " mount device : mount device at the known place\n"
+ " mount directory : mount known device here\n"
+ " mount -t type dev dir : ordinary mount command\n"
+ "Note that one does not really mount a device, one mounts\n"
+ "a filesystem (of the given type) found on the device.\n"
+ "One can also mount an already visible directory tree elsewhere:\n"
+ " mount --bind olddir newdir\n"
+ "or move a subtree:\n"
+ " mount --move olddir newdir\n"
+ "One can change the type of mount containing the directory dir:\n"
+ " mount --make-shared dir\n"
+ " mount --make-slave dir\n"
+ " mount --make-private dir\n"
+ " mount --make-unbindable dir\n"
+ "One can change the type of all the mounts in a mount subtree\n"
+ "containing the directory dir:\n"
+ " mount --make-rshared dir\n"
+ " mount --make-rslave dir\n"
+ " mount --make-rprivate dir\n"
+ " mount --make-runbindable dir\n"
+ "A device can be given by name, say /dev/hda1 or /dev/cdrom,\n"
+ "or by label, using -L label or by uuid, using -U uuid .\n"
+ "Other options: [-nfFrsvw] [-o options] [-p passwdfd].\n"
+ "For many more details, say man 8 mount .\n"
+ ));
+
+ unlock_mtab();
+ exit (n);
+}
+
+/* returns mount entry from fstab */
+static struct mntentchn *
+getfs(const char *spec, const char *uuid, const char *label)
+{
+ struct mntentchn *mc = NULL;
+ const char *devname = NULL;
+
+ if (!spec && !uuid && !label)
+ return NULL;
+
+ /*
+ * A) 99% of all cases, the spec on cmdline matches
+ * with spec in fstab
+ */
+ if (uuid)
+ mc = getfs_by_uuid(uuid);
+ else if (label)
+ mc = getfs_by_label(label);
+ else {
+ mc = getfs_by_spec(spec);
+
+ if (!mc)
+ mc = getfs_by_dir(spec);
+ }
+ if (mc)
+ return mc;
+
+ /*
+ * B) UUID or LABEL on cmdline, but devname in fstab
+ */
+ if (uuid)
+ devname = fsprobe_get_devname_by_uuid(uuid);
+ else if (label)
+ devname = fsprobe_get_devname_by_label(label);
+ else
+ devname = spec_to_devname(spec);
+
+ if (devname)
+ mc = getfs_by_devname(devname);
+
+ /*
+ * C) mixed
+ */
+ if (!mc && devname) {
+ const char *id = NULL;
+
+ if (!label && (!spec || strncmp(spec, "LABEL=", 6))) {
+ id = fsprobe_get_label_by_devname(devname);
+ if (id)
+ mc = getfs_by_label(id);
+ }
+ if (!mc && !uuid && (!spec || strncmp(spec, "UUID=", 5))) {
+ id = fsprobe_get_uuid_by_devname(devname);
+ if (id)
+ mc = getfs_by_uuid(id);
+ }
+ my_free(id);
+
+ if (mc) {
+ /* use real device name to avoid repetitional
+ * conversion from LABEL/UUID to devname
+ */
+ my_free(mc->m.mnt_fsname);
+ mc->m.mnt_fsname = xstrdup(devname);
+ }
+ }
+
+ /*
+ * D) remount -- try /etc/mtab
+ * Earlier mtab was tried first, but this would sometimes try the
+ * wrong mount in case mtab had the root device entry wrong.
+ */
+ if (!mc && (devname || spec))
+ mc = getmntfile (devname ? devname : spec);
+
+ my_free(devname);
+ return mc;
+}
+
+
+static void
+print_version(int rc) {
+ printf( "mount from %s (with "
+#ifdef HAVE_LIBBLKID
+ "libblkid"
+#else
+ "libvolume_id"
+#endif
+#ifdef HAVE_LIBSELINUX
+ " and selinux"
+#endif
+ " support)\n", PACKAGE_STRING);
+ exit(rc);
+}
+
+int
+main(int argc, char *argv[]) {
+ int c, result = 0, specseen;
+ char *options = NULL, *test_opts = NULL, *node;
+ const char *spec = NULL;
+ char *label = NULL;
+ char *keysize = NULL;
+ char *uuid = NULL;
+ char *types = NULL;
+ char *p;
+ struct mntentchn *mc;
+ int fd;
+
+ sanitize_env();
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
+ progname = argv[0];
+ if ((p = strrchr(progname, '/')) != NULL)
+ progname = p+1;
+
+ umask(022);
+
+ /* People report that a mount called from init without console
+ writes error messages to /etc/mtab
+ Let us try to avoid getting fd's 0,1,2 */
+ while((fd = open("/dev/null", O_RDWR)) == 0 || fd == 1 || fd == 2) ;
+ if (fd > 2)
+ close(fd);
+
+ fsprobe_init();
+
+#ifdef DO_PS_FIDDLING
+ initproctitle(argc, argv);
+#endif
+
+ while ((c = getopt_long (argc, argv, "aBfFhik:lL:Mno:O:p:rRsU:vVwt:",
+ longopts, NULL)) != -1) {
+ switch (c) {
+ case 'a': /* mount everything in fstab */
+ ++mount_all;
+ break;
+ case 'B': /* bind */
+ mounttype = MS_BIND;
+ break;
+ case 'f': /* fake: don't actually call mount(2) */
+ ++fake;
+ break;
+ case 'F':
+ ++optfork;
+ break;
+ case 'h': /* help */
+ usage (stdout, 0);
+ break;
+ case 'i':
+ external_allowed = 0;
+ break;
+ case 'k':
+ keysize = optarg;
+ break;
+ case 'l':
+ list_with_volumelabel = 1;
+ break;
+ case 'L':
+ label = optarg;
+ break;
+ case 'M': /* move */
+ mounttype = MS_MOVE;
+ break;
+ case 'n': /* do not write /etc/mtab */
+ ++nomtab;
+ break;
+ case 'o': /* specify mount options */
+ options = append_opt(options, optarg, NULL);
+ break;
+ case 'O': /* with -t: mount only if (not) opt */
+ test_opts = append_opt(test_opts, optarg, NULL);
+ break;
+ case 'p': /* fd on which to read passwd */
+ set_pfd(optarg);
+ break;
+ case 'r': /* mount readonly */
+ readonly = 1;
+ readwrite = 0;
+ break;
+ case 'R': /* rbind */
+ mounttype = (MS_BIND | MS_REC);
+ break;
+ case 's': /* allow sloppy mount options */
+ sloppy = 1;
+ break;
+ case 't': /* specify file system types */
+ types = optarg;
+ break;
+ case 'U':
+ uuid = optarg;
+ break;
+ case 'v': /* be chatty - more so if repeated */
+ ++verbose;
+ break;
+ case 'V': /* version */
+ print_version(EXIT_SUCCESS);
+ break;
+ case 'w': /* mount read/write */
+ readwrite = 1;
+ readonly = 0;
+ break;
+ case 0:
+ break;
+
+ case 134:
+ /* undocumented, may go away again:
+ call: mount --guess-fstype device
+ use only for testing purposes -
+ the guessing is not reliable at all */
+ {
+ const char *fstype;
+ fstype = fsprobe_get_fstype_by_devname(optarg);
+ printf("%s\n", fstype ? fstype : "unknown");
+ exit(fstype ? 0 : EX_FAIL);
+ }
+
+ case 136:
+ mounttype = MS_SHARED;
+ break;
+
+ case 137:
+ mounttype = MS_SLAVE;
+ break;
+
+ case 138:
+ mounttype = MS_PRIVATE;
+ break;
+
+ case 139:
+ mounttype = MS_UNBINDABLE;
+ break;
+
+ case 140:
+ mounttype = (MS_SHARED | MS_REC);
+ break;
+
+ case 141:
+ mounttype = (MS_SLAVE | MS_REC);
+ break;
+
+ case 142:
+ mounttype = (MS_PRIVATE | MS_REC);
+ break;
+
+ case 143:
+ mounttype = (MS_UNBINDABLE | MS_REC);
+ break;
+
+ case '?':
+ default:
+ usage (stderr, EX_USAGE);
+ }
+ }
+
+ if (verbose > 2) {
+ printf("mount: fstab path: \"%s\"\n", _PATH_MNTTAB);
+ printf("mount: mtab path: \"%s\"\n", _PATH_MOUNTED);
+ printf("mount: lock path: \"%s\"\n", _PATH_MOUNTED_LOCK);
+ printf("mount: temp path: \"%s\"\n", _PATH_MOUNTED_TMP);
+ printf("mount: UID: %d\n", getuid());
+ printf("mount: eUID: %d\n", geteuid());
+ }
+
+ argc -= optind;
+ argv += optind;
+
+ specseen = (uuid || label) ? 1 : 0; /* yes, .. i know */
+
+ if (argc+specseen == 0 && !mount_all) {
+ if (options || mounttype)
+ usage (stderr, EX_USAGE);
+ return print_all (types);
+ }
+
+ {
+ const uid_t ruid = getuid();
+ const uid_t euid = geteuid();
+
+ /* if we're really root and aren't running setuid */
+ if (((uid_t)0 == ruid) && (ruid == euid)) {
+ restricted = 0;
+ }
+ }
+
+ if (restricted &&
+ (types || options || readwrite || nomtab || mount_all ||
+ fake || mounttype || (argc + specseen) != 1)) {
+ die (EX_USAGE, _("mount: only root can do that"));
+ }
+
+ if (keysize && sscanf(keysize,"%d",&keysz) != 1)
+ die (EX_USAGE, _("mount: argument to --keybits or -k must be a number"));
+
+ atexit(unlock_mtab);
+
+ switch (argc+specseen) {
+ case 0:
+ /* mount -a */
+ result = do_mount_all (types, options, test_opts);
+ if (result == 0 && verbose && !fake)
+ error(_("nothing was mounted"));
+ break;
+
+ case 1:
+ /* mount [-nfrvw] [-o options] special | node
+ * mount -L label (or -U uuid)
+ * (/etc/fstab is necessary)
+ */
+ if (types != NULL)
+ usage (stderr, EX_USAGE);
+
+ if (uuid || label)
+ mc = getfs(NULL, uuid, label);
+ else
+ mc = getfs(*argv, NULL, NULL);
+
+ if (!mc) {
+ if (uuid || label)
+ die (EX_USAGE, _("mount: no such partition found"));
+
+ die (EX_USAGE,
+ _("mount: can't find %s in %s or %s"),
+ *argv, _PATH_MNTTAB, _PATH_MOUNTED);
+ }
+
+ result = mount_one (xstrdup (mc->m.mnt_fsname),
+ xstrdup (mc->m.mnt_dir),
+ xstrdup (mc->m.mnt_type),
+ mc->m.mnt_opts, options, 0, 0);
+ break;
+
+ case 2:
+ /* mount special node (/etc/fstab is not necessary) */
+ if (specseen) {
+ /* mount -L label node (or -U uuid) */
+ spec = uuid ? fsprobe_get_devname_by_uuid(uuid) :
+ fsprobe_get_devname_by_label(label);
+ node = argv[0];
+ } else {
+ /* mount special node */
+ spec = argv[0];
+ node = argv[1];
+ }
+ if (!spec)
+ die (EX_USAGE, _("mount: no such partition found"));
+
+ result = mount_one (spec, node, types, NULL, options, 0, 0);
+ break;
+
+ default:
+ usage (stderr, EX_USAGE);
+ }
+
+ if (result == EX_SOMEOK)
+ result = 0;
+
+ fsprobe_exit();
+
+ exit (result);
+}
diff --git a/mount/mount_constants.h b/mount/mount_constants.h
new file mode 100644
index 0000000..81686f1
--- /dev/null
+++ b/mount/mount_constants.h
@@ -0,0 +1,73 @@
+#ifndef MS_RDONLY
+#define MS_RDONLY 1 /* Mount read-only */
+#endif
+#ifndef MS_NOSUID
+#define MS_NOSUID 2 /* Ignore suid and sgid bits */
+#endif
+#ifndef MS_NODEV
+#define MS_NODEV 4 /* Disallow access to device special files */
+#endif
+#ifndef MS_NOEXEC
+#define MS_NOEXEC 8 /* Disallow program execution */
+#endif
+#ifndef MS_SYNCHRONOUS
+#define MS_SYNCHRONOUS 16 /* Writes are synced at once */
+#endif
+#ifndef MS_REMOUNT
+#define MS_REMOUNT 32 /* Alter flags of a mounted FS */
+#endif
+#ifndef MS_MANDLOCK
+#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */
+#endif
+#ifndef MS_DIRSYNC
+#define MS_DIRSYNC 128 /* Directory modifications are synchronous */
+#endif
+#ifndef MS_NOATIME
+#define MS_NOATIME 0x400 /* 1024: Do not update access times. */
+#endif
+#ifndef MS_NODIRATIME
+#define MS_NODIRATIME 0x800 /* 2048: Don't update directory access times */
+#endif
+#ifndef MS_BIND
+#define MS_BIND 0x1000 /* 4096: Mount existing tree also elsewhere */
+#endif
+#ifndef MS_MOVE
+#define MS_MOVE 0x2000 /* 8192: Atomically move tree */
+#endif
+#ifndef MS_REC
+#define MS_REC 0x4000 /* 16384: Recursive loopback */
+#endif
+#ifndef MS_VERBOSE
+#define MS_VERBOSE 0x8000 /* 32768 */
+#endif
+#ifndef MS_RELATIME
+#define MS_RELATIME 0x200000 /* 200000: Update access times relative
+ to mtime/ctime */
+#endif
+#ifndef MS_UNBINDABLE
+#define MS_UNBINDABLE (1<<17) /* 131072 unbindable*/
+#endif
+#ifndef MS_PRIVATE
+#define MS_PRIVATE (1<<18) /* 262144 Private*/
+#endif
+#ifndef MS_SLAVE
+#define MS_SLAVE (1<<19) /* 524288 Slave*/
+#endif
+#ifndef MS_SHARED
+#define MS_SHARED (1<<20) /* 1048576 Shared*/
+#endif
+#ifndef MS_I_VERSION
+#define MS_I_VERSION (1<<23) /* update inode I_version field */
+#endif
+#ifndef MS_STRICTATIME
+#define MS_STRICTATIME (1<<24) /* strict atime semantics */
+#endif
+/*
+ * Magic mount flag number. Had to be or-ed to the flag values.
+ */
+#ifndef MS_MGC_VAL
+#define MS_MGC_VAL 0xC0ED0000 /* magic flag number to indicate "new" flags */
+#endif
+#ifndef MS_MGC_MSK
+#define MS_MGC_MSK 0xffff0000 /* magic flag number mask */
+#endif
diff --git a/mount/mount_mntent.c b/mount/mount_mntent.c
new file mode 100644
index 0000000..f2623fd
--- /dev/null
+++ b/mount/mount_mntent.c
@@ -0,0 +1,221 @@
+/* Private version of the libc *mntent() routines. */
+/* Note slightly different prototypes. */
+
+/* 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL>
+ * - added Native Language Support
+ */
+
+#include <stdio.h>
+#include <string.h> /* for index */
+#include <ctype.h> /* for isdigit */
+#include <sys/stat.h> /* for umask */
+#include "mount_mntent.h"
+#include "sundries.h" /* for xmalloc */
+#include "nls.h"
+
+/* Unfortunately the classical Unix /etc/mtab and /etc/fstab
+ do not handle directory names containing spaces.
+ Here we mangle them, replacing a space by \040.
+ What do other Unices do? */
+
+static unsigned char need_escaping[] = { ' ', '\t', '\n', '\\' };
+
+static char *
+mangle(const char *s) {
+ char *ss, *sp;
+ int n;
+
+ n = strlen(s);
+ ss = sp = xmalloc(4*n+1);
+ while(1) {
+ for (n = 0; n < sizeof(need_escaping); n++) {
+ if (*s == need_escaping[n]) {
+ *sp++ = '\\';
+ *sp++ = '0' + ((*s & 0300) >> 6);
+ *sp++ = '0' + ((*s & 070) >> 3);
+ *sp++ = '0' + (*s & 07);
+ goto next;
+ }
+ }
+ *sp++ = *s;
+ if (*s == 0)
+ break;
+ next:
+ s++;
+ }
+ return ss;
+}
+
+static int
+is_space_or_tab (char c) {
+ return (c == ' ' || c == '\t');
+}
+
+static char *
+skip_spaces(char *s) {
+ while (is_space_or_tab(*s))
+ s++;
+ return s;
+}
+
+static char *
+skip_nonspaces(char *s) {
+ while (*s && !is_space_or_tab(*s))
+ s++;
+ return s;
+}
+
+#define isoctal(a) (((a) & ~7) == '0')
+
+/* returns malloced pointer - no more strdup required */
+static char *
+unmangle(char *s) {
+ char *ret, *ss, *sp;
+
+ ss = skip_nonspaces(s);
+ ret = sp = xmalloc(ss-s+1);
+ while(s != ss) {
+ if (*s == '\\' && isoctal(s[1]) && isoctal(s[2]) && isoctal(s[3])) {
+ *sp++ = 64*(s[1] & 7) + 8*(s[2] & 7) + (s[3] & 7);
+ s += 4;
+ } else
+ *sp++ = *s++;
+ }
+ *sp = 0;
+ return ret;
+}
+
+/*
+ * fstat'ing the file and allocating a buffer holding all of it
+ * may be a bad idea: if the file is /proc/mounts, the stat
+ * returns 0.
+ * (On the other hand, mangling and unmangling is meaningless
+ * for /proc/mounts.)
+ */
+
+mntFILE *
+my_setmntent (const char *file, char *mode) {
+ mntFILE *mfp = xmalloc(sizeof(*mfp));
+ mode_t old_umask = umask(077);
+
+ mfp->mntent_fp = fopen(file, mode);
+ umask(old_umask);
+ mfp->mntent_file = xstrdup(file);
+ mfp->mntent_errs = (mfp->mntent_fp == NULL);
+ mfp->mntent_softerrs = 0;
+ mfp->mntent_lineno = 0;
+ return mfp;
+}
+
+void
+my_endmntent (mntFILE *mfp) {
+ if (mfp) {
+ if (mfp->mntent_fp)
+ fclose(mfp->mntent_fp);
+ free(mfp->mntent_file);
+ free(mfp);
+ }
+}
+
+int
+my_addmntent (mntFILE *mfp, struct my_mntent *mnt) {
+ char *m1, *m2, *m3, *m4;
+ int res;
+
+ if (fseek (mfp->mntent_fp, 0, SEEK_END))
+ return 1; /* failure */
+
+ m1 = mangle(mnt->mnt_fsname);
+ m2 = mangle(mnt->mnt_dir);
+ m3 = mangle(mnt->mnt_type);
+ m4 = mangle(mnt->mnt_opts);
+
+ res = fprintf (mfp->mntent_fp, "%s %s %s %s %d %d\n",
+ m1, m2, m3, m4, mnt->mnt_freq, mnt->mnt_passno);
+
+ free(m1);
+ free(m2);
+ free(m3);
+ free(m4);
+ return (res < 0) ? 1 : 0;
+}
+
+/* Read the next entry from the file fp. Stop reading at an incorrect entry. */
+struct my_mntent *
+my_getmntent (mntFILE *mfp) {
+ static char buf[4096];
+ static struct my_mntent me;
+ char *s;
+
+ again:
+ if (mfp->mntent_errs || mfp->mntent_softerrs >= ERR_MAX)
+ return NULL;
+
+ /* read the next non-blank non-comment line */
+ do {
+ if (fgets (buf, sizeof(buf), mfp->mntent_fp) == NULL)
+ return NULL;
+
+ mfp->mntent_lineno++;
+ s = strchr (buf, '\n');
+ if (s == NULL) {
+ /* Missing final newline? Otherwise extremely */
+ /* long line - assume file was corrupted */
+ if (feof(mfp->mntent_fp)) {
+ fprintf(stderr, _("[mntent]: warning: no final "
+ "newline at the end of %s\n"),
+ mfp->mntent_file);
+ s = strchr (buf, 0);
+ } else {
+ mfp->mntent_errs = 1;
+ goto err;
+ }
+ }
+ *s = 0;
+ if (--s >= buf && *s == '\r')
+ *s = 0;
+ s = skip_spaces(buf);
+ } while (*s == '\0' || *s == '#');
+
+ me.mnt_fsname = unmangle(s);
+ s = skip_nonspaces(s);
+ s = skip_spaces(s);
+ me.mnt_dir = unmangle(s);
+ s = skip_nonspaces(s);
+ s = skip_spaces(s);
+ me.mnt_type = unmangle(s);
+ s = skip_nonspaces(s);
+ s = skip_spaces(s);
+ me.mnt_opts = unmangle(s);
+ s = skip_nonspaces(s);
+ s = skip_spaces(s);
+
+ if (isdigit(*s)) {
+ me.mnt_freq = atoi(s);
+ while(isdigit(*s)) s++;
+ } else
+ me.mnt_freq = 0;
+ if(*s && !is_space_or_tab(*s))
+ goto err;
+
+ s = skip_spaces(s);
+ if(isdigit(*s)) {
+ me.mnt_passno = atoi(s);
+ while(isdigit(*s)) s++;
+ } else
+ me.mnt_passno = 0;
+ if(*s && !is_space_or_tab(*s))
+ goto err;
+
+ /* allow more stuff, e.g. comments, on this line */
+
+ return &me;
+
+ err:
+ mfp->mntent_softerrs++;
+ fprintf(stderr, _("[mntent]: line %d in %s is bad%s\n"),
+ mfp->mntent_lineno, mfp->mntent_file,
+ (mfp->mntent_errs || mfp->mntent_softerrs >= ERR_MAX) ?
+ _("; rest of file ignored") : "");
+ goto again;
+}
diff --git a/mount/mount_mntent.h b/mount/mount_mntent.h
new file mode 100644
index 0000000..3b74215
--- /dev/null
+++ b/mount/mount_mntent.h
@@ -0,0 +1,28 @@
+#ifndef MOUNT_MNTENT_H
+#define MOUNT_MNTENT_H
+
+struct my_mntent {
+ const char *mnt_fsname;
+ const char *mnt_dir;
+ const char *mnt_type;
+ const char *mnt_opts;
+ int mnt_freq;
+ int mnt_passno;
+};
+
+#define ERR_MAX 5
+
+typedef struct mntFILEstruct {
+ FILE *mntent_fp;
+ char *mntent_file;
+ int mntent_lineno;
+ int mntent_errs;
+ int mntent_softerrs;
+} mntFILE;
+
+mntFILE *my_setmntent (const char *file, char *mode);
+void my_endmntent (mntFILE *mfp);
+int my_addmntent (mntFILE *mfp, struct my_mntent *mnt);
+struct my_mntent *my_getmntent (mntFILE *mfp);
+
+#endif /* MOUNT_MNTENT_H */
diff --git a/mount/rmd160.c b/mount/rmd160.c
new file mode 100644
index 0000000..930e61e
--- /dev/null
+++ b/mount/rmd160.c
@@ -0,0 +1,532 @@
+/* rmd160.c - RIPE-MD160
+ * Copyright (C) 1998 Free Software Foundation, Inc.
+ */
+
+/* This file was part of GnuPG. Modified for use within the Linux
+ * mount utility by Marc Mutz <Marc@Mutz.com>. None of this code is
+ * by myself. I just removed everything that you don't need when all
+ * you want to do is to use rmd160_hash_buffer().
+ * My comments are marked with (mm). */
+
+/* GnuPG is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * GnuPG is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */
+
+#include <string.h> /* (mm) for memcpy */
+#include <endian.h> /* (mm) for BIG_ENDIAN and BYTE_ORDER */
+#include "rmd160.h"
+
+/* (mm) these are used by the original GnuPG file. In order to modify
+ * that file not too much, we keep the notations. maybe it would be
+ * better to include linux/types.h and typedef __u32 to u32 and __u8
+ * to byte? */
+typedef unsigned int u32; /* taken from e.g. util-linux's minix.h */
+typedef unsigned char byte;
+
+typedef struct {
+ u32 h0,h1,h2,h3,h4;
+ u32 nblocks;
+ byte buf[64];
+ int count;
+} RMD160_CONTEXT;
+
+/****************
+ * Rotate a 32 bit integer by n bytes
+ */
+#if defined(__GNUC__) && defined(__i386__)
+static inline u32
+rol( u32 x, int n)
+{
+ __asm__("roll %%cl,%0"
+ :"=r" (x)
+ :"0" (x),"c" (n));
+ return x;
+}
+#else
+ #define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) )
+#endif
+
+/*********************************
+ * RIPEMD-160 is not patented, see (as of 25.10.97)
+ * http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html
+ * Note that the code uses Little Endian byteorder, which is good for
+ * 386 etc, but we must add some conversion when used on a big endian box.
+ *
+ *
+ * Pseudo-code for RIPEMD-160
+ *
+ * RIPEMD-160 is an iterative hash function that operates on 32-bit words.
+ * The round function takes as input a 5-word chaining variable and a 16-word
+ * message block and maps this to a new chaining variable. All operations are
+ * defined on 32-bit words. Padding is identical to that of MD4.
+ *
+ *
+ * RIPEMD-160: definitions
+ *
+ *
+ * nonlinear functions at bit level: exor, mux, -, mux, -
+ *
+ * f(j, x, y, z) = x XOR y XOR z (0 <= j <= 15)
+ * f(j, x, y, z) = (x AND y) OR (NOT(x) AND z) (16 <= j <= 31)
+ * f(j, x, y, z) = (x OR NOT(y)) XOR z (32 <= j <= 47)
+ * f(j, x, y, z) = (x AND z) OR (y AND NOT(z)) (48 <= j <= 63)
+ * f(j, x, y, z) = x XOR (y OR NOT(z)) (64 <= j <= 79)
+ *
+ *
+ * added constants (hexadecimal)
+ *
+ * K(j) = 0x00000000 (0 <= j <= 15)
+ * K(j) = 0x5A827999 (16 <= j <= 31) int(2**30 x sqrt(2))
+ * K(j) = 0x6ED9EBA1 (32 <= j <= 47) int(2**30 x sqrt(3))
+ * K(j) = 0x8F1BBCDC (48 <= j <= 63) int(2**30 x sqrt(5))
+ * K(j) = 0xA953FD4E (64 <= j <= 79) int(2**30 x sqrt(7))
+ * K'(j) = 0x50A28BE6 (0 <= j <= 15) int(2**30 x cbrt(2))
+ * K'(j) = 0x5C4DD124 (16 <= j <= 31) int(2**30 x cbrt(3))
+ * K'(j) = 0x6D703EF3 (32 <= j <= 47) int(2**30 x cbrt(5))
+ * K'(j) = 0x7A6D76E9 (48 <= j <= 63) int(2**30 x cbrt(7))
+ * K'(j) = 0x00000000 (64 <= j <= 79)
+ *
+ *
+ * selection of message word
+ *
+ * r(j) = j (0 <= j <= 15)
+ * r(16..31) = 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8
+ * r(32..47) = 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12
+ * r(48..63) = 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2
+ * r(64..79) = 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
+ * r0(0..15) = 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12
+ * r0(16..31)= 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2
+ * r0(32..47)= 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13
+ * r0(48..63)= 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14
+ * r0(64..79)= 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
+ *
+ *
+ * amount for rotate left (rol)
+ *
+ * s(0..15) = 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8
+ * s(16..31) = 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12
+ * s(32..47) = 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5
+ * s(48..63) = 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12
+ * s(64..79) = 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
+ * s'(0..15) = 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6
+ * s'(16..31)= 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11
+ * s'(32..47)= 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5
+ * s'(48..63)= 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8
+ * s'(64..79)= 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
+ *
+ *
+ * initial value (hexadecimal)
+ *
+ * h0 = 0x67452301; h1 = 0xEFCDAB89; h2 = 0x98BADCFE; h3 = 0x10325476;
+ * h4 = 0xC3D2E1F0;
+ *
+ *
+ * RIPEMD-160: pseudo-code
+ *
+ * It is assumed that the message after padding consists of t 16-word blocks
+ * that will be denoted with X[i][j], with 0 <= i <= t-1 and 0 <= j <= 15.
+ * The symbol [+] denotes addition modulo 2**32 and rol_s denotes cyclic left
+ * shift (rotate) over s positions.
+ *
+ *
+ * for i := 0 to t-1 {
+ * A := h0; B := h1; C := h2; D = h3; E = h4;
+ * A' := h0; B' := h1; C' := h2; D' = h3; E' = h4;
+ * for j := 0 to 79 {
+ * T := rol_s(j)(A [+] f(j, B, C, D) [+] X[i][r(j)] [+] K(j)) [+] E;
+ * A := E; E := D; D := rol_10(C); C := B; B := T;
+ * T := rol_s'(j)(A' [+] f(79-j, B', C', D') [+] X[i][r'(j)]
+ [+] K'(j)) [+] E';
+ * A' := E'; E' := D'; D' := rol_10(C'); C' := B'; B' := T;
+ * }
+ * T := h1 [+] C [+] D'; h1 := h2 [+] D [+] E'; h2 := h3 [+] E [+] A';
+ * h3 := h4 [+] A [+] B'; h4 := h0 [+] B [+] C'; h0 := T;
+ * }
+ */
+
+/* Some examples:
+ * "" 9c1185a5c5e9fc54612808977ee8f548b2258d31
+ * "a" 0bdc9d2d256b3ee9daae347be6f4dc835a467ffe
+ * "abc" 8eb208f7e05d987a9b044a8e98c6b087f15a0bfc
+ * "message digest" 5d0689ef49d2fae572b881b123a85ffa21595f36
+ * "a...z" f71c27109c692c1b56bbdceb5b9d2865b3708dbc
+ * "abcdbcde...nopq" 12a053384a9c0c88e405a06c27dcf49ada62eb2b
+ * "A...Za...z0...9" b0e20b6e3116640286ed3a87a5713079b21f5189
+ * 8 times "1234567890" 9b752e45573d4b39f4dbd3323cab82bf63326bfb
+ * 1 million times "a" 52783243c1697bdbe16d37f97f68f08325dc1528
+ */
+
+
+static void
+rmd160_init( RMD160_CONTEXT *hd )
+{
+ hd->h0 = 0x67452301;
+ hd->h1 = 0xEFCDAB89;
+ hd->h2 = 0x98BADCFE;
+ hd->h3 = 0x10325476;
+ hd->h4 = 0xC3D2E1F0;
+ hd->nblocks = 0;
+ hd->count = 0;
+}
+
+
+
+/****************
+ * Transform the message X which consists of 16 32-bit-words
+ */
+static void
+transform( RMD160_CONTEXT *hd, byte *data )
+{
+ u32 a,b,c,d,e,aa,bb,cc,dd,ee,t;
+ #if BYTE_ORDER == BIG_ENDIAN
+ u32 x[16];
+ { int i;
+ byte *p2, *p1;
+ for(i=0, p1=data, p2=(byte*)x; i < 16; i++, p2 += 4 ) {
+ p2[3] = *p1++;
+ p2[2] = *p1++;
+ p2[1] = *p1++;
+ p2[0] = *p1++;
+ }
+ }
+ #else
+ #if 0
+ u32 *x =(u32*)data;
+ #else
+ /* this version is better because it is always aligned;
+ * The performance penalty on a 586-100 is about 6% which
+ * is acceptable - because the data is more local it might
+ * also be possible that this is faster on some machines.
+ * This function (when compiled with -02 on gcc 2.7.2)
+ * executes on a 586-100 (39.73 bogomips) at about 1900kb/sec;
+ * [measured with a 4MB data and "gpgm --print-md rmd160"] */
+ u32 x[16];
+ memcpy( x, data, 64 );
+ #endif
+ #endif
+
+
+#define K0 0x00000000
+#define K1 0x5A827999
+#define K2 0x6ED9EBA1
+#define K3 0x8F1BBCDC
+#define K4 0xA953FD4E
+#define KK0 0x50A28BE6
+#define KK1 0x5C4DD124
+#define KK2 0x6D703EF3
+#define KK3 0x7A6D76E9
+#define KK4 0x00000000
+#define F0(x,y,z) ( (x) ^ (y) ^ (z) )
+#define F1(x,y,z) ( ((x) & (y)) | (~(x) & (z)) )
+#define F2(x,y,z) ( ((x) | ~(y)) ^ (z) )
+#define F3(x,y,z) ( ((x) & (z)) | ((y) & ~(z)) )
+#define F4(x,y,z) ( (x) ^ ((y) | ~(z)) )
+#define R(a,b,c,d,e,f,k,r,s) do { t = a + f(b,c,d) + k + x[r]; \
+ a = rol(t,s) + e; \
+ c = rol(c,10); \
+ } while(0)
+
+ /* left lane */
+ a = hd->h0;
+ b = hd->h1;
+ c = hd->h2;
+ d = hd->h3;
+ e = hd->h4;
+ R( a, b, c, d, e, F0, K0, 0, 11 );
+ R( e, a, b, c, d, F0, K0, 1, 14 );
+ R( d, e, a, b, c, F0, K0, 2, 15 );
+ R( c, d, e, a, b, F0, K0, 3, 12 );
+ R( b, c, d, e, a, F0, K0, 4, 5 );
+ R( a, b, c, d, e, F0, K0, 5, 8 );
+ R( e, a, b, c, d, F0, K0, 6, 7 );
+ R( d, e, a, b, c, F0, K0, 7, 9 );
+ R( c, d, e, a, b, F0, K0, 8, 11 );
+ R( b, c, d, e, a, F0, K0, 9, 13 );
+ R( a, b, c, d, e, F0, K0, 10, 14 );
+ R( e, a, b, c, d, F0, K0, 11, 15 );
+ R( d, e, a, b, c, F0, K0, 12, 6 );
+ R( c, d, e, a, b, F0, K0, 13, 7 );
+ R( b, c, d, e, a, F0, K0, 14, 9 );
+ R( a, b, c, d, e, F0, K0, 15, 8 );
+ R( e, a, b, c, d, F1, K1, 7, 7 );
+ R( d, e, a, b, c, F1, K1, 4, 6 );
+ R( c, d, e, a, b, F1, K1, 13, 8 );
+ R( b, c, d, e, a, F1, K1, 1, 13 );
+ R( a, b, c, d, e, F1, K1, 10, 11 );
+ R( e, a, b, c, d, F1, K1, 6, 9 );
+ R( d, e, a, b, c, F1, K1, 15, 7 );
+ R( c, d, e, a, b, F1, K1, 3, 15 );
+ R( b, c, d, e, a, F1, K1, 12, 7 );
+ R( a, b, c, d, e, F1, K1, 0, 12 );
+ R( e, a, b, c, d, F1, K1, 9, 15 );
+ R( d, e, a, b, c, F1, K1, 5, 9 );
+ R( c, d, e, a, b, F1, K1, 2, 11 );
+ R( b, c, d, e, a, F1, K1, 14, 7 );
+ R( a, b, c, d, e, F1, K1, 11, 13 );
+ R( e, a, b, c, d, F1, K1, 8, 12 );
+ R( d, e, a, b, c, F2, K2, 3, 11 );
+ R( c, d, e, a, b, F2, K2, 10, 13 );
+ R( b, c, d, e, a, F2, K2, 14, 6 );
+ R( a, b, c, d, e, F2, K2, 4, 7 );
+ R( e, a, b, c, d, F2, K2, 9, 14 );
+ R( d, e, a, b, c, F2, K2, 15, 9 );
+ R( c, d, e, a, b, F2, K2, 8, 13 );
+ R( b, c, d, e, a, F2, K2, 1, 15 );
+ R( a, b, c, d, e, F2, K2, 2, 14 );
+ R( e, a, b, c, d, F2, K2, 7, 8 );
+ R( d, e, a, b, c, F2, K2, 0, 13 );
+ R( c, d, e, a, b, F2, K2, 6, 6 );
+ R( b, c, d, e, a, F2, K2, 13, 5 );
+ R( a, b, c, d, e, F2, K2, 11, 12 );
+ R( e, a, b, c, d, F2, K2, 5, 7 );
+ R( d, e, a, b, c, F2, K2, 12, 5 );
+ R( c, d, e, a, b, F3, K3, 1, 11 );
+ R( b, c, d, e, a, F3, K3, 9, 12 );
+ R( a, b, c, d, e, F3, K3, 11, 14 );
+ R( e, a, b, c, d, F3, K3, 10, 15 );
+ R( d, e, a, b, c, F3, K3, 0, 14 );
+ R( c, d, e, a, b, F3, K3, 8, 15 );
+ R( b, c, d, e, a, F3, K3, 12, 9 );
+ R( a, b, c, d, e, F3, K3, 4, 8 );
+ R( e, a, b, c, d, F3, K3, 13, 9 );
+ R( d, e, a, b, c, F3, K3, 3, 14 );
+ R( c, d, e, a, b, F3, K3, 7, 5 );
+ R( b, c, d, e, a, F3, K3, 15, 6 );
+ R( a, b, c, d, e, F3, K3, 14, 8 );
+ R( e, a, b, c, d, F3, K3, 5, 6 );
+ R( d, e, a, b, c, F3, K3, 6, 5 );
+ R( c, d, e, a, b, F3, K3, 2, 12 );
+ R( b, c, d, e, a, F4, K4, 4, 9 );
+ R( a, b, c, d, e, F4, K4, 0, 15 );
+ R( e, a, b, c, d, F4, K4, 5, 5 );
+ R( d, e, a, b, c, F4, K4, 9, 11 );
+ R( c, d, e, a, b, F4, K4, 7, 6 );
+ R( b, c, d, e, a, F4, K4, 12, 8 );
+ R( a, b, c, d, e, F4, K4, 2, 13 );
+ R( e, a, b, c, d, F4, K4, 10, 12 );
+ R( d, e, a, b, c, F4, K4, 14, 5 );
+ R( c, d, e, a, b, F4, K4, 1, 12 );
+ R( b, c, d, e, a, F4, K4, 3, 13 );
+ R( a, b, c, d, e, F4, K4, 8, 14 );
+ R( e, a, b, c, d, F4, K4, 11, 11 );
+ R( d, e, a, b, c, F4, K4, 6, 8 );
+ R( c, d, e, a, b, F4, K4, 15, 5 );
+ R( b, c, d, e, a, F4, K4, 13, 6 );
+
+ aa = a; bb = b; cc = c; dd = d; ee = e;
+
+ /* right lane */
+ a = hd->h0;
+ b = hd->h1;
+ c = hd->h2;
+ d = hd->h3;
+ e = hd->h4;
+ R( a, b, c, d, e, F4, KK0, 5, 8);
+ R( e, a, b, c, d, F4, KK0, 14, 9);
+ R( d, e, a, b, c, F4, KK0, 7, 9);
+ R( c, d, e, a, b, F4, KK0, 0, 11);
+ R( b, c, d, e, a, F4, KK0, 9, 13);
+ R( a, b, c, d, e, F4, KK0, 2, 15);
+ R( e, a, b, c, d, F4, KK0, 11, 15);
+ R( d, e, a, b, c, F4, KK0, 4, 5);
+ R( c, d, e, a, b, F4, KK0, 13, 7);
+ R( b, c, d, e, a, F4, KK0, 6, 7);
+ R( a, b, c, d, e, F4, KK0, 15, 8);
+ R( e, a, b, c, d, F4, KK0, 8, 11);
+ R( d, e, a, b, c, F4, KK0, 1, 14);
+ R( c, d, e, a, b, F4, KK0, 10, 14);
+ R( b, c, d, e, a, F4, KK0, 3, 12);
+ R( a, b, c, d, e, F4, KK0, 12, 6);
+ R( e, a, b, c, d, F3, KK1, 6, 9);
+ R( d, e, a, b, c, F3, KK1, 11, 13);
+ R( c, d, e, a, b, F3, KK1, 3, 15);
+ R( b, c, d, e, a, F3, KK1, 7, 7);
+ R( a, b, c, d, e, F3, KK1, 0, 12);
+ R( e, a, b, c, d, F3, KK1, 13, 8);
+ R( d, e, a, b, c, F3, KK1, 5, 9);
+ R( c, d, e, a, b, F3, KK1, 10, 11);
+ R( b, c, d, e, a, F3, KK1, 14, 7);
+ R( a, b, c, d, e, F3, KK1, 15, 7);
+ R( e, a, b, c, d, F3, KK1, 8, 12);
+ R( d, e, a, b, c, F3, KK1, 12, 7);
+ R( c, d, e, a, b, F3, KK1, 4, 6);
+ R( b, c, d, e, a, F3, KK1, 9, 15);
+ R( a, b, c, d, e, F3, KK1, 1, 13);
+ R( e, a, b, c, d, F3, KK1, 2, 11);
+ R( d, e, a, b, c, F2, KK2, 15, 9);
+ R( c, d, e, a, b, F2, KK2, 5, 7);
+ R( b, c, d, e, a, F2, KK2, 1, 15);
+ R( a, b, c, d, e, F2, KK2, 3, 11);
+ R( e, a, b, c, d, F2, KK2, 7, 8);
+ R( d, e, a, b, c, F2, KK2, 14, 6);
+ R( c, d, e, a, b, F2, KK2, 6, 6);
+ R( b, c, d, e, a, F2, KK2, 9, 14);
+ R( a, b, c, d, e, F2, KK2, 11, 12);
+ R( e, a, b, c, d, F2, KK2, 8, 13);
+ R( d, e, a, b, c, F2, KK2, 12, 5);
+ R( c, d, e, a, b, F2, KK2, 2, 14);
+ R( b, c, d, e, a, F2, KK2, 10, 13);
+ R( a, b, c, d, e, F2, KK2, 0, 13);
+ R( e, a, b, c, d, F2, KK2, 4, 7);
+ R( d, e, a, b, c, F2, KK2, 13, 5);
+ R( c, d, e, a, b, F1, KK3, 8, 15);
+ R( b, c, d, e, a, F1, KK3, 6, 5);
+ R( a, b, c, d, e, F1, KK3, 4, 8);
+ R( e, a, b, c, d, F1, KK3, 1, 11);
+ R( d, e, a, b, c, F1, KK3, 3, 14);
+ R( c, d, e, a, b, F1, KK3, 11, 14);
+ R( b, c, d, e, a, F1, KK3, 15, 6);
+ R( a, b, c, d, e, F1, KK3, 0, 14);
+ R( e, a, b, c, d, F1, KK3, 5, 6);
+ R( d, e, a, b, c, F1, KK3, 12, 9);
+ R( c, d, e, a, b, F1, KK3, 2, 12);
+ R( b, c, d, e, a, F1, KK3, 13, 9);
+ R( a, b, c, d, e, F1, KK3, 9, 12);
+ R( e, a, b, c, d, F1, KK3, 7, 5);
+ R( d, e, a, b, c, F1, KK3, 10, 15);
+ R( c, d, e, a, b, F1, KK3, 14, 8);
+ R( b, c, d, e, a, F0, KK4, 12, 8);
+ R( a, b, c, d, e, F0, KK4, 15, 5);
+ R( e, a, b, c, d, F0, KK4, 10, 12);
+ R( d, e, a, b, c, F0, KK4, 4, 9);
+ R( c, d, e, a, b, F0, KK4, 1, 12);
+ R( b, c, d, e, a, F0, KK4, 5, 5);
+ R( a, b, c, d, e, F0, KK4, 8, 14);
+ R( e, a, b, c, d, F0, KK4, 7, 6);
+ R( d, e, a, b, c, F0, KK4, 6, 8);
+ R( c, d, e, a, b, F0, KK4, 2, 13);
+ R( b, c, d, e, a, F0, KK4, 13, 6);
+ R( a, b, c, d, e, F0, KK4, 14, 5);
+ R( e, a, b, c, d, F0, KK4, 0, 15);
+ R( d, e, a, b, c, F0, KK4, 3, 13);
+ R( c, d, e, a, b, F0, KK4, 9, 11);
+ R( b, c, d, e, a, F0, KK4, 11, 11);
+
+
+ t = hd->h1 + d + cc;
+ hd->h1 = hd->h2 + e + dd;
+ hd->h2 = hd->h3 + a + ee;
+ hd->h3 = hd->h4 + b + aa;
+ hd->h4 = hd->h0 + c + bb;
+ hd->h0 = t;
+}
+
+
+/* Update the message digest with the contents
+ * of INBUF with length INLEN.
+ */
+static void
+rmd160_write( RMD160_CONTEXT *hd, byte *inbuf, size_t inlen)
+{
+ if( hd->count == 64 ) { /* flush the buffer */
+ transform( hd, hd->buf );
+ hd->count = 0;
+ hd->nblocks++;
+ }
+ if( !inbuf )
+ return;
+ if( hd->count ) {
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+ rmd160_write( hd, NULL, 0 );
+ if( !inlen )
+ return;
+ }
+
+ while( inlen >= 64 ) {
+ transform( hd, inbuf );
+ hd->count = 0;
+ hd->nblocks++;
+ inlen -= 64;
+ inbuf += 64;
+ }
+ for( ; inlen && hd->count < 64; inlen-- )
+ hd->buf[hd->count++] = *inbuf++;
+}
+
+/* The routine terminates the computation
+ */
+
+static void
+rmd160_final( RMD160_CONTEXT *hd )
+{
+ u32 t, msb, lsb;
+ byte *p;
+
+ rmd160_write(hd, NULL, 0); /* flush */;
+
+ msb = 0;
+ t = hd->nblocks;
+ if( (lsb = t << 6) < t ) /* multiply by 64 to make a byte count */
+ msb++;
+ msb += t >> 26;
+ t = lsb;
+ if( (lsb = t + hd->count) < t ) /* add the count */
+ msb++;
+ t = lsb;
+ if( (lsb = t << 3) < t ) /* multiply by 8 to make a bit count */
+ msb++;
+ msb += t >> 29;
+
+ if( hd->count < 56 ) { /* enough room */
+ hd->buf[hd->count++] = 0x80; /* pad */
+ while( hd->count < 56 )
+ hd->buf[hd->count++] = 0; /* pad */
+ }
+ else { /* need one extra block */
+ hd->buf[hd->count++] = 0x80; /* pad character */
+ while( hd->count < 64 )
+ hd->buf[hd->count++] = 0;
+ rmd160_write(hd, NULL, 0); /* flush */;
+ memset(hd->buf, 0, 56 ); /* fill next block with zeroes */
+ }
+ /* append the 64 bit count */
+ hd->buf[56] = lsb ;
+ hd->buf[57] = lsb >> 8;
+ hd->buf[58] = lsb >> 16;
+ hd->buf[59] = lsb >> 24;
+ hd->buf[60] = msb ;
+ hd->buf[61] = msb >> 8;
+ hd->buf[62] = msb >> 16;
+ hd->buf[63] = msb >> 24;
+ transform( hd, hd->buf );
+
+ p = hd->buf;
+ #if BYTE_ORDER == BIG_ENDIAN
+ #define X(a) do { *p++ = hd->h##a ; *p++ = hd->h##a >> 8; \
+ *p++ = hd->h##a >> 16; *p++ = hd->h##a >> 24; } while(0)
+ #else /* little endian */
+ #define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
+ #endif
+ X(0);
+ X(1);
+ X(2);
+ X(3);
+ X(4);
+ #undef X
+}
+
+/****************
+ * Shortcut functions which puts the hash value of the supplied buffer
+ * into outbuf which must have a size of 20 bytes.
+ */
+void
+rmd160_hash_buffer( char *outbuf, const char *buffer, size_t length )
+{
+ RMD160_CONTEXT hd;
+
+ rmd160_init( &hd );
+ rmd160_write( &hd, (byte*)buffer, length );
+ rmd160_final( &hd );
+ memcpy( outbuf, hd.buf, 20 );
+}
diff --git a/mount/rmd160.h b/mount/rmd160.h
new file mode 100644
index 0000000..dab329e
--- /dev/null
+++ b/mount/rmd160.h
@@ -0,0 +1,9 @@
+#ifndef RMD160_H
+#define RMD160_H
+
+void
+rmd160_hash_buffer( char *outbuf, const char *buffer, size_t length );
+
+#endif /*RMD160_H*/
+
+
diff --git a/mount/sundries.c b/mount/sundries.c
new file mode 100644
index 0000000..5c33b11
--- /dev/null
+++ b/mount/sundries.c
@@ -0,0 +1,292 @@
+/*
+ * Support functions. Exported functions are prototyped in sundries.h.
+ *
+ * added fcntl locking by Kjetil T. (kjetilho@math.uio.no) - aeb, 950927
+ *
+ * 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL>
+ * - added Native Language Support
+ *
+ */
+#include <unistd.h>
+#include <stdio.h>
+#include <string.h>
+#include <mntent.h> /* for MNTTYPE_SWAP */
+
+#include "canonicalize.h"
+
+#include "fstab.h"
+#include "sundries.h"
+#include "xmalloc.h"
+#include "nls.h"
+
+int mount_quiet;
+int verbose;
+char *progname;
+
+char *
+xstrndup (const char *s, int n) {
+ char *t;
+
+ if (s == NULL)
+ die (EX_SOFTWARE, _("bug in xstrndup call"));
+
+ t = xmalloc(n+1);
+ strncpy(t,s,n);
+ t[n] = 0;
+
+ return t;
+}
+
+/* reallocates its first arg - typical use: s = xstrconcat3(s,t,u); */
+char *
+xstrconcat3 (char *s, const char *t, const char *u) {
+ size_t len = 0;
+
+ len = (s ? strlen(s) : 0) + (t ? strlen(t) : 0) + (u ? strlen(u) : 0);
+
+ if (!len)
+ return NULL;
+ if (!s) {
+ s = xmalloc(len + 1);
+ *s = '\0';
+ }
+ else
+ s = xrealloc(s, len + 1);
+ if (t)
+ strcat(s, t);
+ if (u)
+ strcat(s, u);
+ return s;
+}
+
+/* frees its first arg - typical use: s = xstrconcat4(s,t,u,v); */
+char *
+xstrconcat4 (char *s, const char *t, const char *u, const char *v) {
+ size_t len = 0;
+
+ len = (s ? strlen(s) : 0) + (t ? strlen(t) : 0) +
+ (u ? strlen(u) : 0) + (v ? strlen(v) : 0);
+
+ if (!len)
+ return NULL;
+ if (!s) {
+ s = xmalloc(len + 1);
+ *s = '\0';
+ }
+ else
+ s = xrealloc(s, len + 1);
+ if (t)
+ strcat(s, t);
+ if (u)
+ strcat(s, u);
+ if (v)
+ strcat(s, v);
+ return s;
+
+
+}
+
+/* Call this with SIG_BLOCK to block and SIG_UNBLOCK to unblock. */
+void
+block_signals (int how) {
+ sigset_t sigs;
+
+ sigfillset (&sigs);
+ sigdelset(&sigs, SIGTRAP);
+ sigdelset(&sigs, SIGSEGV);
+ sigprocmask (how, &sigs, (sigset_t *) 0);
+}
+
+
+/* Non-fatal error. Print message and return. */
+/* (print the message in a single printf, in an attempt
+ to avoid mixing output of several threads) */
+void
+error (const char *fmt, ...) {
+ va_list args;
+
+ if (mount_quiet)
+ return;
+ va_start (args, fmt);
+ vfprintf (stderr, fmt, args);
+ va_end (args);
+ fputc('\n', stderr);
+}
+
+/* Fatal error. Print message and exit. */
+void
+die(int err, const char *fmt, ...) {
+ va_list args;
+
+ va_start(args, fmt);
+ vfprintf(stderr, fmt, args);
+ fprintf(stderr, "\n");
+ va_end(args);
+
+ exit(err);
+}
+
+/* True if fstypes match. Null *TYPES means match anything,
+ except that swap types always return false. */
+/* Accept nonfs,proc,devpts and nonfs,noproc,nodevpts
+ with the same meaning. */
+int
+matching_type (const char *type, const char *types) {
+ int no; /* negated types list */
+ int len;
+ const char *p;
+
+ if (streq (type, MNTTYPE_SWAP))
+ return 0;
+ if (types == NULL)
+ return 1;
+
+ no = 0;
+ if (!strncmp(types, "no", 2)) {
+ no = 1;
+ types += 2;
+ }
+
+ /* Does type occur in types, separated by commas? */
+ len = strlen(type);
+ p = types;
+ while(1) {
+ if (!strncmp(p, "no", 2) && !strncmp(p+2, type, len) &&
+ (p[len+2] == 0 || p[len+2] == ','))
+ return 0;
+ if (strncmp(p, type, len) == 0 &&
+ (p[len] == 0 || p[len] == ','))
+ return !no;
+ p = strchr(p,',');
+ if (!p)
+ break;
+ p++;
+ }
+ return no;
+}
+
+/* Returns 1 if needle found or noneedle not found in haystack
+ * Otherwise returns 0
+ */
+static int
+check_option(const char *haystack, const char *needle) {
+ const char *p, *r;
+ int len, needle_len, this_len;
+ int no;
+
+ no = 0;
+ if (!strncmp(needle, "no", 2)) {
+ no = 1;
+ needle += 2;
+ }
+ needle_len = strlen(needle);
+ len = strlen(haystack);
+
+ for (p = haystack; p < haystack+len; p++) {
+ r = strchr(p, ',');
+ if (r) {
+ this_len = r-p;
+ } else {
+ this_len = strlen(p);
+ }
+ if (this_len != needle_len) {
+ p += this_len;
+ continue;
+ }
+ if (strncmp(p, needle, this_len) == 0)
+ return !no; /* foo or nofoo was found */
+ p += this_len;
+ }
+
+ return no; /* foo or nofoo was not found */
+}
+
+
+/* Returns 1 if each of the test_opts options agrees with the entire
+ * list of options.
+ * Returns 0 if any noopt is found in test_opts and opt is found in options.
+ * Returns 0 if any opt is found in test_opts but is not found in options.
+ * Unlike fs type matching, nonetdev,user and nonetdev,nouser have
+ * DIFFERENT meanings; each option is matched explicitly as specified.
+ */
+int
+matching_opts (const char *options, const char *test_opts) {
+ const char *p, *r;
+ char *q;
+ int len, this_len;
+
+ if (test_opts == NULL)
+ return 1;
+
+ len = strlen(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) {
+ this_len = r-p;
+ } else {
+ this_len = strlen(p);
+ }
+ if (!this_len) continue; /* if two ',' appear in a row */
+ strncpy(q, p, this_len);
+ q[this_len] = '\0';
+ if (!check_option(options, q))
+ return 0; /* any match failure means failure */
+ p += this_len;
+ }
+
+ /* no match failures in list means success */
+ return 1;
+}
+
+int
+is_pseudo_fs(const char *type)
+{
+ if (type == NULL || *type == '/')
+ return 0;
+ if (streq(type, "none") ||
+ streq(type, "proc") ||
+ streq(type, "tmpfs") ||
+ streq(type, "sysfs") ||
+ streq(type, "usbfs") ||
+ streq(type, "cgroup") ||
+ streq(type, "cpuset") ||
+ streq(type, "rpc_pipefs") ||
+ streq(type, "devpts"))
+ return 1;
+ return 0;
+}
+
+/* Make a canonical pathname from PATH. Returns a freshly malloced string.
+ It is up the *caller* to ensure that the PATH is sensible. i.e.
+ canonicalize ("/dev/fd0/.") returns "/dev/fd0" even though ``/dev/fd0/.''
+ is not a legal pathname for ``/dev/fd0''. Anything we cannot parse
+ we return unmodified. */
+char *
+canonicalize_spec (const char *path)
+{
+ char *res;
+
+ if (path == NULL)
+ return NULL;
+ if (is_pseudo_fs(path))
+ return xstrdup(path);
+
+ res = canonicalize_path(path);
+ if (!res)
+ die(EX_SYSERR, _("not enough memory"));
+ return res;
+}
+
+char *canonicalize (const char *path)
+{
+ char *res = canonicalize_path(path);
+
+ if (!res)
+ die(EX_SYSERR, _("not enough memory"));
+ return res;
+}
+
diff --git a/mount/sundries.h b/mount/sundries.h
new file mode 100644
index 0000000..6d576e9
--- /dev/null
+++ b/mount/sundries.h
@@ -0,0 +1,53 @@
+/*
+ * sundries.h
+ * Support function prototypes. Functions are in sundries.c.
+ */
+#ifndef SUNDRIES_H
+#define SUNDRIES_H
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <signal.h>
+#include <stdarg.h>
+#include <stdlib.h>
+
+/* global mount, umount, and losetup variables */
+extern int mount_quiet;
+extern int verbose;
+extern char *progname;
+
+#define streq(s, t) (strcmp ((s), (t)) == 0)
+
+void block_signals (int how);
+
+void error (const char *fmt, ...)
+ __attribute__ ((__format__ (__printf__, 1, 2)));
+void die(int err, const char *fmt, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
+
+int matching_type (const char *type, const char *types);
+int matching_opts (const char *options, const char *test_opts);
+void *xmalloc (size_t size);
+char *xstrdup (const char *s);
+char *xstrndup (const char *s, int n);
+char *xstrconcat3 (char *, const char *, const char *);
+char *xstrconcat4 (char *, const char *, const char *, const char *);
+
+int is_pseudo_fs(const char *type);
+
+char *canonicalize (const char *path);
+char *canonicalize_spec (const char *path);
+
+/* exit status - bits below are ORed */
+#define EX_USAGE 1 /* incorrect invocation or permission */
+#define EX_SYSERR 2 /* out of memory, cannot fork, ... */
+#define EX_SOFTWARE 4 /* internal mount bug or wrong version */
+#define EX_USER 8 /* user interrupt */
+#define EX_FILEIO 16 /* problems writing, locking, ... mtab/fstab */
+#define EX_FAIL 32 /* mount failure */
+#define EX_SOMEOK 64 /* some mount succeeded */
+
+#endif /* SUNDRIES_H */
+
diff --git a/mount/swap_constants.h b/mount/swap_constants.h
new file mode 100644
index 0000000..c7e8b4c
--- /dev/null
+++ b/mount/swap_constants.h
@@ -0,0 +1,15 @@
+/*
+ * It is too painful to get these out of <linux/swap.h>
+ * (which again requires <asm/page.h> etc).
+ * These exist since Linux 1.3.2.
+ */
+
+#ifndef SWAP_FLAG_PREFER
+#define SWAP_FLAG_PREFER 0x8000 /* set if swap priority specified */
+#endif
+#ifndef SWAP_FLAG_PRIO_MASK
+#define SWAP_FLAG_PRIO_MASK 0x7fff
+#endif
+#ifndef SWAP_FLAG_PRIO_SHIFT
+#define SWAP_FLAG_PRIO_SHIFT 0
+#endif
diff --git a/mount/swapoff.8 b/mount/swapoff.8
new file mode 100644
index 0000000..1a06b7e
--- /dev/null
+++ b/mount/swapoff.8
@@ -0,0 +1 @@
+.so man8/swapon.8
diff --git a/mount/swapon.8 b/mount/swapon.8
new file mode 100644
index 0000000..25fc5e8
--- /dev/null
+++ b/mount/swapon.8
@@ -0,0 +1,191 @@
+.\" Copyright (c) 1980, 1991 Regents of the University of California.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" @(#)swapon.8 6.3 (Berkeley) 3/16/91
+.\"
+.\" Sun Dec 27 12:31:30 1992: Modified by faith@cs.unc.edu
+.\" Sat Mar 6 20:46:02 1993: Modified by faith@cs.unc.edu
+.\" Sat Oct 9 09:35:30 1993: Converted to man format by faith@cs.unc.edu
+.\" Sat Nov 27 20:22:42 1993: Updated authorship information, faith@cs.unc.edu
+.\" Mon Sep 25 14:12:38 1995: Added -v and -p information
+.\" Tue Apr 30 03:32:07 1996: Added some text from A. Koppenhoefer
+.\"
+.TH SWAPON 8 "25 September 1995" "Linux 1.x" "Linux Programmer's Manual"
+.SH NAME
+swapon, swapoff \- enable/disable devices and files for paging and swapping
+.SH SYNOPSIS
+Get info:
+.br
+.in +5
+.B swapon \-s
+.RB [ \-h ]
+.RB [ \-V ]
+.sp
+.in -5
+Enable/disable:
+.br
+.in +5
+.B swapon
+.RB [ \-f ]
+.RB [ \-p
+.IR priority ]
+.RB [ \-v ]
+.IR specialfile ...
+.br
+.B swapoff
+.RB [ \-v ]
+.IR specialfile ...
+.sp
+.in -5
+Enable/disable all:
+.br
+.in +5
+.B swapon \-a
+.RB [ \-e ]
+.RB [ \-f ]
+.RB [ \-v ]
+.br
+.B swapoff \-a
+.RB [ \-v ]
+.in -5
+.SH DESCRIPTION
+.B swapon
+is used to specify devices on which paging and swapping are to take place.
+
+The device or file used is given by the
+.I specialfile
+parameter. It may be of the form
+.BI \-L " label"
+or
+.BI \-U " uuid"
+to indicate a device by label or uuid.
+
+Calls to
+.B swapon
+normally occur in the system boot scripts making all swap devices available, so
+that the paging and swapping activity is interleaved across several devices and
+files.
+
+.B swapoff
+disables swapping on the specified devices and files.
+When the
+.B \-a
+flag is given, swapping is disabled on all known swap devices and files
+(as found in
+.I /proc/swaps
+or
+.IR /etc/fstab ).
+
+.TP
+.B "\-a, \-\-all"
+All devices marked as ``swap'' in
+.I /etc/fstab
+are made available, except for those with the ``noauto'' option.
+Devices that are already being used as swap are silently skipped.
+.TP
+.B "\-e, \-\-ifexists"
+Silently skip devices that do not exist.
+.TP
+.B "\-f, \-\-fixpgsz"
+Reinitialize (exec /sbin/mkswap) the swap space if its page size does not
+match that of the the current running kernel.
+.B mkswap(2)
+initializes the whole device and does not check for bad blocks.
+.TP
+.B \-h, \-\-help
+Provide help.
+.TP
+.B "\-L \fIlabel\fP"
+Use the partition that has the specified
+.IR label .
+(For this, access to
+.I /proc/partitions
+is needed.)
+.TP
+.B "\-p, \-\-priority \fIpriority\fP"
+Specify the priority of the swap device.
+.I priority
+is a value between 0 and 32767. Higher numbers indicate higher
+priority. See
+.BR swapon (2)
+for a full description of swap priorities. Add
+.BI pri= value
+to the option field of
+.I /etc/fstab
+for use with
+.BR "swapon -a" .
+.TP
+.B "\-s, \-\-summary"
+Display swap usage summary by device. Equivalent to "cat /proc/swaps".
+Not available before Linux 2.1.25.
+.TP
+.B "\-U \fIuuid\fP"
+Use the partition that has the specified
+.IR uuid .
+.TP
+.B "\-v, \-\-verbose"
+Be verbose.
+.TP
+.B "\-V, \-\-version"
+Display version.
+.SH NOTES
+You should not use
+.B swapon
+on a file with holes.
+Swap over NFS may not work.
+.PP
+.B swapon
+automatically detects and rewrites swap space signature with old software
+suspend data (e.g S1SUSPEND, S2SUSPEND, ...). The problem is that if we don't
+do it, then we get data corruption the next time an attempt at unsuspending is
+made.
+.SH SEE ALSO
+.BR swapon (2),
+.BR swapoff (2),
+.BR fstab (5),
+.BR init (8),
+.BR mkswap (8),
+.BR rc (8),
+.BR mount (8)
+.SH FILES
+.br
+.I /dev/sd??
+standard paging devices
+.br
+.I /etc/fstab
+ascii filesystem description table
+.SH HISTORY
+The
+.B swapon
+command appeared in 4.0BSD.
+.SH AVAILABILITY
+The swapon command is part of the util-linux-ng package and is available from
+ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
diff --git a/mount/swapon.c b/mount/swapon.c
new file mode 100644
index 0000000..d89c6a9
--- /dev/null
+++ b/mount/swapon.c
@@ -0,0 +1,796 @@
+/*
+ * A swapon(8)/swapoff(8) for Linux 0.99.
+ */
+#include <stdlib.h>
+#include <stdio.h>
+#include <getopt.h>
+#include <string.h>
+#include <mntent.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <fcntl.h>
+#include <stdint.h>
+#include <err.h>
+
+#include "bitops.h"
+#include "blkdev.h"
+#include "swap_constants.h"
+#include "nls.h"
+#include "fsprobe.h"
+#include "pathnames.h"
+#include "swapheader.h"
+
+#define PATH_MKSWAP "/sbin/mkswap"
+
+#ifdef HAVE_SYS_SWAP_H
+# include <sys/swap.h>
+#endif
+
+#ifndef SWAPON_HAS_TWO_ARGS
+/* libc is insane, let's call the kernel */
+# include <sys/syscall.h>
+# define swapon(path, flags) syscall(SYS_swapon, path, flags)
+# define swapoff(path) syscall(SYS_swapoff, path)
+#endif
+
+#define streq(s, t) (strcmp ((s), (t)) == 0)
+
+#define QUIET 1
+#define CANONIC 1
+
+#define MAX_PAGESIZE (64 * 1024)
+
+enum {
+ SIG_SWAPSPACE = 1,
+ SIG_SWSUSPEND
+};
+
+#define SWAP_SIGNATURE "SWAPSPACE2"
+#define SWAP_SIGNATURE_SZ (sizeof(SWAP_SIGNATURE) - 1)
+
+int all;
+int priority = -1; /* non-prioritized swap by default */
+
+/* If true, don't complain if the device/file doesn't exist */
+int ifexists;
+int fixpgsz;
+
+int verbose;
+char *progname;
+
+static struct option longswaponopts[] = {
+ /* swapon only */
+ { "priority", required_argument, 0, 'p' },
+ { "ifexists", 0, 0, 'e' },
+ { "summary", 0, 0, 's' },
+ { "fixpgsz", 0, 0, 'f' },
+ /* also for swapoff */
+ { "all", 0, 0, 'a' },
+ { "help", 0, 0, 'h' },
+ { "verbose", 0, 0, 'v' },
+ { "version", 0, 0, 'V' },
+ { NULL, 0, 0, 0 }
+};
+
+static struct option *longswapoffopts = &longswaponopts[4];
+
+static int cannot_find(const char *special);
+
+#define PRINT_USAGE_SPECIAL(_fp) \
+ fprintf(_fp, _( \
+ "The <special> parameter:\n" \
+ " {-L label | LABEL=label} LABEL of device to be used\n" \
+ " {-U uuid | UUID=uuid} UUID of device to be used\n" \
+ " <device> name of device to be used\n" \
+ " <file> name of file to be used\n\n"))
+
+static void
+swapon_usage(FILE *fp, int n) {
+ fprintf(fp, _("\nUsage:\n"
+ " %1$s -a [-e] [-v] [-f] enable all swaps from /etc/fstab\n"
+ " %1$s [-p priority] [-v] [-f] <special> enable given swap\n"
+ " %1$s -s display swap usage summary\n"
+ " %1$s -h display help\n"
+ " %1$s -V display version\n\n"), progname);
+
+ PRINT_USAGE_SPECIAL(fp);
+
+ exit(n);
+}
+
+static void
+swapoff_usage(FILE *fp, int n) {
+ fprintf(fp, _("\nUsage:\n"
+ " %1$s -a [-v] disable all swaps\n"
+ " %1$s [-v] <special> disable given swap\n"
+ " %1$s -h display help\n"
+ " %1$s -V display version\n\n"), progname);
+
+ PRINT_USAGE_SPECIAL(fp);
+
+ exit(n);
+}
+
+/*
+ * contents of /proc/swaps
+ */
+static int numSwaps;
+static char **swapFiles; /* array of swap file and partition names */
+
+static void
+read_proc_swaps(void) {
+ FILE *swaps;
+ char line[1024];
+ char *p, **q;
+
+ numSwaps = 0;
+ swapFiles = NULL;
+
+ swaps = fopen(_PATH_PROC_SWAPS, "r");
+ if (swaps == NULL)
+ return; /* nothing wrong */
+
+ /* skip the first line */
+ if (!fgets(line, sizeof(line), swaps)) {
+ /* do not whine about an empty file */
+ if (ferror(swaps))
+ warn(_("%s: unexpected file format"), _PATH_PROC_SWAPS);
+ fclose(swaps);
+ return;
+ }
+ /* make sure the first line is the header */
+ if (line[0] != '\0' && strncmp(line, "Filename\t", 9))
+ goto valid_first_line;
+
+ while (fgets(line, sizeof(line), swaps)) {
+ valid_first_line:
+ /*
+ * Cut the line "swap_device ... more info" after device.
+ * This will fail with names with embedded spaces.
+ */
+ for (p = line; *p && *p != ' '; p++);
+ *p = 0;
+
+ q = realloc(swapFiles, (numSwaps+1) * sizeof(*swapFiles));
+ if (q == NULL)
+ break;
+ swapFiles = q;
+
+ swapFiles[numSwaps++] = strdup(line);
+ }
+ fclose(swaps);
+}
+
+static int
+is_in_proc_swaps(const char *fname) {
+ int i;
+
+ for (i = 0; i < numSwaps; i++)
+ if (swapFiles[i] && !strcmp(fname, swapFiles[i]))
+ return 1;
+ return 0;
+}
+
+static int
+display_summary(void)
+{
+ FILE *swaps;
+ char line[1024] ;
+
+ if ((swaps = fopen(_PATH_PROC_SWAPS, "r")) == NULL) {
+ warn(_("%s: open failed"), _PATH_PROC_SWAPS);
+ return -1;
+ }
+
+ while (fgets(line, sizeof(line), swaps))
+ printf("%s", line);
+
+ fclose(swaps);
+ return 0 ;
+}
+
+/* calls mkswap */
+static int
+swap_reinitialize(const char *device) {
+ const char *label = fsprobe_get_label_by_devname(device);
+ const char *uuid = fsprobe_get_uuid_by_devname(device);
+ pid_t pid;
+ int status, ret;
+ char *cmd[7];
+ int idx=0;
+
+ warnx(_("%s: reinitializing the swap."), device);
+
+ switch((pid=fork())) {
+ case -1: /* fork error */
+ warn(_("fork failed"));
+ return -1;
+
+ case 0: /* child */
+ cmd[idx++] = PATH_MKSWAP;
+ if (label && *label) {
+ cmd[idx++] = "-L";
+ cmd[idx++] = (char *) label;
+ }
+ if (uuid && *uuid) {
+ cmd[idx++] = "-U";
+ cmd[idx++] = (char *) uuid;
+ }
+ cmd[idx++] = (char *) device;
+ cmd[idx++] = NULL;
+ execv(cmd[0], cmd);
+ err(EXIT_FAILURE, _("execv failed"));
+
+ default: /* parent */
+ do {
+ if ((ret = waitpid(pid, &status, 0)) < 0
+ && errno == EINTR)
+ continue;
+ else if (ret < 0) {
+ warn(_("waitpid failed"));
+ return -1;
+ }
+ } while (0);
+
+ /* mkswap returns: 0=suss, 1=error */
+ if (WIFEXITED(status) && WEXITSTATUS(status)==0)
+ return 0; /* ok */
+ }
+ return -1; /* error */
+}
+
+static int
+swap_rewrite_signature(const char *devname, unsigned int pagesize)
+{
+ int fd, rc = -1;
+
+ fd = open(devname, O_WRONLY);
+ if (fd == -1) {
+ warn(_("%s: open failed"), devname);
+ return -1;
+ }
+
+ if (lseek(fd, pagesize - SWAP_SIGNATURE_SZ, SEEK_SET) < 0) {
+ warn(_("%s: lseek failed"), devname);
+ goto err;
+ }
+
+ if (write(fd, (void *) SWAP_SIGNATURE,
+ SWAP_SIGNATURE_SZ) != SWAP_SIGNATURE_SZ) {
+ warn(_("%s: write signature failed"), devname);
+ goto err;
+ }
+
+ rc = 0;
+err:
+ close(fd);
+ return rc;
+}
+
+static int
+swap_detect_signature(const char *buf, int *sig)
+{
+ if (memcmp(buf, "SWAP-SPACE", 10) == 0 ||
+ memcmp(buf, "SWAPSPACE2", 10) == 0)
+ *sig = SIG_SWAPSPACE;
+
+ else if (memcmp(buf, "S1SUSPEND", 9) == 0 ||
+ memcmp(buf, "S2SUSPEND", 9) == 0 ||
+ memcmp(buf, "ULSUSPEND", 9) == 0 ||
+ memcmp(buf, "\xed\xc3\x02\xe9\x98\x56\xe5\x0c", 8) == 0)
+ *sig = SIG_SWSUSPEND;
+ else
+ return 0;
+
+ return 1;
+}
+
+static char *
+swap_get_header(int fd, int *sig, unsigned int *pagesize)
+{
+ char *buf;
+ ssize_t datasz;
+ unsigned int page;
+
+ *pagesize = 0;
+ *sig = 0;
+
+ buf = malloc(MAX_PAGESIZE);
+ if (!buf)
+ return NULL;
+
+ datasz = read(fd, buf, MAX_PAGESIZE);
+ if (datasz == (ssize_t) -1)
+ goto err;
+
+ for (page = 0x1000; page <= MAX_PAGESIZE; page <<= 1) {
+ /* skip 32k pagesize since this does not seem to
+ * be supported */
+ if (page == 0x8000)
+ continue;
+ /* the smallest swap area is PAGE_SIZE*10, it means
+ * 40k, that's less than MAX_PAGESIZE */
+ if (datasz < (page - SWAP_SIGNATURE_SZ))
+ break;
+ if (swap_detect_signature(buf + page - SWAP_SIGNATURE_SZ, sig)) {
+ *pagesize = page;
+ break;
+ }
+ }
+
+ if (*pagesize)
+ return buf;
+err:
+ free(buf);
+ return NULL;
+}
+
+/* returns real size of swap space */
+unsigned long long
+swap_get_size(const char *hdr, const char *devname, unsigned int pagesize)
+{
+ unsigned int last_page = 0;
+ int swap_version = 0;
+ int flip = 0;
+ struct swap_header_v1_2 *s;
+
+ s = (struct swap_header_v1_2 *) hdr;
+ if (s->version == 1) {
+ swap_version = 1;
+ last_page = s->last_page;
+ } else if (swab32(s->version) == 1) {
+ flip = 1;
+ swap_version = 1;
+ last_page = swab32(s->last_page);
+ }
+ if (verbose)
+ warnx(_("%s: found %sswap v%d signature string"
+ " for %d KiB PAGE_SIZE\n"),
+ devname,
+ flip ? "other-endian " : "",
+ swap_version,
+ pagesize / 1024);
+
+ return (last_page + 1) * pagesize;
+}
+
+static int
+swapon_checks(const char *special)
+{
+ struct stat st;
+ int fd = -1, sig;
+ char *hdr = NULL;
+ unsigned int pagesize;
+ unsigned long long devsize = 0;
+
+ if (stat(special, &st) < 0) {
+ warn(_("%s: stat failed"), special);
+ goto err;
+ }
+
+ /* people generally dislike this warning - now it is printed
+ only when `verbose' is set */
+ if (verbose) {
+ int permMask = (S_ISBLK(st.st_mode) ? 07007 : 07077);
+
+ if ((st.st_mode & permMask) != 0)
+ warnx(_("%s: insecure permissions %04o, %04o suggested."),
+ special, st.st_mode & 07777,
+ ~permMask & 0666);
+ }
+
+ /* test for holes by LBT */
+ if (S_ISREG(st.st_mode)) {
+ if (st.st_blocks * 512 < st.st_size) {
+ warnx(_("%s: skipping - it appears to have holes."),
+ special);
+ goto err;
+ }
+ devsize = st.st_size;
+ }
+
+ fd = open(special, O_RDONLY);
+ if (fd == -1) {
+ warn(_("%s: open failed"), special);
+ goto err;
+ }
+
+ if (S_ISBLK(st.st_mode) && blkdev_get_size(fd, &devsize)) {
+ warn(_("%s: get size failed"), special);
+ goto err;
+ }
+
+ hdr = swap_get_header(fd, &sig, &pagesize);
+ if (!hdr) {
+ warn(_("%s: read swap header failed"), special);
+ goto err;
+ }
+
+ if (sig == SIG_SWAPSPACE && pagesize) {
+ unsigned long long swapsize =
+ swap_get_size(hdr, special, pagesize);
+ if (verbose)
+ warnx("%s: pagesize=%d, swapsize=%llu, devsize=%llu",
+ special, pagesize, swapsize, devsize);
+
+ if (swapsize > devsize) {
+ if (verbose)
+ warnx(_("%s: last_page 0x%08llx is larger"
+ " than actual size of swapspace"),
+ special, swapsize);
+ } else if (getpagesize() != pagesize) {
+ if (fixpgsz) {
+ warnx(_("%s: swap format pagesize does not match."),
+ special);
+ if (swap_reinitialize(special) < 0)
+ goto err;
+ } else
+ warnx(_("%s: swap format pagesize does not match. "
+ "(Use --fixpgsz to reinitialize it.)"),
+ special);
+ }
+ } else if (sig == SIG_SWSUSPEND) {
+ /* We have to reinitialize swap with old (=useless) software suspend
+ * data. The problem is that if we don't do it, then we get data
+ * corruption the next time an attempt at unsuspending is made.
+ */
+ warnx(_("%s: software suspend data detected. "
+ "Rewriting the swap signature."),
+ special);
+ if (swap_rewrite_signature(special, pagesize) < 0)
+ goto err;
+ }
+
+ free(hdr);
+ close(fd);
+ return 0;
+err:
+ if (fd != -1)
+ close(fd);
+ free(hdr);
+ return -1;
+}
+
+static int
+do_swapon(const char *orig_special, int prio, int canonic) {
+ int status;
+ const char *special = orig_special;
+ int flags = 0;
+
+ if (verbose)
+ printf(_("%s on %s\n"), progname, orig_special);
+
+ if (!canonic) {
+ special = fsprobe_get_devname_by_spec(orig_special);
+ if (!special)
+ return cannot_find(orig_special);
+ }
+
+ if (swapon_checks(special))
+ return -1;
+
+#ifdef SWAP_FLAG_PREFER
+ if (prio >= 0) {
+ if (prio > SWAP_FLAG_PRIO_MASK)
+ prio = SWAP_FLAG_PRIO_MASK;
+ flags = SWAP_FLAG_PREFER
+ | ((prio & SWAP_FLAG_PRIO_MASK)
+ << SWAP_FLAG_PRIO_SHIFT);
+ }
+#endif
+ status = swapon(special, flags);
+ if (status < 0)
+ warn(_("%s: swapon failed"), orig_special);
+
+ return status;
+}
+
+static int
+cannot_find(const char *special) {
+ warnx(_("cannot find the device for %s"), special);
+ return -1;
+}
+
+static int
+swapon_by_label(const char *label, int prio) {
+ const char *special = fsprobe_get_devname_by_label(label);
+ return special ? do_swapon(special, prio, CANONIC) : cannot_find(label);
+}
+
+static int
+swapon_by_uuid(const char *uuid, int prio) {
+ const char *special = fsprobe_get_devname_by_uuid(uuid);
+ return special ? do_swapon(special, prio, CANONIC) : cannot_find(uuid);
+}
+
+static int
+do_swapoff(const char *orig_special, int quiet, int canonic) {
+ const char *special = orig_special;
+
+ if (verbose)
+ printf(_("%s on %s\n"), progname, orig_special);
+
+ if (!canonic) {
+ special = fsprobe_get_devname_by_spec(orig_special);
+ if (!special)
+ return cannot_find(orig_special);
+ }
+
+ if (swapoff(special) == 0)
+ return 0; /* success */
+
+ if (errno == EPERM)
+ errx(EXIT_FAILURE, _("Not superuser."));
+
+ if (!quiet || errno == ENOMEM)
+ warn(_("%s: swapoff failed"), orig_special);
+
+ return -1;
+}
+
+static int
+swapoff_by_label(const char *label, int quiet) {
+ const char *special = fsprobe_get_devname_by_label(label);
+ return special ? do_swapoff(special, quiet, CANONIC) : cannot_find(label);
+}
+
+static int
+swapoff_by_uuid(const char *uuid, int quiet) {
+ const char *special = fsprobe_get_devname_by_uuid(uuid);
+ return special ? do_swapoff(special, quiet, CANONIC) : cannot_find(uuid);
+}
+
+static int
+swapon_all(void) {
+ FILE *fp;
+ struct mntent *fstab;
+ int status = 0;
+
+ read_proc_swaps();
+
+ fp = setmntent(_PATH_MNTTAB, "r");
+ if (fp == NULL)
+ err(2, _("%s: open failed"), _PATH_MNTTAB);
+
+ while ((fstab = getmntent(fp)) != NULL) {
+ const char *special;
+ int skip = 0;
+ int pri = priority;
+ char *opt, *opts;
+
+ if (!streq(fstab->mnt_type, MNTTYPE_SWAP))
+ continue;
+
+ opts = strdup(fstab->mnt_opts);
+
+ for (opt = strtok(opts, ","); opt != NULL;
+ opt = strtok(NULL, ",")) {
+ if (strncmp(opt, "pri=", 4) == 0)
+ pri = atoi(opt+4);
+ if (strcmp(opt, "noauto") == 0)
+ skip = 1;
+ }
+ free(opts);
+
+ if (skip)
+ continue;
+
+ special = fsprobe_get_devname_by_spec(fstab->mnt_fsname);
+ if (!special) {
+ if (!ifexists)
+ status |= cannot_find(fstab->mnt_fsname);
+ continue;
+ }
+
+ if (!is_in_proc_swaps(special) &&
+ (!ifexists || !access(special, R_OK)))
+ status |= do_swapon(special, pri, CANONIC);
+
+ free((void *) special);
+ }
+ fclose(fp);
+
+ return status;
+}
+
+static const char **llist = NULL;
+static int llct = 0;
+static const char **ulist = NULL;
+static int ulct = 0;
+
+static void addl(const char *label) {
+ llist = (const char **) realloc(llist, (++llct) * sizeof(char *));
+ if (!llist)
+ exit(EXIT_FAILURE);
+ llist[llct-1] = label;
+}
+
+static void addu(const char *uuid) {
+ ulist = (const char **) realloc(ulist, (++ulct) * sizeof(char *));
+ if (!ulist)
+ exit(EXIT_FAILURE);
+ ulist[ulct-1] = uuid;
+}
+
+static int
+main_swapon(int argc, char *argv[]) {
+ int status = 0;
+ int c, i;
+
+ while ((c = getopt_long(argc, argv, "ahefp:svVL:U:",
+ longswaponopts, NULL)) != -1) {
+ switch (c) {
+ case 'a': /* all */
+ ++all;
+ break;
+ case 'h': /* help */
+ swapon_usage(stdout, 0);
+ break;
+ case 'p': /* priority */
+ priority = atoi(optarg);
+ break;
+ case 'L':
+ addl(optarg);
+ break;
+ case 'U':
+ addu(optarg);
+ break;
+ case 'e': /* ifexists */
+ ifexists = 1;
+ break;
+ case 'f':
+ fixpgsz = 1;
+ break;
+ case 's': /* status report */
+ status = display_summary();
+ exit(status);
+ case 'v': /* be chatty */
+ ++verbose;
+ break;
+ case 'V': /* version */
+ printf("%s: (%s)\n", progname, PACKAGE_STRING);
+ exit(0);
+ case 0:
+ break;
+ case '?':
+ default:
+ swapon_usage(stderr, 1);
+ }
+ }
+ argv += optind;
+
+ if (!all && !llct && !ulct && *argv == NULL)
+ swapon_usage(stderr, 2);
+
+ if (ifexists && (!all || strcmp(progname, "swapon")))
+ swapon_usage(stderr, 1);
+
+ if (all)
+ status |= swapon_all();
+
+ for (i = 0; i < llct; i++)
+ status |= swapon_by_label(llist[i], priority);
+
+ for (i = 0; i < ulct; i++)
+ status |= swapon_by_uuid(ulist[i], priority);
+
+ while (*argv != NULL)
+ status |= do_swapon(*argv++, priority, !CANONIC);
+
+ return status;
+}
+
+static int
+main_swapoff(int argc, char *argv[]) {
+ FILE *fp;
+ struct mntent *fstab;
+ int status = 0;
+ int c, i;
+
+ while ((c = getopt_long(argc, argv, "ahvVL:U:",
+ longswapoffopts, NULL)) != -1) {
+ switch (c) {
+ case 'a': /* all */
+ ++all;
+ break;
+ case 'h': /* help */
+ swapoff_usage(stdout, 0);
+ break;
+ case 'v': /* be chatty */
+ ++verbose;
+ break;
+ case 'V': /* version */
+ printf("%s (%s)\n", progname, PACKAGE_STRING);
+ exit(0);
+ case 'L':
+ addl(optarg);
+ break;
+ case 'U':
+ addu(optarg);
+ break;
+ case 0:
+ break;
+ case '?':
+ default:
+ swapoff_usage(stderr, 1);
+ }
+ }
+ argv += optind;
+
+ if (!all && !llct && !ulct && *argv == NULL)
+ swapoff_usage(stderr, 2);
+
+ /*
+ * swapoff any explicitly given arguments.
+ * Complain in case the swapoff call fails.
+ */
+ for (i = 0; i < llct; i++)
+ status |= swapoff_by_label(llist[i], !QUIET);
+
+ for (i = 0; i < ulct; i++)
+ status |= swapoff_by_uuid(ulist[i], !QUIET);
+
+ while (*argv != NULL)
+ status |= do_swapoff(*argv++, !QUIET, !CANONIC);
+
+ if (all) {
+ /*
+ * In case /proc/swaps exists, unswap stuff listed there.
+ * We are quiet but report errors in status.
+ * Errors might mean that /proc/swaps
+ * exists as ordinary file, not in procfs.
+ * do_swapoff() exits immediately on EPERM.
+ */
+ read_proc_swaps();
+ for(i=0; i<numSwaps; i++)
+ status |= do_swapoff(swapFiles[i], QUIET, CANONIC);
+
+ /*
+ * Unswap stuff mentioned in /etc/fstab.
+ * Probably it was unmounted already, so errors are not bad.
+ * Doing swapoff -a twice should not give error messages.
+ */
+ fp = setmntent(_PATH_MNTTAB, "r");
+ if (fp == NULL)
+ err(2, _("%s: open failed"), _PATH_MNTTAB);
+
+ while ((fstab = getmntent(fp)) != NULL) {
+ const char *special;
+
+ if (!streq(fstab->mnt_type, MNTTYPE_SWAP))
+ continue;
+
+ special = fsprobe_get_devname_by_spec(fstab->mnt_fsname);
+ if (!special)
+ continue;
+
+ if (!is_in_proc_swaps(special))
+ do_swapoff(special, QUIET, CANONIC);
+ }
+ fclose(fp);
+ }
+
+ return status;
+}
+
+int
+main(int argc, char *argv[]) {
+
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
+ progname = program_invocation_short_name;
+ if (!progname) {
+ char *p = strrchr(argv[0], '/');
+ progname = p ? p+1 : argv[0];
+ }
+
+ if (streq(progname, "swapon"))
+ return main_swapon(argc, argv);
+ else
+ return main_swapoff(argc, argv);
+}
diff --git a/mount/umount.8 b/mount/umount.8
new file mode 100644
index 0000000..ca67e1d
--- /dev/null
+++ b/mount/umount.8
@@ -0,0 +1,163 @@
+.\" Copyright (c) 1996 Andries Brouwer
+.\" This page is somewhat derived from a page that was
+.\" (c) 1980, 1989, 1991 The Regents of the University of California
+.\" and had been heavily modified by Rik Faith and myself.
+.\"
+.\" This is free documentation; you can redistribute it and/or
+.\" modify it under the terms of the GNU General Public License as
+.\" published by the Free Software Foundation; either version 2 of
+.\" the License, or (at your option) any later version.
+.\"
+.\" The GNU General Public License's references to "object code"
+.\" and "executables" are to be interpreted as the output of any
+.\" document formatting or typesetting system, including
+.\" intermediate and printed output.
+.\"
+.\" This manual is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public
+.\" License along with this manual; if not, write to the Free
+.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
+.\" USA.
+.\"
+.TH UMOUNT 8 "26 July 1997" "Linux 2.0" "Linux Programmer's Manual"
+.SH NAME
+umount \- unmount file systems
+.SH SYNOPSIS
+.B umount
+.RB [ \-hV ]
+.LP
+.B umount \-a
+.RB [ \-dflnrv ]
+.RB [ \-t
+.IR vfstype ]
+.RB [ \-O
+.IR options ]
+.br
+.B umount
+.RB [ \-dflnrv ]
+.RI { dir | device }...
+.SH DESCRIPTION
+The
+.B umount
+command detaches the file system(s) mentioned from the file hierarchy.
+A file system is specified by giving the directory where it
+has been mounted. Giving the special device on which the file system lives
+may also work, but is obsolete, mainly because it will fail
+in case this device was mounted on more than one directory.
+
+Note that a file system cannot be unmounted when it is `busy' -
+for example, when there are open files on it, or when some process
+has its working directory there, or when a swap file on it is in use.
+The offending process could even be
+.B umount
+itself - it opens libc, and libc in its turn may open for example
+locale files.
+A lazy unmount avoids this problem.
+
+Options for the
+.B umount
+command:
+.TP
+.B \-V
+Print version and exit.
+.TP
+.B \-h
+Print help message and exit.
+.TP
+.B \-v
+Verbose mode.
+.TP
+.B \-n
+Unmount without writing in
+.IR /etc/mtab .
+.TP
+.B \-r
+In case unmounting fails, try to remount read-only.
+.TP
+.B \-d
+In case the unmounted device was a loop device, also
+free this loop device.
+.TP
+.B \-i
+Don't call the /sbin/umount.<filesystem> helper even if it exists. By default /sbin/umount.<filesystem> helper is called if one exists.
+.TP
+.B \-a
+All of the file systems described in
+.I /etc/mtab
+are unmounted. (With
+.B umount
+version 2.7 and later: the
+.I proc
+filesystem is not unmounted.)
+.TP
+.BI \-t " vfstype"
+Indicate that the actions should only be taken on file systems of the
+specified type. More than one type may be specified in a comma separated
+list. The list of file system types can be prefixed with
+.B no
+to specify the file system types on which no action should be taken.
+.TP
+.BI \-O " options"
+Indicate that the actions should only be taken on file systems with
+the specified options in
+.IR /etc/fstab .
+More than one option type may be specified in a comma separated
+list. Each option can be prefixed with
+.B no
+to specify options for which no action should be taken.
+.TP
+.B \-f
+Force unmount (in case of an unreachable NFS system).
+(Requires kernel 2.1.116 or later.)
+.TP
+.B \-l
+Lazy unmount. Detach the filesystem from the filesystem hierarchy now,
+and cleanup all references to the filesystem as soon as it is not busy
+anymore.
+(Requires kernel 2.4.11 or later.)
+
+.SH "THE LOOP DEVICE"
+The
+.B umount
+command will free the loop device (if any) associated
+with the mount, in case it finds the option `loop=...' in
+.IR /etc/mtab ,
+or when the \-d option was given.
+Any pending loop devices can be freed using `losetup -d', see
+.BR losetup (8).
+
+.SH NOTES
+The syntax of external umount helpers is:
+
+.br
+.BI /sbin/umount. <suffix>
+.RI { dir | device }
+.RB [ \-nlfvr ]
+.br
+
+where the <suffix> is filesystem type or a value from "uhelper=" mtab option.
+
+The uhelper (unprivileged umount helper) is possible to used when non-root user
+wants to umount a mountpoint which is not defined in the /etc/fstab file (e.g
+devices mounted by HAL).
+
+.SH FILES
+.I /etc/mtab
+table of mounted file systems
+
+.SH "SEE ALSO"
+.BR umount (2),
+.BR mount (8),
+.BR losetup (8).
+
+.SH HISTORY
+A
+.B umount
+command appeared in Version 6 AT&T UNIX.
+.SH AVAILABILITY
+The umount command is part of the util-linux-ng package and is available from
+ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
diff --git a/mount/umount.c b/mount/umount.c
new file mode 100644
index 0000000..a695f0c
--- /dev/null
+++ b/mount/umount.c
@@ -0,0 +1,714 @@
+/*
+ * umount(8) for Linux 0.99 - jrs, 1993
+ */
+
+#include <stdio.h>
+#include <unistd.h>
+#include <getopt.h>
+#include <string.h>
+#include <errno.h>
+#include <ctype.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <sys/mount.h>
+#include "mount_constants.h"
+#include "sundries.h"
+#include "getusername.h"
+#include "pathnames.h"
+#include "lomount.h"
+#include "loop.h"
+#include "fstab.h"
+#include "env.h"
+#include "nls.h"
+
+#if defined(MNT_FORCE)
+/* Interesting ... it seems libc knows about MNT_FORCE and presumably
+ about umount2 as well -- need not do anything */
+#else /* MNT_FORCE */
+
+/* Does the present kernel source know about umount2? */
+#include <linux/unistd.h>
+#ifdef __NR_umount2
+
+static int umount2(const char *path, int flags);
+
+_syscall2(int, umount2, const char *, path, int, flags);
+
+#else /* __NR_umount2 */
+
+static int
+umount2(const char *path, int flags) {
+ fprintf(stderr, _("umount: compiled without support for -f\n"));
+ errno = ENOSYS;
+ return -1;
+}
+#endif /* __NR_umount2 */
+
+#if !defined(MNT_FORCE)
+/* dare not try to include <linux/mount.h> -- lots of errors */
+#define MNT_FORCE 1
+#endif
+
+#endif /* MNT_FORCE */
+
+#if !defined(MNT_DETACH)
+#define MNT_DETACH 2
+#endif
+
+
+/* True if we are allowed to call /sbin/umount.${FSTYPE} */
+int external_allowed = 1;
+
+/* Nonzero for force umount (-f). There is kernel support since 2.1.116. */
+int force = 0;
+
+/* Nonzero for lazy umount (-l). There is kernel support since 2.4.11. */
+int lazy = 0;
+
+/* When umount fails, attempt a read-only remount (-r). */
+int remount = 0;
+
+/* Don't write a entry in /etc/mtab (-n). */
+int nomtab = 0;
+
+/* Call losetup -d for each unmounted loop device. */
+int delloop = 0;
+
+/* True if (ruid != euid) or (0 != ruid), i.e. only "user" umounts permitted. */
+int restricted = 1;
+
+/* Last error message */
+int complained_err = 0;
+char *complained_dev = NULL;
+
+/*
+ * check_special_umountprog()
+ * If there is a special umount program for this type, exec it.
+ * returns: 0: no exec was done, 1: exec was done, status has result
+ */
+static int
+check_special_umountprog(const char *spec, const char *node,
+ const char *type, int *status) {
+ char umountprog[120];
+ struct stat statbuf;
+ int res;
+
+ if (!external_allowed)
+ return 0;
+
+ if (type == NULL || strcmp(type, "none") == 0)
+ return 0;
+
+ if (strlen(type) < 100) {
+ sprintf(umountprog, "/sbin/umount.%s", type);
+ if (stat(umountprog, &statbuf) == 0) {
+ res = fork();
+ if (res == 0) {
+ char *umountargs[8];
+ int i = 0;
+
+ if(setgid(getgid()) < 0)
+ die(EX_FAIL, _("umount: cannot set group id: %s"), strerror(errno));
+
+ if(setuid(getuid()) < 0)
+ die(EX_FAIL, _("umount: cannot set user id: %s"), strerror(errno));
+
+ umountargs[i++] = umountprog;
+ umountargs[i++] = xstrdup(node);
+ if (nomtab)
+ umountargs[i++] = "-n";
+ if (lazy)
+ umountargs[i++] = "-l";
+ if (force)
+ umountargs[i++] = "-f";
+ if (verbose)
+ umountargs[i++] = "-v";
+ if (remount)
+ umountargs[i++] = "-r";
+ umountargs[i] = NULL;
+ execv(umountprog, umountargs);
+ exit(1); /* exec failed */
+ } else if (res != -1) {
+ int st;
+ wait(&st);
+ *status = (WIFEXITED(st) ? WEXITSTATUS(st)
+ : EX_SYSERR);
+ return 1;
+ } else {
+ int errsv = errno;
+ error(_("umount: cannot fork: %s"),
+ strerror(errsv));
+ }
+ }
+ }
+ return 0;
+}
+
+/* complain about a failed umount */
+static void complain(int err, const char *dev) {
+
+ if (complained_err == err && complained_dev && dev &&
+ strcmp(dev, complained_dev) == 0)
+ return;
+
+ complained_err = err;
+ free(complained_dev);
+ complained_dev = xstrdup(dev);
+
+ switch (err) {
+ case ENXIO:
+ error (_("umount: %s: invalid block device"), dev); break;
+ case EINVAL:
+ error (_("umount: %s: not mounted"), dev); break;
+ case EIO:
+ error (_("umount: %s: can't write superblock"), dev); break;
+ case EBUSY:
+ /* Let us hope fstab has a line "proc /proc ..."
+ and not "none /proc ..."*/
+ error (_("umount: %s: device is busy.\n"
+ " (In some cases useful info about processes that use\n"
+ " the device is found by lsof(8) or fuser(1))"), dev);
+ break;
+ case ENOENT:
+ error (_("umount: %s: not found"), dev); break;
+ case EPERM:
+ error (_("umount: %s: must be superuser to umount"), dev); break;
+ case EACCES:
+ error (_("umount: %s: block devices not permitted on fs"), dev); break;
+ default:
+ error (_("umount: %s: %s"), dev, strerror (err)); break;
+ }
+}
+
+/* Umount a single device. Return a status code, so don't exit
+ on a non-fatal error. We lock/unlock around each umount. */
+static int
+umount_one (const char *spec, const char *node, const char *type,
+ const char *opts, struct mntentchn *mc) {
+ int umnt_err = 0;
+ int isroot;
+ int res;
+ int status;
+ const char *loopdev;
+ int myloop = 0;
+
+ /* Special case for root. As of 0.99pl10 we can (almost) unmount root;
+ the kernel will remount it readonly so that we can carry on running
+ afterwards. The readonly remount is illegal if any files are opened
+ for writing at the time, so we can't update mtab for an unmount of
+ root. As it is only really a remount, this doesn't matter too
+ much. [sct May 29, 1993] */
+ isroot = (streq (node, "/") || streq (node, "root")
+ || streq (node, "rootfs"));
+ if (isroot)
+ nomtab++;
+
+ /*
+ * Call umount.TYPE for types that require a separate umount program.
+ * All such special things must occur isolated in the types string.
+ */
+ if (check_special_umountprog(spec, node, type, &status))
+ return status;
+
+ /*
+ * Ignore the option "-d" for non-loop devices and loop devices with
+ * LO_FLAGS_AUTOCLEAR flag.
+ */
+ if (delloop && is_loop_device(spec) && !is_loop_autoclear(spec))
+ myloop = 1;
+
+ if (lazy) {
+ res = umount2 (node, MNT_DETACH);
+ if (res < 0)
+ umnt_err = errno;
+ goto writemtab;
+ }
+
+ if (force) { /* only supported for NFS */
+ res = umount2 (node, MNT_FORCE);
+ if (res == -1) {
+ int errsv = errno;
+ perror("umount2");
+ errno = errsv;
+ if (errno == ENOSYS) {
+ if (verbose)
+ printf(_("no umount2, trying umount...\n"));
+ res = umount (node);
+ }
+ }
+ } else
+ res = umount (node);
+
+ if (res < 0)
+ umnt_err = errno;
+
+ if (res < 0 && remount && umnt_err == EBUSY) {
+ /* Umount failed - let us try a remount */
+ res = mount(spec, node, NULL,
+ MS_MGC_VAL | MS_REMOUNT | MS_RDONLY, NULL);
+ if (res == 0) {
+ struct my_mntent remnt;
+ fprintf(stderr,
+ _("umount: %s busy - remounted read-only\n"),
+ spec);
+ remnt.mnt_type = remnt.mnt_fsname = NULL;
+ remnt.mnt_dir = xstrdup(node);
+ remnt.mnt_opts = xstrdup("ro");
+ if (!nomtab)
+ update_mtab(node, &remnt);
+ return 0;
+ } else if (errno != EBUSY) { /* hmm ... */
+ perror("remount");
+ fprintf(stderr,
+ _("umount: could not remount %s read-only\n"),
+ spec);
+ }
+ }
+
+ loopdev = 0;
+ if (res >= 0) {
+ /* Umount succeeded */
+ if (verbose)
+ printf (_("%s umounted\n"), spec);
+
+ /* Free any loop devices that we allocated ourselves */
+ if (mc) {
+ char *optl;
+
+ /* old style mtab line? */
+ if (streq(mc->m.mnt_type, "loop")) {
+ loopdev = spec;
+ goto gotloop;
+ }
+
+ /* new style mtab line? */
+ optl = mc->m.mnt_opts ? xstrdup(mc->m.mnt_opts) : "";
+ for (optl = strtok (optl, ","); optl;
+ optl = strtok (NULL, ",")) {
+ if (!strncmp(optl, "loop=", 5)) {
+ loopdev = optl+5;
+ goto gotloop;
+ }
+ }
+ } else {
+ /*
+ * If option "-o loop=spec" occurs in mtab,
+ * note the mount point, and delete mtab line.
+ */
+ if ((mc = getmntoptfile (spec)) != NULL)
+ node = mc->m.mnt_dir;
+ }
+
+ /* Also free loop devices when -d flag is given */
+ if (myloop)
+ loopdev = spec;
+ }
+ gotloop:
+ if (loopdev)
+ del_loop(loopdev);
+
+ writemtab:
+ if (!nomtab &&
+ (umnt_err == 0 || umnt_err == EINVAL || umnt_err == ENOENT)) {
+ update_mtab (node, NULL);
+ }
+
+ if (res >= 0)
+ return 0;
+ if (umnt_err)
+ complain(umnt_err, node);
+ return 1;
+}
+
+/*
+ * umount_one_bw: unmount FILE that has last occurrence MC0
+ *
+ * Why this loop?
+ * 1. People who boot a system with a bad fstab root entry
+ * will get an incorrect "/dev/foo on /" in mtab.
+ * If later /dev/foo is actually mounted elsewhere,
+ * it will occur twice in mtab.
+ * 2. With overmounting one can get the situation that
+ * the same filename is used as mount point twice.
+ * In both cases, it is best to try the last occurrence first.
+ */
+static int
+umount_one_bw (const char *file, struct mntentchn *mc0) {
+ struct mntentchn *mc;
+ int res = 1;
+
+ mc = mc0;
+ while (res && mc) {
+ res = umount_one(mc->m.mnt_fsname, mc->m.mnt_dir,
+ mc->m.mnt_type, mc->m.mnt_opts, mc);
+ mc = getmntdirbackward(file, mc);
+ }
+ mc = mc0;
+ while (res && mc) {
+ res = umount_one(mc->m.mnt_fsname, mc->m.mnt_dir,
+ mc->m.mnt_type, mc->m.mnt_opts, mc);
+ mc = getmntdevbackward(file, mc);
+ }
+ return res;
+}
+
+/* Unmount all filesystems of type VFSTYPES found in mtab. Since we are
+ concurrently updating mtab after every successful umount, we have to
+ slurp in the entire file before we start. This isn't too bad, because
+ in any case it's important to umount mtab entries in reverse order
+ to mount, e.g. /usr/spool before /usr. */
+static int
+umount_all (char *types, char *test_opts) {
+ struct mntentchn *mc, *hd;
+ int errors = 0;
+
+ hd = mtab_head();
+ if (!hd->prev)
+ die (2, _("umount: cannot find list of filesystems to unmount"));
+ for (mc = hd->prev; mc != hd; mc = mc->prev) {
+ if (matching_type (mc->m.mnt_type, types)
+ && matching_opts (mc->m.mnt_opts, test_opts)) {
+ errors |= umount_one (mc->m.mnt_fsname, mc->m.mnt_dir,
+ mc->m.mnt_type, mc->m.mnt_opts, mc);
+ }
+ }
+
+ sync ();
+ return errors;
+}
+
+static struct option longopts[] =
+{
+ { "all", 0, 0, 'a' },
+ { "force", 0, 0, 'f' },
+ { "help", 0, 0, 'h' },
+ { "no-mtab", 0, 0, 'n' },
+ { "test-opts", 1, 0, 'O' },
+ { "verbose", 0, 0, 'v' },
+ { "version", 0, 0, 'V' },
+ { "read-only", 0, 0, 'r' },
+ { "types", 1, 0, 't' },
+ { NULL, 0, 0, 0 }
+};
+
+static void
+usage (FILE *fp, int n)
+{
+ fprintf (fp, _("Usage: umount -h | -V\n"
+ " umount -a [-d] [-f] [-r] [-n] [-v] [-t vfstypes] [-O opts]\n"
+ " umount [-d] [-f] [-r] [-n] [-v] special | node...\n"));
+ exit (n);
+}
+
+/*
+ * Look for an option in a comma-separated list
+ */
+static int
+contains(const char *list, const char *s) {
+ int n = strlen(s);
+
+ while (list && *list) {
+ if (strncmp(list, s, n) == 0 &&
+ (list[n] == 0 || list[n] == ','))
+ return 1;
+ while (*list && *list++ != ',') ;
+ }
+ return 0;
+}
+
+/*
+ * If list contains "user=peter" and we ask for "user=", return "peter"
+ */
+static char *
+get_value(const char *list, const char *s) {
+ const char *t;
+ int n = strlen(s);
+
+ while (list && *list) {
+ if (strncmp(list, s, n) == 0) {
+ s = t = list+n;
+ while (*s && *s != ',')
+ s++;
+ return xstrndup(t, s-t);
+ }
+ while (*list && *list++ != ',') ;
+ }
+ return NULL;
+}
+
+/* check if @mc contains a loop device which is associated
+ * with the @file in fs
+ */
+static int
+is_valid_loop(struct mntentchn *mc, struct mntentchn *fs)
+{
+ unsigned long long offset = 0;
+ char *p;
+
+ /* check if it begins with /dev/loop */
+ if (strncmp(mc->m.mnt_fsname, _PATH_DEV_LOOP,
+ sizeof(_PATH_DEV_LOOP) - 1))
+ return 0;
+
+ /* check for loop option in fstab */
+ if (!contains(fs->m.mnt_opts, "loop"))
+ return 0;
+
+ /* check for offset option in fstab */
+ p = get_value(fs->m.mnt_opts, "offset=");
+ if (p)
+ offset = strtoull(p, NULL, 10);
+
+ /* check association */
+ if (loopfile_used_with((char *) mc->m.mnt_fsname,
+ fs->m.mnt_fsname, offset) == 1) {
+ if (verbose > 1)
+ printf(_("device %s is associated with %s\n"),
+ mc->m.mnt_fsname, fs->m.mnt_fsname);
+ return 1;
+ }
+
+ if (verbose > 1)
+ printf(_("device %s is not associated with %s\n"),
+ mc->m.mnt_fsname, fs->m.mnt_fsname);
+ return 0;
+}
+
+static int
+umount_file (char *arg) {
+ struct mntentchn *mc, *fs;
+ const char *file, *options;
+ int fstab_has_user, fstab_has_users, fstab_has_owner, fstab_has_group;
+ int ok;
+
+ if (!*arg) { /* "" would be expanded to `pwd` */
+ die(2, _("Cannot umount \"\"\n"));
+ return 0;
+ }
+
+ file = canonicalize(arg); /* mtab paths are canonicalized */
+ if (verbose > 1)
+ printf(_("Trying to umount %s\n"), file);
+
+ mc = getmntdirbackward(file, NULL);
+ if (!mc) {
+ mc = getmntdevbackward(file, NULL);
+ if (mc) {
+ struct mntentchn *mc1;
+
+ mc1 = getmntdirbackward(mc->m.mnt_dir, NULL);
+ if (!mc1)
+ /* 'mc1' must exist, though not necessarily
+ equals to `mc'. Otherwise we go mad. */
+ die(EX_SOFTWARE,
+ _("umount: confused when analyzing mtab"));
+
+ if (strcmp(file, mc1->m.mnt_fsname)) {
+ /* Something was stacked over `file' on the
+ same mount point. */
+ die(EX_FAIL, _("umount: cannot umount %s -- %s is "
+ "mounted over it on the same point."),
+ file, mc1->m.mnt_fsname);
+ }
+ }
+ }
+ if (!mc && verbose)
+ printf(_("Could not find %s in mtab\n"), file);
+
+ if (restricted) {
+ char *mtab_user = NULL;
+
+ if (!mc)
+ die(2,
+ _("umount: %s is not mounted (according to mtab)"),
+ file);
+ /*
+ * uhelper - unprivileged umount helper
+ * -- external umount (for example HAL mounts)
+ */
+ if (external_allowed) {
+ char *uhelper = NULL;
+
+ if (mc->m.mnt_opts)
+ uhelper = get_value(mc->m.mnt_opts, "uhelper=");
+ if (uhelper) {
+ int status = 0;
+ if (check_special_umountprog(arg, arg,
+ uhelper, &status))
+ return status;
+ }
+ }
+
+ /* The 2.4 kernel will generally refuse to mount the same
+ filesystem on the same mount point, but will accept NFS.
+ So, unmounting must be possible. */
+ if (!is_mounted_once(file) && strcmp(mc->m.mnt_type,"nfs"))
+ die(2,
+ _("umount: it seems %s is mounted multiple times"),
+ file);
+
+ /* If fstab contains the two lines
+ /dev/sda1 /mnt/zip auto user,noauto 0 0
+ /dev/sda4 /mnt/zip auto user,noauto 0 0
+ then "mount /dev/sda4" followed by "umount /mnt/zip"
+ used to fail. So, we must not look for file, but for
+ the pair (dev,file) in fstab. */
+ fs = getfs_by_devdir(mc->m.mnt_fsname, mc->m.mnt_dir);
+ if (!fs) {
+ fs = getfs_by_dir(file);
+ if (!fs && !getfs_by_spec(file))
+ die (2,
+ _("umount: %s is not in the fstab "
+ "(and you are not root)"),
+ file);
+
+ /* spec could be a file which is loop mounted */
+ if (fs && !is_valid_loop(mc, fs))
+ die (2, _("umount: %s mount disagrees with "
+ "the fstab"), file);
+ }
+
+ /*
+ * User mounting and unmounting is allowed only
+ * if fstab contains one of the options `user',
+ * `users' or `owner' or `group'.
+ *
+ * The option `users' allows arbitrary users to mount
+ * and unmount - this may be a security risk.
+ *
+ * The options `user', `owner' and `group' only allow
+ * unmounting by the user that mounted (visible in mtab).
+ */
+
+ options = fs->m.mnt_opts;
+ if (!options)
+ options = "";
+ fstab_has_user = contains(options, "user");
+ fstab_has_users = contains(options, "users");
+ fstab_has_owner = contains(options, "owner");
+ fstab_has_group = contains(options, "group");
+ ok = 0;
+
+ if (fstab_has_users)
+ ok = 1;
+
+ if (!ok && (fstab_has_user || fstab_has_owner ||
+ fstab_has_group)) {
+ char *user = getusername();
+
+ options = mc->m.mnt_opts;
+ if (!options)
+ options = "";
+ mtab_user = get_value(options, "user=");
+
+ if (user && mtab_user && streq (user, mtab_user))
+ ok = 1;
+ }
+ if (!ok)
+ die (2, _("umount: only %s can unmount %s from %s"),
+ mtab_user ? mtab_user : "root",
+ fs->m.mnt_fsname, fs->m.mnt_dir);
+ }
+
+ if (mc)
+ return umount_one_bw (file, mc);
+ else
+ return umount_one (arg, arg, arg, arg, NULL);
+}
+
+int
+main (int argc, char *argv[]) {
+ int c;
+ int all = 0;
+ char *types = NULL, *test_opts = NULL, *p;
+ int result = 0;
+
+ sanitize_env();
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
+ progname = argv[0];
+ if ((p = strrchr(progname, '/')) != NULL)
+ progname = p+1;
+
+ umask(022);
+
+ while ((c = getopt_long (argc, argv, "adfhlnrit:O:vV",
+ longopts, NULL)) != -1)
+ switch (c) {
+ case 'a': /* umount everything */
+ ++all;
+ break;
+ /* fall through? */
+ case 'd': /* do losetup -d for unmounted loop devices */
+ ++delloop;
+ break;
+ case 'f': /* force umount */
+ ++force;
+ break;
+ case 'h': /* help */
+ usage (stdout, 0);
+ break;
+ case 'l': /* lazy umount */
+ ++lazy;
+ break;
+ case 'n': /* do not write in /etc/mtab */
+ ++nomtab;
+ break;
+ case 'O': /* specify file system options */
+ test_opts = optarg;
+ break;
+ case 'r': /* remount read-only if umount fails */
+ ++remount;
+ break;
+ case 'v': /* make noise */
+ ++verbose;
+ break;
+ case 'V': /* version */
+ printf ("umount (%s)\n", PACKAGE_STRING);
+ exit (0);
+ case 't': /* specify file system type */
+ types = optarg;
+ break;
+ case 'i':
+ external_allowed = 0;
+ break;
+ case 0:
+ break;
+ case '?':
+ default:
+ usage (stderr, 1);
+ }
+
+ {
+ const uid_t ruid = getuid();
+ const uid_t euid = geteuid();
+
+ /* if we're really root and aren't running setuid */
+ if (((uid_t)0 == ruid) && (ruid == euid)) {
+ restricted = 0;
+ }
+ }
+
+ if (restricted && (all || types || nomtab || force || remount)) {
+ die (2, _("umount: only root can do that"));
+ }
+
+ argc -= optind;
+ argv += optind;
+
+ atexit(unlock_mtab);
+
+ if (all) {
+ /* nodev stuff: sysfs, usbfs, oprofilefs, ... */
+ if (types == NULL)
+ types = "noproc,nodevfs,nodevpts,nosysfs,norpc_pipefs,nonfsd";
+ result = umount_all (types, test_opts);
+ } else if (argc < 1) {
+ usage (stderr, 2);
+ } else while (argc--) {
+ result += umount_file(*argv++);
+ }
+ exit (result); /* nonzero on at least one failure */
+}
diff --git a/mount/xmalloc.c b/mount/xmalloc.c
new file mode 100644
index 0000000..3fd09fd
--- /dev/null
+++ b/mount/xmalloc.c
@@ -0,0 +1,48 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h> /* strdup() */
+#include "xmalloc.h"
+#include "nls.h" /* _() */
+#include "sundries.h" /* EX_SYSERR */
+
+static void
+die_if_null(void *t) {
+ if (t == NULL)
+ die(EX_SYSERR, _("not enough memory"));
+}
+
+void *
+xmalloc (size_t size) {
+ void *t;
+
+ if (size == 0)
+ return NULL;
+
+ t = malloc(size);
+ die_if_null(t);
+
+ return t;
+}
+
+void *
+xrealloc (void *p, size_t size) {
+ void *t;
+
+ t = realloc(p, size);
+ die_if_null(t);
+
+ return t;
+}
+
+char *
+xstrdup (const char *s) {
+ char *t;
+
+ if (s == NULL)
+ return NULL;
+
+ t = strdup(s);
+ die_if_null(t);
+
+ return t;
+}
diff --git a/mount/xmalloc.h b/mount/xmalloc.h
new file mode 100644
index 0000000..2fc0a7e
--- /dev/null
+++ b/mount/xmalloc.h
@@ -0,0 +1,14 @@
+#ifndef MOUNT_XMALLOC_H
+#define MOUNT_XMALLOC_H
+
+extern void *xmalloc(size_t size);
+extern void *xrealloc(void *p, size_t size);
+extern char *xstrdup(const char *s);
+
+/*
+ * free(p); when 'p' is 'const char *' makes gcc unhappy:
+ * warning: passing argument 1 of ‘free’ discards qualifiers from pointer target type
+ */
+#define my_free(_p) free((void *) _p)
+
+#endif /* MOUNT_XMALLOC_H */