[PATCH 4/6] added openconnect_strdup()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2014-08-26 at 16:00 +0200, Nikos Mavrogiannopoulos wrote:
> +		ret = -GetLastError();

Hm, that makes us return a value that isn't in the normal errno space,
doesn't it?

Admittedly, I don't think anyone ever actually *does* anything with the
return value from script_config_tun(), but still I think we should use
FormatMessage() to print the error correctly, and then return something
like -EIO rather than a Windows error code.


> -	if (ret == 0x2331) {
> -		/* This is what cmd.exe returns for unrecognised commands */

That made some sense...

>  	if (ret) {
> +		/* This is what cmd.exe returns for unrecognised commands */

... but this doesn't. For a start we're not using cmd.exe any more...
and you seem to be suggesting that *all* values other than -1 mean that
it was an unrecognised command :)

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse at intel.com                              Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5745 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20140915/ee956d0c/attachment.bin>


[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux