sbin_PROGRAMS = fsck
dist_man_MANS = fsck.8
-fsck_SOURCES = base_device.c fsck.c fsck.h ../lib/ismounted.c
+fsck_SOURCES = base_device.c fsck.c fsck.h ../lib/ismounted.c \
+ ../lib/fsprobe.c ../lib/canonicalize.c
fsck_LDADD =
fsck_CFLAGS =
if HAVE_BLKID
+if BUILD_LIBBLKID
+fsck_LDADD += $(ul_libblkid_la)
+fsck_CFLAGS += -I$(ul_libblkid_srcdir)
+else
fsck_LDADD += $(BLKID_LIBS)
fsck_CFLAGS += $(BLKID_CFLAGS)
endif
+endif
+
+if HAVE_VOLUME_ID
+fsck_LDADD += $(VOLUME_ID_LIBS)
+fsck_CFLAGS += $(VOLUME_ID_CFLAGS)
+endif
#include <malloc.h>
#include <signal.h>
-#include <blkid.h>
+#include "fsprobe.h"
#include "nls.h"
#include "pathnames.h"
struct fsck_instance *instance_list;
const char *fsck_prefix_path = "/sbin:/sbin/fs.d:/sbin/fs:/etc/fs:/etc";
char *fsck_path = 0;
-blkid_cache cache = NULL;
static char *string_copy(const char *s)
{
parse_escape(freq);
parse_escape(passno);
- dev = blkid_get_devname(cache, device, NULL);
+ dev = fsprobe_get_devname_by_spec(device);
if (dev)
device = dev;
if (strcmp(fs->type, "auto") != 0)
return;
- t = blkid_get_tag_value(cache, "TYPE", fs->device);
+ t = fsprobe_get_fstype_by_devname(fs->device);
if (t) {
free(fs->type);
fs->type = t;
progname);
exit(EXIT_ERROR);
}
- dev = blkid_get_devname(cache, arg, NULL);
+ dev = fsprobe_get_devname_by_spec(arg);
if (!dev && strchr(arg, '=')) {
/*
* Check to see if we failed because
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
- blkid_get_cache(&cache, NULL);
+ fsprobe_init();
PRS(argc, argv);
if (!notitle)
}
status |= wait_many(FLAG_WAIT_ALL);
free(fsck_path);
- blkid_put_cache(cache);
+ fsprobe_exit();
return status;
}