aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhpa <hpa>2000-06-30 07:44:26 +0000
committerhpa <hpa>2000-06-30 07:44:26 +0000
commit32e9ad305fdfcfbea01e2d95f2b1db0cb7e728bc (patch)
tree268f1e20a224453af29c47c207f813dc681bf2f5
parent92056f7b3d31d8c00931182b2e95b3b4931ad3f8 (diff)
downloadsyslinux.git-32e9ad305fdfcfbea01e2d95f2b1db0cb7e728bc.tar.gz
syslinux.git-32e9ad305fdfcfbea01e2d95f2b1db0cb7e728bc.tar.xz
syslinux.git-32e9ad305fdfcfbea01e2d95f2b1db0cb7e728bc.zip
Fix running as a normal user (incorrect handling of "offset")
-rw-r--r--syslinux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/syslinux.c b/syslinux.c
index f095f8f2..fb82fc54 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;