| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" | 5 #include "sandbox/linux/seccomp-bpf/die.h" |
| 6 #include "sandbox/linux/seccomp-bpf/errorcode.h" |
| 6 | 7 |
| 7 | 8 |
| 8 namespace playground2 { | 9 namespace playground2 { |
| 9 | 10 |
| 10 ErrorCode::ErrorCode(int err) { | 11 ErrorCode::ErrorCode(int err) { |
| 11 switch (err) { | 12 switch (err) { |
| 12 case ERR_ALLOWED: | 13 case ERR_ALLOWED: |
| 13 err_ = SECCOMP_RET_ALLOW; | 14 err_ = SECCOMP_RET_ALLOW; |
| 14 error_type_ = ET_SIMPLE; | 15 error_type_ = ET_SIMPLE; |
| 15 break; | 16 break; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 } else { | 97 } else { |
| 97 return false; | 98 return false; |
| 98 } | 99 } |
| 99 } else { | 100 } else { |
| 100 SANDBOX_DIE("Corrupted ErrorCode"); | 101 SANDBOX_DIE("Corrupted ErrorCode"); |
| 101 } | 102 } |
| 102 } | 103 } |
| 103 } | 104 } |
| 104 | 105 |
| 105 } // namespace | 106 } // namespace |
| OLD | NEW |