Question: Hello.c is a user program source that makes a system call getHello to print Hello COP4610 when it executes in xv6 OS. Since the

Hello.c is a user program source that makes a system call get Hello to print Hello.c: int main() { char name [] = sysproc.c. int sys_getHello(void) { char *s; /* Write C statements below to properly correct the string

Hello.c is a user program source that makes a system call getHello to print "Hello COP4610" when it executes in xv6 OS. Since the char array name[] is initialized to "Hello CDA3100", the system call handler sys getHello(void) is required to correct "Hello CDA3100" which being passed as an argument to "Hello COP4610" as getHello syscall handler. Write sys_getHello(void) below. Hello.c: Hello.c: int main() { char name[] = "Hello CDA3100!"; } if (getHello(name) < 0) "); printf(1, "sys call getHello fails printf(1, "%s ", name); exit(); sysproc.c: int sys_getHello(void) { char *s; sysproc.c. int sys_getHello(void) { char *s; /* Write C statements below to properly correct the string "Hello CDA3100" to "Hello COP4610" */ // add your code below } // don't change the code below return 0;

Step by Step Solution

3.41 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The task at hand is to implement a system call sysgetHello in C that corrects the string Hello CDA31... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!