agent: Sort PROPAGATION and OPTIONS alphabetically to scan easily

It's hard to visually scan over the list currently.
Therefore, we should sort the list alphabetically to scan easily.

Fixes: #1999

Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
This commit is contained in:
Manabu Sugimoto 2021-06-16 17:14:35 +09:00
parent e544779c61
commit bd27f7bab5

View File

@ -62,51 +62,51 @@ const PROC_SUPER_MAGIC: libc::c_uint = 0x00009fa0;
lazy_static! { lazy_static! {
static ref PROPAGATION: HashMap<&'static str, MsFlags> = { static ref PROPAGATION: HashMap<&'static str, MsFlags> = {
let mut m = HashMap::new(); let mut m = HashMap::new();
m.insert("shared", MsFlags::MS_SHARED);
m.insert("rshared", MsFlags::MS_SHARED | MsFlags::MS_REC);
m.insert("private", MsFlags::MS_PRIVATE); m.insert("private", MsFlags::MS_PRIVATE);
m.insert("rprivate", MsFlags::MS_PRIVATE | MsFlags::MS_REC); m.insert("rprivate", MsFlags::MS_PRIVATE | MsFlags::MS_REC);
m.insert("slave", MsFlags::MS_SLAVE); m.insert("rshared", MsFlags::MS_SHARED | MsFlags::MS_REC);
m.insert("rslave", MsFlags::MS_SLAVE | MsFlags::MS_REC); m.insert("rslave", MsFlags::MS_SLAVE | MsFlags::MS_REC);
m.insert("unbindable", MsFlags::MS_UNBINDABLE);
m.insert("runbindable", MsFlags::MS_UNBINDABLE | MsFlags::MS_REC); m.insert("runbindable", MsFlags::MS_UNBINDABLE | MsFlags::MS_REC);
m.insert("shared", MsFlags::MS_SHARED);
m.insert("slave", MsFlags::MS_SLAVE);
m.insert("unbindable", MsFlags::MS_UNBINDABLE);
m m
}; };
static ref OPTIONS: HashMap<&'static str, (bool, MsFlags)> = { static ref OPTIONS: HashMap<&'static str, (bool, MsFlags)> = {
let mut m = HashMap::new(); let mut m = HashMap::new();
m.insert("defaults", (false, MsFlags::empty())); m.insert("acl", (false, MsFlags::MS_POSIXACL));
m.insert("ro", (false, MsFlags::MS_RDONLY));
m.insert("rw", (true, MsFlags::MS_RDONLY));
m.insert("suid", (true, MsFlags::MS_NOSUID));
m.insert("nosuid", (false, MsFlags::MS_NOSUID));
m.insert("dev", (true, MsFlags::MS_NODEV));
m.insert("nodev", (false, MsFlags::MS_NODEV));
m.insert("exec", (true, MsFlags::MS_NOEXEC));
m.insert("noexec", (false, MsFlags::MS_NOEXEC));
m.insert("sync", (false, MsFlags::MS_SYNCHRONOUS));
m.insert("async", (true, MsFlags::MS_SYNCHRONOUS)); m.insert("async", (true, MsFlags::MS_SYNCHRONOUS));
m.insert("dirsync", (false, MsFlags::MS_DIRSYNC));
m.insert("remount", (false, MsFlags::MS_REMOUNT));
m.insert("mand", (false, MsFlags::MS_MANDLOCK));
m.insert("nomand", (true, MsFlags::MS_MANDLOCK));
m.insert("atime", (true, MsFlags::MS_NOATIME)); m.insert("atime", (true, MsFlags::MS_NOATIME));
m.insert("noatime", (false, MsFlags::MS_NOATIME));
m.insert("diratime", (true, MsFlags::MS_NODIRATIME));
m.insert("nodiratime", (false, MsFlags::MS_NODIRATIME));
m.insert("bind", (false, MsFlags::MS_BIND)); m.insert("bind", (false, MsFlags::MS_BIND));
m.insert("defaults", (false, MsFlags::empty()));
m.insert("dev", (true, MsFlags::MS_NODEV));
m.insert("diratime", (true, MsFlags::MS_NODIRATIME));
m.insert("dirsync", (false, MsFlags::MS_DIRSYNC));
m.insert("exec", (true, MsFlags::MS_NOEXEC));
m.insert("iversion", (false, MsFlags::MS_I_VERSION));
m.insert("lazytime", (false, MsFlags::MS_LAZYTIME));
m.insert("loud", (true, MsFlags::MS_SILENT));
m.insert("mand", (false, MsFlags::MS_MANDLOCK));
m.insert("noacl", (true, MsFlags::MS_POSIXACL));
m.insert("noatime", (false, MsFlags::MS_NOATIME));
m.insert("nodev", (false, MsFlags::MS_NODEV));
m.insert("nodiratime", (false, MsFlags::MS_NODIRATIME));
m.insert("noexec", (false, MsFlags::MS_NOEXEC));
m.insert("noiversion", (true, MsFlags::MS_I_VERSION));
m.insert("nolazytime", (true, MsFlags::MS_LAZYTIME));
m.insert("nomand", (true, MsFlags::MS_MANDLOCK));
m.insert("norelatime", (true, MsFlags::MS_RELATIME));
m.insert("nostrictatime", (true, MsFlags::MS_STRICTATIME));
m.insert("nosuid", (false, MsFlags::MS_NOSUID));
m.insert("rbind", (false, MsFlags::MS_BIND | MsFlags::MS_REC)); m.insert("rbind", (false, MsFlags::MS_BIND | MsFlags::MS_REC));
m.insert("relatime", (false, MsFlags::MS_RELATIME)); m.insert("relatime", (false, MsFlags::MS_RELATIME));
m.insert("norelatime", (true, MsFlags::MS_RELATIME)); m.insert("remount", (false, MsFlags::MS_REMOUNT));
m.insert("ro", (false, MsFlags::MS_RDONLY));
m.insert("rw", (true, MsFlags::MS_RDONLY));
m.insert("silent", (false, MsFlags::MS_SILENT)); m.insert("silent", (false, MsFlags::MS_SILENT));
m.insert("loud", (true, MsFlags::MS_SILENT));
m.insert("acl", (false, MsFlags::MS_POSIXACL));
m.insert("noacl", (true, MsFlags::MS_POSIXACL));
m.insert("iversion", (false, MsFlags::MS_I_VERSION));
m.insert("noiversion", (true, MsFlags::MS_I_VERSION));
m.insert("strictatime", (false, MsFlags::MS_STRICTATIME)); m.insert("strictatime", (false, MsFlags::MS_STRICTATIME));
m.insert("nostrictatime", (true, MsFlags::MS_STRICTATIME)); m.insert("suid", (true, MsFlags::MS_NOSUID));
m.insert("lazytime", (false, MsFlags::MS_LAZYTIME)); m.insert("sync", (false, MsFlags::MS_SYNCHRONOUS));
m.insert("nolazytime", (true, MsFlags::MS_LAZYTIME));
m m
}; };
} }