Permalink
Browse files

build-sys: remove deprecated-mount/

Signed-off-by: Karel Zak <kzak@redhat.com>
  • Loading branch information...
1 parent 4a44a54 commit 65acdc8734535b7ad59363bfd4d54542c8451f23 @karelzak committed Mar 5, 2014
View
@@ -83,7 +83,6 @@ include schedutils/Makemodule.am
include text-utils/Makemodule.am
include term-utils/Makemodule.am
include login-utils/Makemodule.am
-include mount-deprecated/Makemodule.am
include sys-utils/Makemodule.am
include misc-utils/Makemodule.am
include disk-utils/Makemodule.am
View
@@ -791,23 +791,12 @@ UL_REQUIRES_BUILD([fdisk], [libfdisk])
AM_CONDITIONAL([BUILD_FDISK], [test "x$build_fdisk" = xyes])
-AC_ARG_ENABLE([deprecated-mount],
- AS_HELP_STRING([--enable-deprecated-mount], [build old mount utilities]),
- [], [enable_deprecated_mount=no]
-)
-UL_BUILD_INIT([deprecated_mount])
-UL_REQUIRES_LINUX([deprecated_mount])
-UL_REQUIRES_BUILD([deprecated_mount], [libblkid])
-AM_CONDITIONAL([BUILD_DEPRECATED_MOUNT], [test "x$build_deprecated_mount" = xyes])
-
-
AC_ARG_ENABLE([mount],
AS_HELP_STRING([--disable-mount], [do not build mount(8) and umount(8)]),
[], [enable_mount=check]
)
UL_BUILD_INIT([mount])
UL_REQUIRES_BUILD([mount], [libmount])
-UL_CONFLICTS_BUILD([mount], [deprecated_mount], [old deprecated mount version])
AM_CONDITIONAL([BUILD_MOUNT], [test "x$build_mount" = xyes])
@@ -1,70 +0,0 @@
-if BUILD_DEPRECATED_MOUNT
-
-mount_common_sources = \
- mount-deprecated/sundries.c \
- mount-deprecated/sundries.h \
- mount-deprecated/fstab.h \
- mount-deprecated/mount_mntent.h \
- mount-deprecated/mount_constants.h \
- mount-deprecated/getusername.h \
- mount-deprecated/fsprobe.h \
- mount-deprecated/devname.c \
- mount-deprecated/devname.h \
- mount-deprecated/fstab.c \
- mount-deprecated/getusername.c \
- mount-deprecated/mount_mntent.c \
- mount-deprecated/fsprobe.c
-
-#
-# mount
-#
-bin_PROGRAMS += mount
-dist_man_MANS += mount-deprecated/mount.8
-mount_SOURCES = mount-deprecated/mount.c $(mount_common_sources)
-mount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -I$(ul_libblkid_incdir)
-mount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
-mount_LDADD = $(LDADD) libblkid.la libcommon.la
-
-if HAVE_SELINUX
-mount_LDADD += $(SELINUX_LIBS)
-endif
-
-if HAVE_STATIC_MOUNT
-bin_PROGRAMS += mount.static
-mount_static_SOURCES = $(mount_SOURCES)
-mount_static_CFLAGS = $(mount_CFLAGS)
-mount_static_LDFLAGS = -all-static
-mount_static_LDADD = $(LDADD) libblkid.la libcommon.la
-if HAVE_SELINUX
-mount_static_LDADD += $(SELINUX_LIBS_STATIC)
-endif
-endif # HAVE_STATIC_MOUNT
-
-#
-# umount
-#
-bin_PROGRAMS += umount
-dist_man_MANS += mount-deprecated/umount.8
-umount_SOURCES = mount-deprecated/umount.c $(mount_common_sources)
-umount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) -I$(ul_libblkid_incdir)
-umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
-umount_LDADD = $(LDADD) libblkid.la libcommon.la
-
-if HAVE_STATIC_UMOUNT
-bin_PROGRAMS += umount.static
-umount_static_SOURCES = $(umount_SOURCES)
-umount_static_CFLAGS = $(umount_CFLAGS)
-umount_static_LDFLAGS = -all-static
-umount_static_LDADD = $(LDADD) libblkid.la libcommon.la
-endif
-
-
-if MAKEINSTALL_DO_SETUID
-install-exec-hook-mount:
- chmod 4755 $(DESTDIR)$(bindir)/mount
- chmod 4755 $(DESTDIR)$(bindir)/umount
-
-INSTALL_EXEC_HOOKS += install-exec-hook-mount
-endif
-
-endif # BUILD_DEPRECATED_MOUNT
View
@@ -1,14 +0,0 @@
-#include "fsprobe.h"
-
-#include "devname.h"
-#include "sundries.h" /* for xstrdup */
-
-const char *
-spec_to_devname(const char *spec)
-{
- if (!spec)
- return NULL;
- if (nocanonicalize || is_pseudo_fs(spec))
- return xstrdup(spec);
- return fsprobe_get_devname_by_spec(spec);
-}
@@ -1,6 +0,0 @@
-#ifndef MOUNT_DEVNAME_H
-#define MOUNT_DEVNAME_H
-
-extern const char *spec_to_devname(const char *spec);
-
-#endif
View
@@ -1,141 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <stdlib.h>
-
-#include <blkid.h>
-
-#include "blkdev.h"
-#include "canonicalize.h"
-#include "pathnames.h"
-#include "fsprobe.h"
-
-/*
- * THIS IS DEPRECATED -- use blkid_evaluate_* API rather than this extra layer
- */
-
-
-static blkid_cache blcache;
-static blkid_probe blprobe;
-
-void
-fsprobe_init(void)
-{
- blcache = NULL;
- blprobe = NULL;
-}
-
-void
-fsprobe_exit(void)
-{
- if (blprobe)
- blkid_free_probe(blprobe);
- if (blcache)
- blkid_put_cache(blcache);
-}
-
-/*
- * Parses NAME=value, returns -1 on parse error, 0 success. The success is also
- * when the 'spec' doesn't contain name=value pair (because the spec could be
- * a devname too). In particular case the pointer 'name' is set to NULL.
- */
-int
-fsprobe_parse_spec(const char *spec, char **name, char **value)
-{
- *name = NULL;
- *value = NULL;
-
- if (strchr(spec, '='))
- return blkid_parse_tag_string(spec, name, value);
-
- return 0;
-}
-
-char *
-fsprobe_get_devname_by_spec(const char *spec)
-{
- return blkid_evaluate_spec(spec, &blcache);
-}
-
-int
-fsprobe_known_fstype(const char *fstype)
-{
- return blkid_known_fstype(fstype);
-}
-
-
-/* returns device LABEL, UUID, FSTYPE, ... by low-level
- * probing interface
- */
-static char *
-fsprobe_get_value(const char *name, const char *devname, int *ambi)
-{
- int fd, rc;
- const char *data = NULL;
-
- if (!devname || !name)
- return NULL;
- fd = open(devname, O_RDONLY);
- if (fd < 0)
- return NULL;
- if (!blprobe)
- blprobe = blkid_new_probe();
- if (!blprobe)
- goto done;
- if (blkid_probe_set_device(blprobe, fd, 0, 0))
- goto done;
-
- blkid_probe_enable_superblocks(blprobe, 1);
-
- blkid_probe_set_superblocks_flags(blprobe,
- BLKID_SUBLKS_LABEL | BLKID_SUBLKS_UUID | BLKID_SUBLKS_TYPE);
-
- rc = blkid_do_safeprobe(blprobe);
- if (ambi)
- *ambi = rc == -2 ? 1 : 0; /* ambivalent probing result */
- if (!rc)
- blkid_probe_lookup_value(blprobe, name, &data, NULL);
-done:
- close(fd);
- return data ? strdup((char *) data) : NULL;
-}
-
-char *
-fsprobe_get_label_by_devname(const char *devname)
-{
- return fsprobe_get_value("LABEL", devname, NULL);
-}
-
-char *
-fsprobe_get_uuid_by_devname(const char *devname)
-{
- return fsprobe_get_value("UUID", devname, NULL);
-}
-
-char *
-fsprobe_get_fstype_by_devname(const char *devname)
-{
- return fsprobe_get_value("TYPE", devname, NULL);
-}
-
-char *
-fsprobe_get_fstype_by_devname_ambi(const char *devname, int *ambi)
-{
- return fsprobe_get_value("TYPE", devname, ambi);
-}
-
-char *
-fsprobe_get_devname_by_uuid(const char *uuid)
-{
- return blkid_evaluate_tag("UUID", uuid, &blcache);
-}
-
-char *
-fsprobe_get_devname_by_label(const char *label)
-{
- return blkid_evaluate_tag("LABEL", label, &blcache);
-}
View
@@ -1,27 +0,0 @@
-#ifndef FSPROBE_H
-#define FSPROBE_H
-/*
- * THIS IS DEPRECATED -- use blkid_evaluate_* API rather than this extra layer
- *
- * This is the generic interface for filesystem guessing libraries.
- * Implementations are provided by
- */
-extern void fsprobe_init(void);
-extern void fsprobe_exit(void);
-
-extern int fsprobe_parse_spec(const char *spec, char **name, char **value);
-
-/* all routines return newly allocated string */
-extern char *fsprobe_get_devname_by_uuid(const char *uuid);
-extern char *fsprobe_get_devname_by_label(const char *label);
-extern char *fsprobe_get_devname_by_spec(const char *spec);
-
-extern char *fsprobe_get_label_by_devname(const char *devname);
-extern char *fsprobe_get_uuid_by_devname(const char *devname);
-extern char *fsprobe_get_fstype_by_devname(const char *devname);
-extern char *fsprobe_get_fstype_by_devname_ambi(const char *devname, int *ambi);
-
-
-extern int fsprobe_known_fstype(const char *fstype);
-
-#endif /* FSPROBE_H */
Oops, something went wrong.

0 comments on commit 65acdc8

Please sign in to comment.