> On Feb. 25, 2015, 2:48 p.m., Dominic Hamon wrote: > > src/linux/fs.cpp, line 162 > > <https://reviews.apache.org/r/31443/diff/1/?file=876476#file876476line162> > > > > maybe pull these out into variables for better readability. > > > > const char* source_str = source.isSome() ? source.get().c_str() : > > NULL; > > const char* type_str = type.isSome() ? type.get().c_str() : NULL; > > > > if (::mount(source_str, target.c_str, type_str, flags, data) < 0) { > > ... > > > > > > also, does it make sense for type to be non-null if source is null? and > > vice versa?
Sure, you can leave the type as null if you're bind mounting (it'll inherit the source's type), and you can leave the source null if you're modifying an existing mount. - Ian ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/31443/#review74116 ----------------------------------------------------------- On Feb. 25, 2015, 2:31 p.m., Ian Downes wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/31443/ > ----------------------------------------------------------- > > (Updated Feb. 25, 2015, 2:31 p.m.) > > > Review request for mesos, Dominic Hamon and Jie Yu. > > > Repository: mesos > > > Description > ------- > > Accept dummy arguments for fs::mount(). > > > Diffs > ----- > > src/linux/fs.hpp ac8b5f416dae0a9388a3839b6f078abdcd42edae > src/linux/fs.cpp b01d14c3a1b296566b2b17a7f540097bd7cc53dd > > Diff: https://reviews.apache.org/r/31443/diff/ > > > Testing > ------- > > > Thanks, > > Ian Downes > >
