Home | History | Annotate | Download | only in bpf_dsl
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef SANDBOX_LINUX_BPF_DSL_ERRORCODE_H__
      6 #define SANDBOX_LINUX_BPF_DSL_ERRORCODE_H__
      7 
      8 #include "base/macros.h"
      9 #include "sandbox/sandbox_export.h"
     10 
     11 namespace sandbox {
     12 namespace bpf_dsl {
     13 
     14 // TODO(mdempsky): Find a proper home for ERR_{MIN,MAX}_ERRNO and
     15 // remove this header.
     16 class SANDBOX_EXPORT ErrorCode {
     17  public:
     18   enum {
     19     ERR_MIN_ERRNO = 0,
     20 #if defined(__mips__)
     21     // MIPS only supports errno up to 1133
     22     ERR_MAX_ERRNO = 1133,
     23 #else
     24     // TODO(markus): Android only supports errno up to 255
     25     // (crbug.com/181647).
     26     ERR_MAX_ERRNO = 4095,
     27 #endif
     28   };
     29 
     30  private:
     31   DISALLOW_IMPLICIT_CONSTRUCTORS(ErrorCode);
     32 };
     33 
     34 }  // namespace bpf_dsl
     35 }  // namespace sandbox
     36 
     37 #endif  // SANDBOX_LINUX_BPF_DSL_ERRORCODE_H__
     38