Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ponieważ fseeko nie przyjmuje - przynajmniej w NetBSD - negatywnych offsetów
- # a setFilePos używa fseeko: https://github.com/nim-lang/Nim/blob/version-1-0/lib/system/io.nim#L571
- import streams
- proc c_lseek(f: FileHandle, offset: int64, whence: cint): cint {.
- importc: "lseek", header: "<unistd.h>", tags: [].}
- var offset: int64 = -2125381424
- var file = open("/dev/kmem")
- var fh = getFileHandle(file)
- discard c_lseek(fh, offset, 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement