md_func.c
来自「阿基米德操作系统的源代码」· C语言 代码 · 共 50 行
C
50 行
//////////////////////////////////////////////////////////////////////////
#include "general.h"
#include "s_isdirreg.h"
#include "the_syscalls.h"
#include "shell_head.h"
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////
int MD_Func(void)
{
int temp_index;
char * temp_pChar;
int temp_Ret;
if ((command_params == 0) || (command_params > 1))
{
the_screen_call18("\n\r MD bad parameters!");
return -1;
}
temp_index = command_index + 1;
while (command_buf[temp_index])
{
if ((command_buf[temp_index] == '/') ||
(command_buf[temp_index] == ':') ||
(command_buf[temp_index] == '|') ||
(command_buf[temp_index] == '*') ||
(command_buf[temp_index] == '?'))
{
the_screen_call18("\n\r MD bad parameters!");
return -1;
}
temp_index++;
}
temp_pChar = command_buf + command_index + 1;
temp_Ret = the_file_mkdir(temp_pChar);
if (temp_Ret != 0)
{
the_screen_call18("\n\r MD bad parameters!");
return -1;
}
return 0;
}
///////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?