check whether a file of the given path exits */
| 356 | #include <lwp.h> |
| 357 | /* check whether a file of the given path exits */ |
| 358 | static rt_bool_t _msh_lwp_cmd_exists(const char *path) |
| 359 | { |
| 360 | int fd = -1; |
| 361 | fd = open(path, O_RDONLY, 0); |
| 362 | if (fd < 0) |
| 363 | { |
| 364 | return RT_FALSE; |
| 365 | } |
| 366 | close(fd); |
| 367 | return RT_TRUE; |
| 368 | } |
| 369 | |
| 370 | /* |
| 371 | * search for the file named "pg_name" or "pg_name.elf" at the given directory, |
no test coverage detected