Files
Jamie LiuandgVisor bot 33513684bc Implement filesystem-only checkpointing.
- `runsc fscheckpoint` saves a filesystem checkpoint, analogous to `runsc
    checkpoint`. `-direct` and `-leave-running` flags are supported for
    compatibility with `runsc checkpoint`. `-save-restore-exec*` is currently
    not supported due to lack of a use case. `-compression` support is not
    planned (specific files in filesystem checkpoint images may use compression
    as appropriate, but this is an implementation detail).
    `-exclude-committed-zero-pages` is inapplicable.

  - `runsc create -fs-restore-image-path` restores a filesystem checkpoint. The
    `-fs-restore-direct` flag has the same effect as `runsc restore -direct`.
    The behavior of `runsc restore -background` is always in effect for
    filesystem checkpoints.

PiperOrigin-RevId: 885914969
2026-03-18 19:44:48 -07:00

27 lines
718 B
Go

// Copyright 2021 The gVisor Authors.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd.
// Package hostarch contains machine architecture parameters.
package hostarch
import (
"encoding/binary"
"fmt"
)
// EndianString returns "little" if the invoking process is little-endian and
// "big" if the invoking process is big-endian.
func EndianString() string {
switch val := binary.NativeEndian.Uint32([]byte{0x01, 0x02, 0x03, 0x04}); val {
case 0x01020304:
return "big"
case 0x04030201:
return "little"
default:
panic(fmt.Sprintf("unknown endianness: [01 02 03 04] => %#x", val))
}
}