SITL: quieten MKFIFO warning in case of EEXIST
This commit is contained in:
parent
5e18f98b8e
commit
60453b2250
@ -19,6 +19,7 @@
|
||||
#if HAL_SIM_GPS_EXTERNAL_FIFO_ENABLED
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <AP_HAL_SITL/AP_HAL_SITL.h>
|
||||
extern const HAL_SITL& hal_sitl;
|
||||
#endif
|
||||
@ -45,7 +46,9 @@ GPS::GPS(uint8_t _instance) :
|
||||
AP_BoardConfig::allocation_error("gps_fifo filepath");
|
||||
}
|
||||
if (mkfifo(_gps_fifo, 0666) < 0) {
|
||||
printf("MKFIFO failed with %m\n");
|
||||
if (errno != EEXIST) {
|
||||
printf("MKFIFO failed with %m\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -42,6 +42,8 @@ namespace SITL {
|
||||
class GPS : public SerialDevice {
|
||||
public:
|
||||
|
||||
CLASS_NO_COPY(GPS);
|
||||
|
||||
enum Type {
|
||||
NONE = 0,
|
||||
UBLOX = 1,
|
||||
|
Loading…
Reference in New Issue
Block a user