big problem with small code.
This works on x86:
Code: Select all
Procedure.i inotify_init()
!mov eax, 291
!xor ebx, ebx
!xor ecx, ecx
!xor edx, edx
!int byte 0x80
!test eax, eax
!js _inotify_init_error ;Jump short if sign (SF=1) (if <> 0 => error)
ProcedureReturn ; return value in EAX
!_inotify_init_error:
!mov [v_inotify_errno], eax
ProcedureReturn -1
EndProcedure
Code: Select all
Procedure.i inotify_init()
!mov rax, 253
!xor rbx, rbx
!xor rcx, rcx
!xor rdx, rdx
!int byte 0x80
!test rax, rax
!js _inotify_init_error ;Jump short if sign (SF=1) (if <> 0 => error)
ProcedureReturn ; return value in RAX
!_inotify_init_error:
!mov [v_inotify_errno], rax
ProcedureReturn -1
EndProcedure
The diifferent values for the same function (291 and 253) should be correct.
Any ideas?
Bernd
P.S.: I don't want to install libnotify, because this installs many things of X and I have only a small console only system.