equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
59 else { |
59 else { |
60 if (root.equals(cgroupPath)) { |
60 if (root.equals(cgroupPath)) { |
61 path = mountPoint; |
61 path = mountPoint; |
62 } |
62 } |
63 else { |
63 else { |
64 if (root.indexOf(cgroupPath) == 0) { |
64 if (cgroupPath.startsWith(root)) { |
65 if (cgroupPath.length() > root.length()) { |
65 if (cgroupPath.length() > root.length()) { |
66 String cgroupSubstr = cgroupPath.substring(root.length()); |
66 String cgroupSubstr = cgroupPath.substring(root.length()); |
67 path = mountPoint + cgroupSubstr; |
67 path = mountPoint + cgroupSubstr; |
68 } |
68 } |
69 } |
69 } |