Find the answer to your Linux question:
Results 1 to 5 of 5
Hello, I am currently working on a project in which I have to add my own system that does the same thing as gettimeofday() but ignores the timezone parameter and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2011
    Posts
    4

    Mandrake 7.0 (kernel 2.2.14) - Issues with adding a System Call stub


    Hello,

    I am currently working on a project in which I have to add my own system that does the same thing as gettimeofday() but ignores the timezone parameter and takes a flag parameter to determine whether output should be sent to the console. My issue is that I do not know how to make the stub (i.e. _syscalln(parameters)) work. I have googled around and cannot find enough information to know where to put this macro definition.

    I have the syscall table entry and the NR definition correct as I can call the method using the syscall(191, flag, &tv) system call.

    Is there anyone that can direct me to the right spot to get the stub working?

    Thanks.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,454
    Why this antique distribution? The 2.2 kernel has been out of date for well over 10 years. It is unlikely that you will find much on the net about this ancient kernel. It would be better to get a more current distribution, running a 2.6 kernel, which you can find plenty of documentation for on the net.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Nov 2011
    Posts
    4
    Yeah, I would much rather do that; however, this is for an assignment and I was given a VM and environment to work with specifically.

    I am having lots of trouble with the archaic setup.

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,454
    Well, do you have the rest of the source code for this kernel? If so, look at some of the other system calls to see how they do it.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,454
    Also, complain to your professor that what you will learn here is not likely to be much help when you get a job working on modern kernels...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •