Explorar o código

Merge pull request #548 from GalaIO/master

[Kernel] change to open the console device and then set the console device.
Bernard Xiong %!s(int64=9) %!d(string=hai) anos
pai
achega
0da4930cc9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/kservice.c

+ 1 - 1
src/kservice.c

@@ -1073,8 +1073,8 @@ rt_device_t rt_console_set_device(const char *name)
         }
 
         /* set new console device */
+        rt_device_open(new, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_STREAM);
         _console_device = new;
-        rt_device_open(_console_device, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_STREAM);
     }
 
     return old;