Skip to contentSkip to conversation

vm86: Make it clear that the default return value is actually VM86_SIGNAL ... not just any old zero!

PATCH New Samuel Bronson 1 participant 1 message May 4, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vm86: Make it clear that the default return value is actually VM86_SIGNAL ... not just any old zero!

The magic 0 tripped me up in trying to extend the vm86(2) manpage to actually explain vm86()'s interface -- my greps for VM86_SIGNAL came up fruitless.

---
I'm not on the list, so please CC: me in any responses. Thanks! If anyone wants to take a look at the WIP manpage, see:

    http://repo.or.cz/w/man-pages/vm86.git?a=blob;f=man2/vm86.2;hb=HEAD
---
 arch/x86/kernel/vm86_32.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/vm86_32.c +2 -2
index d7ac84e..b8035a0 100644
@@ -318,9 +318,9 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk
 	}
 
 /*
- * Save old state, set default return value (%ax) to 0
+ * Save old state, set default return value (%ax) to 0 (VM86_SIGNAL)
  */
-	info->regs32->ax = 0;
+	info->regs32->ax = VM86_SIGNAL;
 	tsk->thread.saved_sp0 = tsk->thread.sp0;
 	tsk->thread.saved_fs = info->regs32->fs;
 	tsk->thread.saved_gs = get_user_gs(info->regs32);
Signature · 1 line
1.6.3.rc3.24.g6ffd5