- Question: on x86 qemu is configured to boot the rootfs from nvdimm, with memory backend file the kata rootfs image. What's preventing the image file from being modified, since the file system is mounted rw?
- Answer:
that is because with memory backend file,
"share=on/off"
qemu option controls the visibility of guest writes. If share=on, then guest writes will be applied to the backend file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// # Circular Byte Buffer For Embedded Applications (Index Based) | |
// Author: Brian Khuu (July 2020) (briankhuu.com) (mofosyne@gmail.com) | |
// Reason: Malloc free, minimum overhead implementation of a circular buffer. | |
// Static inlined handlers for speed and ease of usage in various projects. | |
// Index based implementation diverges from harshkn's version, since it is | |
// easier for me to grok. However may come at cost of speed and optimisation. | |
// Also uses byte based rather than item based for easier understability | |
// when used for simpler byte array circular buffers. | |
// I have also written an pointer based circular buffer version. | |
// Based on harshkn's circular buffer: https://gist.github.com/harshkn/909546 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | |
# using GCC | |
set(CMAKE_VERBOSE_MAKEFILE 1) | |
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_DEFINITIONS "Bits64_;UNIX;_BOOL;LINUX;FUNCPROTO;_GNU_SOURCE;LINUX_64;REQUIRE_IOSTREAM") | |
set(GCC_COMPILE_OPTIONS "-m64;-fPIC;-fno-strict-aliasing;-Wall;-Wno-multichar;-Wno-comment;-Wno-sign-compare;-funsigned-char;-pthread;-Wno-deprecated;-Wno-reorder;-ftemplate-depth-64;-fno-gnu-keywords;-std=c++0x;-Winline") | |
set(GCC_COMPILE_DEBUG_OPTIONS "${GCC_COMPILE_OPTIONS};-ggdb;-O0") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from concurrent import futures | |
import functools | |
import inspect | |
import threading | |
from grpc import _server | |
def _loop_mgr(loop: asyncio.AbstractEventLoop): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MIT License | |
Copyright (c) 2018 Oleg Yamnikov | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright (c) 2016, Nikolay Polyarnyi | |
# All rights reserved. | |
# | |
import numpy as np | |
def rgb_to_hsv(rgb): | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Download Google Drive files with WGET | |
Example Google Drive download link: | |
https://docs.google.com/open?id=[ID] | |
To download the file with WGET you need to use this link: | |
https://googledrive.com/host/[ID] | |
Example WGET command: |