diff options
| author | zy <[email protected]> | 2023-12-05 04:40:21 -0500 |
|---|---|---|
| committer | zy <[email protected]> | 2023-12-05 04:40:21 -0500 |
| commit | 2050806cafb56930a2b2dd3b5dfeb2ee0ede2cd6 (patch) | |
| tree | 25468b131d2d59559349f97b4bb15494f010f882 /source/ucli/ucli-lib.cc | |
| parent | 067687b99770b496c85ea5da3d7d922fbf458118 (diff) | |
DEVICE_BAK "/host/dev/variable_monitor"
Diffstat (limited to 'source/ucli/ucli-lib.cc')
| -rw-r--r-- | source/ucli/ucli-lib.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/ucli/ucli-lib.cc b/source/ucli/ucli-lib.cc index 3536d1e..a329744 100644 --- a/source/ucli/ucli-lib.cc +++ b/source/ucli/ucli-lib.cc @@ -72,7 +72,11 @@ long diag_call_ioctl(unsigned long request, unsigned long arg) { fd = open(DEVICE, O_RDWR, 0); if (fd < 0) { printf("open %s error!\n", DEVICE); - return -EEXIST; + fd = open(DEVICE_BAK, O_RDWR, 0); + if (fd < 0){ + printf("open %s error!\n", DEVICE_BAK); + return EEXIST; + } } ret = ioctl(fd, request, arg); |
