mount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
mount_LDADD = $(ldadd_common)
-umount_SOURCES = umount.c $(srcs_mount)
+umount_SOURCES = umount.c $(srcs_mount) $(top_srcdir)/lib/strtosize.c
umount_CFLAGS = $(SUID_CFLAGS) $(cflags_common)
umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
umount_LDADD = $(ldadd_common)
#include "fstab.h"
#include "env.h"
#include "nls.h"
+#include "strtosize.h"
#if defined(MNT_FORCE)
/* Interesting ... it seems libc knows about MNT_FORCE and presumably
static int
is_valid_loop(struct mntentchn *mc, struct mntentchn *fs)
{
- unsigned long long offset = 0;
+ uintmax_t offset = 0;
char *p;
/* check if it begins with /dev/loop */
/* check for offset option in fstab */
p = get_value(fs->m.mnt_opts, "offset=");
- if (p)
- offset = strtoull(p, NULL, 10);
+ if (p && strtosize(p, &offset)) {
+ if (verbose > 1)
+ printf(_("failed to parse 'offset=%s' options\n"), p);
+ return 0;
+ }
/* check association */
if (loopfile_used_with((char *) mc->m.mnt_fsname,