// isInitialized returns true when initialize() was called.
438664
func (t *tableStatusList) isInitialized() bool {
	t.mu.Lock()
	defer t.mu.Unlock()
	return t.initialized
}
291512
func (a *Plugin) ValidateInitialization() error {
	if err := a.Webhook.ValidateInitialization(); err != nil {
		return err
	}
	return nil
}
1084198
func WasInit(flags uint32) uint32 {
	return uint32(C.SDL_WasInit(C.Uint32(flags)))
}
453748
func init() {
	log.Out = os.Stdout
	if debug {
		log.Level = logger.DebugLevel
	}
}
491481
func (g *Git) IsInitialized() bool {
	return fsutil.IsFile(filepath.Join(g.path, ".git", "config"))
}
1214606
func (s *AtomicSequence) IsStarted() bool {
	if !s.initialized {
		return false
	}
	return !(atomic.LoadUint64(&s.current) < atomic.LoadUint64(&s.minvalue)) &&
		atomic.LoadUint64(&s.current) < atomic.LoadUint64(&s.maxvalue)
}
383938
func ErrorIsNotInitialized(err error) bool {
	_, ok := errors.Cause(err).(*ErrNotInitialized)
	return ok
}
1210056
func (b *AESGCMBarrier) Initialized(ctx context.Context) (bool, error) {
	// Read the keyring file
	keys, err := b.backend.List(ctx, keyringPrefix)
	if err != nil {
		return false, errwrap.Wrapf("failed to check for initialization: {{err}}", err)
	}
	if strutil.StrListContains(keys, "keyring") {
		return true, nil
	}

	// Fallback, check for the old sentinel file
	out, err := b.backend.Get(ctx, barrierInitPath)
	if err != nil {
		return false, errwrap.Wrapf("failed to check for initialization: {{err}}", err)
	}
	return out != nil, nil
}
631589
func (l *Loader) init() {
	if l.loading == nil {
		l.loading = stringset.New(1)
		l.sources = make(map[string]string, 1)
		l.symbols = make(map[string]*Struct, 1)
	}
}
443394
func (d *DeviceMapperDriver) ensureInitialized() error {
	poolPath := d.poolDir()
	if err := os.MkdirAll(poolPath, 0755); err != nil && !os.IsExist(err) {
		return err
	}
	if err := volume.TouchFlagFile(poolPath); err != nil {
		return err
	}
	if d.DeviceSet == nil {
		var (
			thinPoolDev         string
			enableLVMMonitoring string
			dmoptions           []string
		)
		for _, option := range d.options {
			if strings.HasPrefix(option, "dm.") {
				dmoptions = append(dmoptions, option)
				if strings.HasPrefix(option, "dm.thinpooldev=") {
					thinPoolDev = strings.TrimPrefix(option, "dm.thinpooldev=")
					thinPoolDev = fmt.Sprintf("/dev/mapper/%s", strings.TrimPrefix(thinPoolDev, "/dev/mapper/"))
				}
			} else if strings.HasPrefix(option, "enablelvmmonitoring=") {
				enableLVMMonitoring = strings.TrimPrefix(option, "enablelvmmonitoring=")
			} else {
				glog.Errorf("Unable to parse option %s", option)
				return ErrInvalidOption
			}
		}
		dmoptions = append(dmoptions, "dm.fs=ext4")

		if err := d.verifyThinpoolDeviceUUID(thinPoolDev); err != nil {
			return err
		}

		deviceSet, err := devmapper.NewDeviceSet(poolPath, true, dmoptions, nil, nil)
		if err != nil {
			if _, thinError := err.(devmapper.ThinpoolInitError); thinError {
				//Try recreating the base image because sometimes something deletes it
				glog.Errorf("Error intializing thin pool device, %s, attempting to create to new base device", err)
				deviceSet, err = devmapper.NewDeviceSet(poolPath, false, d.options, nil, nil)
				if err != nil {
					return err
				}
				err = deviceSet.CreateBaseImage()
				if err != nil {
					return err
				}
			} else {
				return err
			}
		}

		d.DeviceSet = deviceSet
		if err := d.saveThinpoolDeviceUUID(thinPoolDev); err != nil {
			return err
		}
		prefix, err := GetDevicePrefix(poolPath)
		if err != nil {
			return err
		}
		d.DevicePrefix = prefix
		switch enableLVMMonitoring {
		case "y":
			if thinPoolDev != "" {
				glog.V(1).Infof("Enabling LVM Monitoring for thin pool device %s", thinPoolDev)
				cmd := exec.Command("lvchange", "--monitor", "y", thinPoolDev)
				output, err := cmd.CombinedOutput()
				if err != nil {
					glog.Errorf("Could not run command %v: %s (%s)", cmd, string(output), err)
					return err
				}
			} else {
				glog.Warningf("Ignoring option 'enablelvmmonitoring'; no thin pool device specified")
			}
		case "n", "":
			if thinPoolDev != "" {
				glog.V(1).Infof("Disabling LVM Monitoring for thin pool device %s", thinPoolDev)
				cmd := exec.Command("lvchange", "--monitor", "n", thinPoolDev)
				output, err := cmd.CombinedOutput()
				if err != nil {
					glog.Errorf("Could not run command %v: %s (%s)", cmd, string(output), err)
					return err
				}
			} else if enableLVMMonitoring != "" {
				glog.Warningf("Ignoring option 'enablelvmmonitoring'; no thin pool device specified")
			}
		default:
			glog.Errorf("Attribute %s is not defined for enablelvmmonitoring", enableLVMMonitoring)
			return ErrInvalidArg
		}
	}
	if err := os.MkdirAll(d.MetadataDir(), 0755); err != nil && !os.IsExist(err) {
		return err
	}
	return nil
}
1267928
func (c *Core) Initialized(ctx context.Context) (bool, error) {
	// Check the barrier first
	init, err := c.barrier.Initialized(ctx)
	if err != nil {
		c.logger.Error("barrier init check failed", "error", err)
		return false, err
	}
	if !init {
		c.logger.Info("security barrier not initialized")
		return false, nil
	}

	// Verify the seal configuration
	sealConf, err := c.seal.BarrierConfig(ctx)
	if err != nil {
		return false, err
	}
	if sealConf == nil {
		return false, fmt.Errorf("core: barrier reports initialized but no seal configuration found")
	}

	return true, nil
}
899497
func Init() bool {
	initializer, exists := registeredInitializers[os.Args[0]]
	if exists {
		initializer()

		return true
	}
	return false
}
976315
func Initialize(xu *xgbutil.XUtil) {
	// Listen to mapping notify events
	xevent.MappingNotifyFun(updateMaps).Connect(xu, xevent.NoWindow)

	// Give us an initial mapping state...
	keyMap, modMap := MapsGet(xu)
	KeyMapSet(xu, keyMap)
	ModMapSet(xu, modMap)
}
394559
func ValidateInitialization(plugin Interface) error {
	if validater, ok := plugin.(InitializationValidator); ok {
		err := validater.ValidateInitialization()
		if err != nil {
			return err
		}
	}
	return nil
}
833485
func (d *FakeStateDriver) Init(instInfo *core.InstanceInfo) error {
	d.TestState = make(map[string]valueData)

	return nil
}
164193
func (s *serviceAccount) ValidateInitialization() error {
	if s.client == nil {
		return fmt.Errorf("missing client")
	}
	if s.secretLister == nil {
		return fmt.Errorf("missing secretLister")
	}
	if s.serviceAccountLister == nil {
		return fmt.Errorf("missing serviceAccountLister")
	}
	return nil
}
446168
func (r *Store) Initialized(ctx context.Context) (bool, error) {
	if r.store == nil {
		out.Debug(ctx, "initializing store and possible sub-stores")
		if err := r.initialize(ctx); err != nil {
			return false, errors.Wrapf(err, "failed to initialized stores: %s", err)
		}
	}
	return r.store.Initialized(ctx), nil
}