From 6cbf727986286820aaf0de7d3691a2ee4ab06cc0 Mon Sep 17 00:00:00 2001 From: Joshua Saxby <joshua.a.saxby@gmail.com> Date: Fri, 29 Nov 2019 18:35:00 +0000 Subject: [PATCH] Rename fn_copy to command_copy following feedback --- userprog/process.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/userprog/process.c b/userprog/process.c index 5cf724a..7aa1581 100644 --- a/userprog/process.c +++ b/userprog/process.c @@ -28,15 +28,15 @@ static bool load (const char *cmdline, void (**eip) (void), void **esp); tid_t process_execute (const char *command) { - char *fn_copy; + char *command_copy; tid_t tid; /* Make a copy of COMMAND. Otherwise there's a race between the caller and load(). */ - fn_copy = palloc_get_page (0); - if (fn_copy == NULL) + command_copy = palloc_get_page (0); + if (command_copy == NULL) return TID_ERROR; - strlcpy (fn_copy, command, PGSIZE); + strlcpy (command_copy, command, PGSIZE); /* Create a new thread to execute COMMAND. */ /* @@ -46,10 +46,10 @@ process_execute (const char *command) * then loading will fail. * NOTE: remove this comment block when argument parsing is implemented. */ - tid = thread_create (command, PRI_DEFAULT, start_process, fn_copy); + tid = thread_create (command, PRI_DEFAULT, start_process, command_copy); if (tid == TID_ERROR) - palloc_free_page (fn_copy); + palloc_free_page (command_copy); return tid; } -- GitLab