0

I'm trying to add two integers to the Minix proc data structure in /usr/src/kernel/proc.h. The documentation says you must add entries to sconst.h as well to accommodate this, but I cannot figure out how to update sconst.h. Adding the two ints compiles fine, but then utilities like ps break because sconst.h isn't updated.

What should be added to sconst.h to support two new fields and not break compatibility?

Thanks!

calmond
  • 189
  • 7
  • 1
    Which Minix version are you modifying? Minix 2 or Minix 3? – fuz Mar 07 '18 at 16:00
  • I'm working with version 3.1.7. – calmond Mar 07 '18 at 16:54
  • You'd have to recompile any user-space code (like `ps` apparently) as well as changing headers. Does `sconst.h` have some constants that describe the struct layout, so `ps` can find its way around kernel data structures? – Peter Cordes Mar 08 '18 at 06:17
  • All of those utilities get recompiled when you do a make clean install on the kernel. I've manually re-compiled ps as well. – calmond Mar 08 '18 at 13:03
  • Here's the file: https://github.com/Stichting-MINIX-Research-Foundation/minix/blob/R3.1.7/kernel/arch/i386/sconst.h – calmond Mar 08 '18 at 13:03
  • In fact, in 3.1.7, only some members from `struct proc` are listed in `sconst.h`. So provided that the integers you are adding are **after** the last mentioned member (`p_misc_flags`), you should be able to freely add them. Are you sure you recompiled everything (including all the libraries)? – AntoineL Mar 12 '18 at 14:43

0 Answers0