diff options
| author | Ron Yorston <rmy@pobox.com> | 2020-02-16 09:48:48 +0000 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2020-02-16 09:48:48 +0000 |
| commit | 8d443464257edcd04c8fa8d5a6f130b70535e115 (patch) | |
| tree | 3fef845c2c39a43ce13ff973755507ad3bd4d463 /include | |
| parent | 800dbf203d5af67b9a115a4b6f1f84ca448bc755 (diff) | |
| download | busybox-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.h | 2 |
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); | |||
| 405 | int link(const char *oldpath, const char *newpath); | 405 | int link(const char *oldpath, const char *newpath); |
| 406 | NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM); | 406 | NOIMPL(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 */ |
| 408 | enum {DEV_NULL, DEV_ZERO, DEV_URANDOM, NOT_DEVICE}; | 408 | enum {DEV_NULL, DEV_ZERO, DEV_URANDOM, NOT_DEVICE = -1}; |
| 409 | int get_dev_type(const char *filename); | 409 | int get_dev_type(const char *filename); |
| 410 | void update_dev_fd(int dev, int fd); | 410 | void update_dev_fd(int dev, int fd); |
| 411 | int mingw_open (const char *filename, int oflags, ...); | 411 | int mingw_open (const char *filename, int oflags, ...); |
