aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-02-16 09:48:48 +0000
committerRon Yorston <rmy@pobox.com>2020-02-16 09:48:48 +0000
commit8d443464257edcd04c8fa8d5a6f130b70535e115 (patch)
tree3fef845c2c39a43ce13ff973755507ad3bd4d463 /include
parent800dbf203d5af67b9a115a4b6f1f84ca448bc755 (diff)
downloadbusybox-w32-8d443464257edcd04c8fa8d5a6f130b70535e115.tar.gz
busybox-w32-8d443464257edcd04c8fa8d5a6f130b70535e115.tar.bz2
busybox-w32-8d443464257edcd04c8fa8d5a6f130b70535e115.zip
win32: tidy up detection of device files
Define NOT_DEVICE as -1 so the return value of index_in_strings() when no device name is matched is NOT_DEVICE. Make the logic in mingw_open() clearer.
Diffstat (limited to 'include')
-rw-r--r--include/mingw.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h
index 4aca7e884..3ab49a920 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -405,7 +405,7 @@ int kill(pid_t pid, int sig);
405int link(const char *oldpath, const char *newpath); 405int link(const char *oldpath, const char *newpath);
406NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM); 406NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM);
407/* order of devices must match that in get_dev_type */ 407/* order of devices must match that in get_dev_type */
408enum {DEV_NULL, DEV_ZERO, DEV_URANDOM, NOT_DEVICE}; 408enum {DEV_NULL, DEV_ZERO, DEV_URANDOM, NOT_DEVICE = -1};
409int get_dev_type(const char *filename); 409int get_dev_type(const char *filename);
410void update_dev_fd(int dev, int fd); 410void update_dev_fd(int dev, int fd);
411int mingw_open (const char *filename, int oflags, ...); 411int mingw_open (const char *filename, int oflags, ...);