From 32e9ad305fdfcfbea01e2d95f2b1db0cb7e728bc Mon Sep 17 00:00:00 2001 From: hpa Date: Fri, 30 Jun 2000 07:44:26 +0000 Subject: [PATCH] Fix running as a normal user (incorrect handling of "offset") --- syslinux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/syslinux.c b/syslinux.c index f095f8f2..fb82fc5 100644 --- a/syslinux.c +++ b/syslinux.c @@ -282,7 +282,8 @@ int main(int argc, char *argv[]) !hasmntopt(mnt, "ro") && mnt->mnt_dir[0] == '/' && !!hasmntopt(mnt, "loop") == !!S_ISREG(st.st_mode) && - atol(hasmntopt(mnt, "offset")) == offset) { + ( (!hasmntopt(mnt,"offset") && offset == 0) || + (atol(hasmntopt(mnt, "offset")) == offset) ) ) { /* Okay, this is an fstab entry we should be able to live with. */ mntpath = mnt->mnt_dir; -- 2.7.4