dos: fix the soft-locking loop
authorH. Peter Anvin <hpa@zytor.com>
Wed, 11 Nov 2009 07:50:10 +0000 (23:50 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 11 Nov 2009 07:50:10 +0000 (23:50 -0800)
Code the soft-locking loop correctly.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
dos/syslinux.c

index 3179707..1cdf418 100644 (file)
@@ -437,7 +437,7 @@ void lock_device(int level)
     if (!hard_lock) {
        /* Assume hierarchial "soft" locking supported */
 
-       while ((lock_level >> 8) < level) {
+       while (lock_level < level) {
            int new_level = lock_level + 1;
            err = do_lock(new_level);
            if (err) {