I've created a patch to fix bug 6254363 svccfg validate returns  
incorrect diagnostics. If the file can not be stat'd it will output  
the reason why. In the case of not giving enough information on xml  
parse errors I don't see a way to do this with the libxml stuff at  
the moment. The code current suppresses errors and warnings from  
libxml and I don't see any programatic interface to get these back.

So, I took the route mentioned in: http://www.opensolaris.org/jive/ 
thread.jspa?messageID=9200 and added an extra bit of output to point  
the user to xmllint to find the errors.

# svccfg
svc:> validate does_not_exist.xml
unable to open file: No such file or directory
svc:> validate test.xml
couldn't parse document; use 'xmllint --valid test.xml' to debug

The patch is available at:  http://dj2.textdriven.com/tmp/6254363.diff

My contributor number is OS0064


Reply via email to