2 * Copyright (C) 2012-2020 all contributors <cmogstored-public@yhbt.net>
3 * License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
5 #include "cmogstored.h"
8 machine valid_put_path;
9 main := "/dev"digit+ ('/'+) [^/] any+;
14 bool mog_valid_put_path(const char *buf, size_t len)
21 if (buf[len - 1] == '/')
30 return cs != valid_put_path_error;