Re: [patch] fix nonsense errno code in os_linux.cpp
Christian Franke <[email protected]> Fri, 15 Apr 2016 07:46:58 +0200
| Newsgroups | gmane.linux.utilities.smartmontools |
|---|---|
| Message-ID | <[email protected]> |
Maciej Żenczykowski wrote: > I may be dreaming, but: > > While the kernel syscall ioctl returns an error, afaik the C library > ioctl returns -1 and places error in errno... > > Like all syscall C library wrappers. > > I imagine you are using the C library ioctl and not the kernel > interface directly, so I would imagine the code was correct (well it > would be more correct to compare to -1, and then look at errno). > > What am I missing? Kernel syscalls typically return some result >= 0 if OK or (-ERRNO) on error. Old os_linux.cpp code checks for (errno == -EINVAL) which is never true. Patch applied. Thanks, Christian ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z _______________________________________________ Smartmontools-support mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/smartmontools-support