From fd30f1512a713ae5b3cbacddfe9f29dfccc82047 Mon Sep 17 00:00:00 2001 From: "Andrew Gallant (Ocelot)" Date: Mon, 7 May 2012 01:00:45 -0400 Subject: added tests --- nexgb/auto_xselinux.go | 46 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) (limited to 'nexgb/auto_xselinux.go') diff --git a/nexgb/auto_xselinux.go b/nexgb/auto_xselinux.go index 57908c2..e3dfbf3 100644 --- a/nexgb/auto_xselinux.go +++ b/nexgb/auto_xselinux.go @@ -1,7 +1,7 @@ package xgb /* - This file was generated by xselinux.xml on May 6 2012 3:00:45am EDT. + This file was generated by xselinux.xml on May 6 2012 5:48:48pm EDT. This file is automatically generated. Edit at your peril! */ @@ -9,19 +9,29 @@ package xgb // in one package. They are still listed here for reference. // import "xproto" -// Skipping definition for base type 'Void' - -// Skipping definition for base type 'Byte' - -// Skipping definition for base type 'Int8' - -// Skipping definition for base type 'Card16' +// XselinuxInit must be called before using the SELinux extension. +func (c *Conn) XselinuxInit() error { + reply, err := c.QueryExtension(7, "SELinux").Reply() + switch { + case err != nil: + return err + case !reply.Present: + return newError("No extension named SELinux could be found on on the server.") + } -// Skipping definition for base type 'Char' + c.extLock.Lock() + c.extensions["SELinux"] = reply.MajorOpcode + for evNum, fun := range newExtEventFuncs["SELinux"] { + newEventFuncs[int(reply.FirstEvent)+evNum] = fun + } + c.extLock.Unlock() -// Skipping definition for base type 'Card32' + return nil +} -// Skipping definition for base type 'Double' +func init() { + newExtEventFuncs["SELinux"] = make(map[int]newEventFun) +} // Skipping definition for base type 'Bool' @@ -35,6 +45,20 @@ package xgb // Skipping definition for base type 'Int32' +// Skipping definition for base type 'Void' + +// Skipping definition for base type 'Byte' + +// Skipping definition for base type 'Int8' + +// Skipping definition for base type 'Card16' + +// Skipping definition for base type 'Char' + +// Skipping definition for base type 'Card32' + +// Skipping definition for base type 'Double' + // 'XselinuxListItem' struct definition // Size: ((12 + pad((int(ObjectContextLen) * 1))) + pad((int(DataContextLen) * 1))) type XselinuxListItem struct { -- cgit v1.2.3