From 51bee02fdfe33facc4f589f97532c09f1d51c0f8 Mon Sep 17 00:00:00 2001
From: Joshua Saxby <joshua.a.saxby@gmail.com>
Date: Sat, 30 Nov 2019 08:01:24 +0000
Subject: [PATCH] Revert "Rename fn_copy to command_copy following feedback"

This reverts commit 6cbf727986286820aaf0de7d3691a2ee4ab06cc0.
---
 userprog/process.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/userprog/process.c b/userprog/process.c
index 7aa1581..5cf724a 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 *command_copy;
+  char *fn_copy;
   tid_t tid;
 
   /* Make a copy of COMMAND.
      Otherwise there's a race between the caller and load(). */
-  command_copy = palloc_get_page (0);
-  if (command_copy == NULL)
+  fn_copy = palloc_get_page (0);
+  if (fn_copy == NULL)
     return TID_ERROR;
-  strlcpy (command_copy, command, PGSIZE);
+  strlcpy (fn_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, command_copy);
+  tid = thread_create (command, PRI_DEFAULT, start_process, fn_copy);
 
   if (tid == TID_ERROR)
-    palloc_free_page (command_copy);
+    palloc_free_page (fn_copy); 
   return tid;
 }
 
-- 
GitLab