Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of OmniWheels by
open_stub.c
00001 #include <stdbool.h> 00002 #include <sys/types.h> 00003 #include <sys/stat.h> 00004 #include <fcntl.h> 00005 #include <stdarg.h> 00006 00007 bool allow_open = true; 00008 int __real_open(const char *path, int flags, ...); 00009 int __wrap_open(const char *path, int flags, ...) 00010 { 00011 if (allow_open) { 00012 if (flags & O_CREAT) { 00013 va_list vl; 00014 va_start(vl,flags); 00015 mode_t mode = va_arg(vl, mode_t); 00016 va_end(vl); 00017 return __real_open(path, flags, mode); 00018 } else { 00019 return __real_open(path, flags); 00020 } 00021 } else { 00022 return -1; 00023 } 00024 }
Generated on Fri Jul 22 2022 04:53:58 by
1.7.2
