mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-27 09:38:24 +00:00
[shell] Fix compiling issue when DFS is not enable
This commit is contained in:
@@ -70,10 +70,11 @@ const char* finsh_get_prompt()
|
||||
#endif
|
||||
strcpy(finsh_prompt, _PROMPT);
|
||||
|
||||
#ifdef DFS_USING_WORKDIR
|
||||
#if defined(RT_USING_DFS) && defined(DFS_USING_WORKDIR)
|
||||
/* get current working directory */
|
||||
getcwd(&finsh_prompt[rt_strlen(finsh_prompt)], RT_CONSOLEBUF_SIZE - rt_strlen(finsh_prompt));
|
||||
#endif
|
||||
|
||||
strcat(finsh_prompt, ">");
|
||||
|
||||
return finsh_prompt;
|
||||
@@ -307,7 +308,7 @@ void finsh_thread_entry(void* parameter)
|
||||
shell->device = rt_console_get_device();
|
||||
RT_ASSERT(shell->device);
|
||||
rt_device_set_rx_indicate(shell->device, finsh_rx_ind);
|
||||
rt_device_open(shell->device, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_INT_RX);
|
||||
rt_device_open(shell->device, (RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_STREAM | RT_DEVICE_FLAG_INT_RX));
|
||||
#else
|
||||
RT_ASSERT(shell->device);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user