Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 51 for oldData (0.18 sec)

  1. src/cmd/vendor/golang.org/x/sys/unix/mremap.go

    	},
    	mremap: mremap,
    }
    
    func (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) {
    	if newLength <= 0 || len(oldData) == 0 || len(oldData) != cap(oldData) || flags&mremapFixed != 0 {
    		return nil, EINVAL
    	}
    
    	pOld := &oldData[cap(oldData)-1]
    	m.Lock()
    	defer m.Unlock()
    	bOld := m.active[pOld]
    	if bOld == nil || &bOld[0] != &oldData[0] {
    		return nil, EINVAL
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  2. pkg/util/pod/pod.go

    }
    
    func preparePatchBytesForPodStatus(namespace, name string, uid types.UID, oldPodStatus, newPodStatus v1.PodStatus) ([]byte, bool, error) {
    	oldData, err := json.Marshal(v1.Pod{
    		Status: oldPodStatus,
    	})
    	if err != nil {
    		return nil, false, fmt.Errorf("failed to Marshal oldData for pod %q/%q: %v", namespace, name, err)
    	}
    
    	newData, err := json.Marshal(v1.Pod{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Nov 07 15:22:29 UTC 2022
    - 3K bytes
    - Viewed (0)
  3. security/pkg/nodeagent/util/util.go

    	}
    
    	writeIfNotEqual := func(fileName string, newData []byte) error {
    		if newData == nil {
    			return nil
    		}
    		oldData, _ := os.ReadFile(path.Join(dir, fileName))
    		if !bytes.Equal(oldData, newData) {
    			if err := file.AtomicWrite(path.Join(dir, fileName), newData, certFileMode); err != nil {
    				return fmt.Errorf("failed to write data to file %v: %v", fileName, err)
    			}
    		}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 17 10:33:38 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  4. src/internal/syscall/unix/getentropy_netbsd.go

    	mib := [2]uint32{_CTL_KERN, _KERN_ARND}
    	n := uintptr(len(p))
    	_, _, errno := syscall.Syscall6(
    		syscall.SYS___SYSCTL,
    		uintptr(unsafe.Pointer(&mib[0])),
    		uintptr(len(mib)),
    		uintptr(unsafe.Pointer(&p[0])), // olddata
    		uintptr(unsafe.Pointer(&n)),    // &oldlen
    		uintptr(unsafe.Pointer(nil)),   // newdata
    		0)                              // newlen
    	if errno != 0 {
    		return syscall.Errno(errno)
    	}
    	if n != uintptr(len(p)) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 15 19:42:54 UTC 2023
    - 779 bytes
    - Viewed (0)
  5. staging/src/k8s.io/cli-runtime/pkg/genericclioptions/record_flags.go

    	objCopy := obj.DeepCopyObject()
    	if err := r.Record(objCopy); err != nil {
    		return nil, err
    	}
    
    	oldData, err := json.Marshal(obj)
    	if err != nil {
    		return nil, err
    	}
    	newData, err := json.Marshal(objCopy)
    	if err != nil {
    		return nil, err
    	}
    
    	return jsonpatch.CreateMergePatch(oldData, newData)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  6. pkg/scheduler/util/utils.go

    	if newStatus == nil {
    		return nil
    	}
    
    	oldData, err := json.Marshal(v1.Pod{Status: old.Status})
    	if err != nil {
    		return err
    	}
    
    	newData, err := json.Marshal(v1.Pod{Status: *newStatus})
    	if err != nil {
    		return err
    	}
    	patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, &v1.Pod{})
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Sep 21 01:40:44 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  7. pkg/controller/ttl/ttl_controller.go

    	oldData, err := json.Marshal(node)
    	if err != nil {
    		return err
    	}
    	setIntAnnotation(node, annotationKey, value)
    	newData, err := json.Marshal(node)
    	if err != nil {
    		return err
    	}
    	patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, &v1.Node{})
    	if err != nil {
    		return err
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  8. pkg/registry/rbac/helpers.go

    	copiedMeta, err := meta.Accessor(copied)
    	if err != nil {
    		return false
    	}
    	oldMeta, err := meta.Accessor(old)
    	if err != nil {
    		return false
    	}
    	copiedMeta.SetOwnerReferences(oldMeta.GetOwnerReferences())
    	copiedMeta.SetFinalizers(oldMeta.GetFinalizers())
    	copiedMeta.SetSelfLink(oldMeta.GetSelfLink())
    	copiedMeta.SetManagedFields(oldMeta.GetManagedFields())
    
    	return equalities.DeepEqual(copied, old)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 29 16:29:43 UTC 2020
    - 1.5K bytes
    - Viewed (0)
  9. src/cmd/go/internal/robustio/robustio_other.go

    // license that can be found in the LICENSE file.
    
    //go:build !windows && !darwin
    
    package robustio
    
    import (
    	"os"
    )
    
    func rename(oldpath, newpath string) error {
    	return os.Rename(oldpath, newpath)
    }
    
    func readFile(filename string) ([]byte, error) {
    	return os.ReadFile(filename)
    }
    
    func removeAll(path string) error {
    	return os.RemoveAll(path)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 516 bytes
    - Viewed (0)
  10. subprojects/core/src/main/java/org/gradle/initialization/DefaultProjectDescriptorRegistry.java

        @Override
        public void changeDescriptorPath(Path oldPath, Path newPath) {
            DefaultProjectDescriptor projectDescriptor = removeProject(oldPath.toString());
            projectDescriptor.setPath(newPath);
            addProject(projectDescriptor);
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri May 17 10:39:11 UTC 2019
    - 1.1K bytes
    - Viewed (0)
Back to top