commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 13/28: boot: Quote arguments containing spaces.


From: Samuel Thibault
Subject: [hurd] 13/28: boot: Quote arguments containing spaces.
Date: Wed, 16 Nov 2016 08:30:27 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 6511afff053bab1e7e0542119ff1331813ea19e2
Author: Justus Winter <address@hidden>
Date:   Tue Nov 1 13:29:19 2016 +0100

    boot: Quote arguments containing spaces.
    
    * boot/boot.c (boot_script_exec_cmd): Quote arguments containing
    spaces.
---
 boot/boot.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/boot/boot.c b/boot/boot.c
index dacf965..234ccd8 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -318,8 +318,13 @@ boot_script_exec_cmd (void *hook,
   write (2, path, strlen (path));
   for (i = 1; i < argc; ++i)
     {
+      int quote = !! index (argv[i], ' ') || !! index (argv[i], '\t');
       write (2, " ", 1);
+      if (quote)
+        write (2, "\"", 1);
       write (2, argv[i], strlen (argv[i]));
+      if (quote)
+        write (2, "\"", 1);
     }
   write (2, "\r\n", 2);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]