|
From: | Antonio Diaz Diaz |
Subject: | Re: [Bug-ddrescue] [PATCH] Add device_id() for Cygwin |
Date: | Thu, 17 Dec 2015 20:48:10 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.8.1.4) Gecko/20070601 SeaMonkey/1.1.2 |
Hello Christian, Christian Franke wrote:
the attached patch adds device_id() for Cygwin. Tested with 32- and 64-bit Cygwin.Should be safe to include in 1.21 as no other platform is affected.
Thanks for the patch.The patch is mostly ok but, isn't there a safer way of implementing this for Cygwin? I don't like neither the use of an union nor the unverified access to the 'raw' member in the union ('data.raw[data.desc.VendorIdOffset]', for example). Most probably this will cause problems with '-fstrict-aliasing', or even an invalid memory access.
Best regards, Antonio.
[Prev in Thread] | Current Thread | [Next in Thread] |