mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Re: Review Request 49656: Added ability to stringify cgroups::devices::Entry::Selector::Type.
Date Tue, 05 Jul 2016 21:29:18 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49656/#review140876
-----------------------------------------------------------


Ship it!





src/linux/cgroups.cpp (lines 2425 - 2439)
<https://reviews.apache.org/r/49656/#comment206220>

    Since we're relying on the switch catching all cases (otherwise we should get a compiler
error), perhaps we should leverage UNREACHABLE here?
    
    ```
      switch (type) {
        case Entry::Selector::Type::ALL:       return stream << "a";
        case Entry::Selector::Type::BLOCK:     return stream << "b";
        case Entry::Selector::Type::CHARACTER: return stream << "c";
        // We omit the default case because we assume -Wswitch
        // will trigger a compile-time error if a case is missed.
      }
    
      UNREACHABLE();
    ```


- Benjamin Mahler


On July 5, 2016, 9:14 p.m., Kevin Klues wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49656/
> -----------------------------------------------------------
> 
> (Updated July 5, 2016, 9:14 p.m.)
> 
> 
> Review request for mesos and Benjamin Mahler.
> 
> 
> Bugs: MESOS-3368
>     https://issues.apache.org/jira/browse/MESOS-3368
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added ability to stringify cgroups::devices::Entry::Selector::Type.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 5f4010734ed9e3295dcc3a4390123e4f4ce99c16 
>   src/linux/cgroups.cpp 95ceb373ca4d961c402f9936f31cda1a25c60e87 
> 
> Diff: https://reviews.apache.org/r/49656/diff/
> 
> 
> Testing
> -------
> 
> make check (on linux)
> 
> 
> Thanks,
> 
> Kevin Klues
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message