]> git.wh0rd.org Git - home.git/commitdiff
check-services: handle paths w/spaces
authorMike Frysinger <vapier@gentoo.org>
Sun, 13 Mar 2016 23:25:53 +0000 (19:25 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sun, 13 Mar 2016 23:25:53 +0000 (19:25 -0400)
.bin/gentoo-check-services

index bff7b3339ae2dc28a571c592aad0dee0fa3eedcd..54790aff83d38e8ac63ab06daaa51fb6f0a5e53b 100755 (executable)
@@ -39,7 +39,9 @@ def find_svcs():
                        if not line.endswith(' (deleted)\n'):
                                continue
                        # b71c7000-b7307000 rw-s 00000000 00:04 17024337   /dev/zero (deleted)
-                       addr, perm, offset, dev, inode, path, _ = line.split()
+                       addr, perm, offset, dev, inode, path = line.split(' ', 5)
+                       # Handle paths with spaces.
+                       path = path.rsplit(' ', 2)[0]
                        if (path == '/[aio]' or
                            path.startswith('/SYSV') or
                            path.startswith('/dev/shm/')):