0

I'm having some trouble opening and writing an existing file with a syscall. The syscall is set up correctly. The syscall itself takes in a file name as a char* but I keep getting errors

linux-2.6.22.19/mycall/mycall.c:24: undefined reference to `open'
linux-2.6.22.19/mycall/mycall.c:25: undefined reference to `write'
linux-2.6.22.19/mycall/mycall.c:26: undefined reference to `close'

What is the proper way to open and write to a file directly from a syscall if I am unable to use open, write, and close?

SPYBUG96
  • 1,089
  • 5
  • 20
  • 38
  • See also: https://stackoverflow.com/questions/275386/file-i-o-in-a-linux-kernel-module – John Zwinck Aug 03 '19 at 07:42
  • @JohnZwinck, I should clarify from the other "answer" I am in this category _"If this is a private module (like for some custom hardware and the module won't be distributed) then you can do this"_ – SPYBUG96 Aug 03 '19 at 07:53

0 Answers0