LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Understand Grub source code and modify it (https://www.linuxquestions.org/questions/linux-newbie-8/understand-grub-source-code-and-modify-it-638589/)

me_too 04-29-2008 02:55 AM

How to make alteration on GRUB source code
 
Q1. need to record which OS user select.
Q2. need to implement write function while current Grub have provided read function.
I guess maybe :
To meet Q1, the function
Builtins.c->root_func(char *arg, int flags) needs to be modified;
To meet Q2, I should add one unsighed long (*read_func)(char* buf,unsighed long len) member function in the Filesys.h->struct fsys_entry{} refering to the member function unsighed long (*read_func)(char* buf,unsighed long len)in the struct and implement it.

Though I had read the grub.info for times, I still feel these hints are not sufficient to guide me coding, to give a whole comprehension to the framework.
I am not sure what code and where is the exactly place should my attention be
paid to. for example : run_menu() function has 6 input parameters, how they are
prepaired , what they represent for, and what's the effect as it's the last statement in cmain()?
If only there were some guides.

Drone4four 04-29-2008 08:17 PM

Your two Qs are unclear to me. Why would you want to modify the source code exactly? What are you trying to do?


All times are GMT -5. The time now is 10:27 AM.