werror.h enriched with few more error code (DRSUAPI related)

Kamen Mazdrashki kamen.mazdrashki at postpath.com
Mon Sep 14 18:48:51 MDT 2009


Hi Andrew,

On Mon, Sep 14, 2009 at 22:54, Andrew Bartlett <abartlet at samba.org> wrote:
> So, I've talked to Jermey and Guenther about what would be required to 
> merge these changes.
> 
> In short, we need to first have a patch that first converts all the 
> existing incorrect error codes to the new correct names.  This patch 
> should not change the values, or the value formats.  But do add an 
> alias for WERR_OK to WERR_SUCCESS (as otherwise the patch will be too 
> large).
> 
> Then, once everything uses the new names, then provide a patch to use 
> the automated table, in decimal.  We can see that the change (perhaps 
> on sorted files) is additions only.  We can then write a quick C 
> program to dump the error table and the hex values, and again show 
> that the change is additions only.  Finally, we can import as hex 
> values (knowing that we only changed the script to print hex not decimal).
> 
> I know this is a *lot* of work, but otherwise the potential for errors 
> is too large to accept the patch.
> 
> GD also had a patch to do this once, and may have other hints or 
> things to consider.
> 

As we discussed with Anatoliy on the phone, here is an extended version 
of the python script.
Now it does extra verifications:
1. verify if there are errors defined with same name, but different value
  It turns out there is one such error: WERR_DOMAIN_CONTROLLER_NOT_FOUND
  I think it should be just fixed.
2. verify if there are errors that are defined using 'not numeric value', 
i.e. errors defined using another macro
  It turns out there are about 20 such an errors.
  I think we just have to replace used macro with real value.

Attached is the script, generated files and original werror.h and doserr.c 
files so everyone could play with script right away.

P.S. This message is reposted with smaller attachment so to be tracked 
by samba-technical.

BR,
Kamen Mazdrashki
kamen.mazdrashki at postpath.com
CISCO SYSTEMS BULGARIA EOOD
18 Macedonia Blvd. Sofia 1606
Bulgaria
http://www.cisco.com/global/BG/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: w32err.tar.bz2
Type: application/octet-stream
Size: 82279 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20090915/a74aece0/attachment.obj>


More information about the samba-technical mailing list