From 828a125aedb30467f998e46fc1aa051e2123eb93 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Tue, 27 Jan 2004 12:42:45 +0000 Subject: [PATCH] Have to move attr/flags init before switch, otherwise they won't work! git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@758 6ac86273-5f31-0410-b378-82cca8765d1b --- kernel/ioctl.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/kernel/ioctl.c b/kernel/ioctl.c index 7c6324a..07bc9da 100644 --- a/kernel/ioctl.c +++ b/kernel/ioctl.c @@ -79,16 +79,18 @@ COUNT DosDevIOctl(lregs * r) case 0x0a: case 0x0c: case 0x10: + { + unsigned attr, flags; /* Get the SFT block that contains the SFT */ if ((s = get_sft(r->BX)) == (sft FAR *) - 1) return DE_INVLDHNDL; - + + attr = s->sft_dev->dh_attr; + flags = s->sft_flags; + switch (r->AL) { - unsigned attr = s->sft_dev->dh_attr; - unsigned flags = s->sft_flags; - case 0x00: /* Get the flags from the SFT */ if (flags & SFT_FDEVICE) @@ -183,6 +185,7 @@ COUNT DosDevIOctl(lregs * r) return DE_INVLDFUNC; } break; + } case 0x04: case 0x05: