Displaying 20 results from an estimated 25 matches for "htole64".
2018 Sep 17
0
[PATCH nbdkit v3 3/3] Add partitioning plugin.
...1) / SECTOR_SIZE;
+
+ memset (header, 0, sizeof *header);
+ memcpy (header->signature, "EFI PART", 8);
+ memcpy (header->revision, "\0\0\1\0", 4); /* revision 1.0 */
+ header->header_size = htole32 (sizeof *header);
+ if (is_primary) {
+ header->current_lba = htole64 (1);
+ header->backup_lba = htole64 (nr_lbas - 1);
+ }
+ else {
+ header->current_lba = htole64 (nr_lbas - 1);
+ header->backup_lba = htole64 (1);
+ }
+ header->first_usable_lba = htole64 (34);
+ header->last_usable_lba = htole64 (nr_lbas - 34);
+ if (is_primary)
+...
2019 Feb 22
0
[PATCH nbdkit v3 4/4] Add linuxdisk plugin.
...memset (header, 0, sizeof *header);
+ memcpy (header->signature, GPT_SIGNATURE, sizeof (header->signature));
+ memcpy (header->revision, GPT_REVISION, sizeof (header->revision));
+ header->header_size = htole32 (sizeof *header);
+ if (is_primary) {
+ header->current_lba = htole64 (1);
+ header->backup_lba = htole64 (nr_lbas - 1);
+ }
+ else {
+ header->current_lba = htole64 (nr_lbas - 1);
+ header->backup_lba = htole64 (1);
+ }
+ header->first_usable_lba = htole64 (34);
+ header->last_usable_lba = htole64 (nr_lbas - 34);
+ if (is_primary)
+...
2018 Sep 17
4
[PATCH nbdkit 0/3] Add partitioning plugin.
nbdkit partitioning boot.img swap.img root.img
... creates a virtual disk by adding a partition table.
In ancient times Xen used to do this.
Rich.
2018 Sep 17
7
[PATCH nbdkit v3 0/3] Add partitioning plugin.
The partitioning plugin patch is the same (except for rebasing).
However I have changed the first two patches based on feedback
received. In particular this fixes a very serious bug found by Eric
Blake in the current truncate filter.
Rich.
2019 Feb 19
0
[PATCH nbdkit 4/4] Add linuxdisk plugin.
...memset (header, 0, sizeof *header);
+ memcpy (header->signature, GPT_SIGNATURE, sizeof (header->signature));
+ memcpy (header->revision, GPT_REVISION, sizeof (header->revision));
+ header->header_size = htole32 (sizeof *header);
+ if (is_primary) {
+ header->current_lba = htole64 (1);
+ header->backup_lba = htole64 (nr_lbas - 1);
+ }
+ else {
+ header->current_lba = htole64 (nr_lbas - 1);
+ header->backup_lba = htole64 (1);
+ }
+ header->first_usable_lba = htole64 (34);
+ header->last_usable_lba = htole64 (nr_lbas - 34);
+ if (is_primary)
+...
2019 Feb 22
5
[PATCH nbdkit v3 0/4] Add linuxdisk plugin.
For v3 I reimplemented this using mke2fs -d. This obviously makes the
implementation a whole lot simpler, but cannot support multiple
directory merging.
Patches 1-3 are the same as before. I've also reproduced the notes
from v2 below.
v2:
- Fix inconsistent tab/space.
- All 3 plugins now contain a block of text pointing to the
other 2 plugins.
- TMDIR -> TMPDIR
- Unlink the
2019 Feb 19
6
[PATCH nbdkit v2 0/5] Add linuxdisk plugin.
Another interesting thing you can do with this plugin:
https://rwmj.wordpress.com/2019/02/19/nbdkit-linuxdisk-plugin/
v2:
- Fix inconsistent tab/space.
- All 3 plugins now contain a block of text pointing to the
other 2 plugins.
- TMDIR -> TMPDIR
- Unlink the temporary file and other cleanups along error paths.
- fclose -> pclose, and check the return value for errors.
-
2019 Jul 03
6
[PATCH libnbd 0/2] Two patches to make libnbd work on FreeBSD.
Two simple patches which make libnbd compile on FreeBSD.
Are we OK to copy common/include/byte-swapping.h from nbdkit? There
is no license issue that I know of. Should we put it in lib/ or
create a common/ directory? The header file is actually also needed
by the tests (follow up patch for that) so putting it in common/ might
make more sense.
Some notes if you want to compile on FreeBSD:
-
2019 Feb 19
7
[PATCH nbdkit 0/4] New plugin: Add linuxdisk plugin.
Turns out Japanese trains are good for coding!
In supermin we have a bunch of code to create the libguestfs
appliance. It creates it directly using libext2fs (part of
e2fsprogs). We can use the same technique to create ext2 virtual
disks in nbdkit, which is what this new plugin does. Why a new plugin
instead of modifying the floppy plugin? See the 4/4 commit message
for an explanation.
The
2014 Aug 08
2
[PATCH 1/2] Add type checking, support integers as value
...ORD) {
+ uint64_t l = PyLong_AsLongLong (obj);
+ if (PyErr_Occurred ()) {
+ PyErr_SetString (PyExc_TypeError, \"expected int type for QWORD value\");
+ return -1;
+ }
+
+ ret->len = sizeof (l);
+ ret->value = (char *) word;
+ *(uint64_t *) ret->value = htole64 (l);
+ } else {
+ PyErr_SetString (PyExc_TypeError, \"expected bytes or str type for 'value'\");
return -1;
}
-#ifdef HAVE_PYSTRING_ASSTRING
- ret->value = PyString_AsString (obj);
- ret->len = PyString_Size (obj);
-#else
- bytes = PyUnicode_AsUTF8String (obj)...
2018 Aug 12
13
[PATCH nbdkit 00/10] FreeBSD support.
With these patches, a majority of tests pass. The notable
things which are still broken:
- Because FreeBSD links /home -> /usr/home, $(pwd) gives a different
result from realpath(2). Therefore some tests which implicitly
rely on (eg) a plugin which calls nbdkit_realpath internally and
then checking that path against $(pwd) fail.
- Shebangs (#!) don't seem to work the same way
2019 Feb 19
0
[PATCH nbdkit 1/4] common: Move some GPT functionality to a common directory.
...0\0\1\0", 4); /* revision 1.0 */
+ memcpy (header->signature, GPT_SIGNATURE, sizeof (header->signature));
+ memcpy (header->revision, GPT_REVISION, sizeof (header->revision));
header->header_size = htole32 (sizeof *header);
if (is_primary) {
header->current_lba = htole64 (1);
@@ -159,14 +145,7 @@ create_gpt_partition_table_entry (const struct region *region,
{
size_t i, len;
const char *filename;
- struct gpt_entry {
- char partition_type_guid[16];
- char unique_guid[16];
- uint64_t first_lba;
- uint64_t last_lba;
- uint64_t attributes;
-...
2013 Aug 08
1
[PATCH v2 7/7] Sample Implementation of Intel MIC User Space Daemon.
...fig_len = sizeof(virtblk_dev_page.blk_config),
> + },
> + .vqconfig[0] = {
> + .num = htole16(MIC_VRING_ENTRIES),
> + },
> + .host_features =
> + htole32(1<<VIRTIO_BLK_F_SEG_MAX),
> + .blk_config = {
> + .seg_max = htole32(MIC_VRING_ENTRIES - 2),
> + .capacity = htole64(0),
> + }
> +};
> +
> +static char *myname;
> +
> +static int
> +tap_configure(struct mic_info *mic, char *dev)
> +{
> + pid_t pid;
> + char *ifargv[7];
> + char ipaddr[IFNAMSIZ];
> + int ret = 0;
> +
> + pid = fork();
> + if (pid == 0) {
> + ifargv...
2013 Aug 08
1
[PATCH v2 7/7] Sample Implementation of Intel MIC User Space Daemon.
...fig_len = sizeof(virtblk_dev_page.blk_config),
> + },
> + .vqconfig[0] = {
> + .num = htole16(MIC_VRING_ENTRIES),
> + },
> + .host_features =
> + htole32(1<<VIRTIO_BLK_F_SEG_MAX),
> + .blk_config = {
> + .seg_max = htole32(MIC_VRING_ENTRIES - 2),
> + .capacity = htole64(0),
> + }
> +};
> +
> +static char *myname;
> +
> +static int
> +tap_configure(struct mic_info *mic, char *dev)
> +{
> + pid_t pid;
> + char *ifargv[7];
> + char ipaddr[IFNAMSIZ];
> + int ret = 0;
> +
> + pid = fork();
> + if (pid == 0) {
> + ifargv...
2013 Aug 08
0
[PATCH v2 7/7] Sample Implementation of Intel MIC User Space Daemon.
...zeof(virtblk_dev_page.host_features),
+ .config_len = sizeof(virtblk_dev_page.blk_config),
+ },
+ .vqconfig[0] = {
+ .num = htole16(MIC_VRING_ENTRIES),
+ },
+ .host_features =
+ htole32(1<<VIRTIO_BLK_F_SEG_MAX),
+ .blk_config = {
+ .seg_max = htole32(MIC_VRING_ENTRIES - 2),
+ .capacity = htole64(0),
+ }
+};
+
+static char *myname;
+
+static int
+tap_configure(struct mic_info *mic, char *dev)
+{
+ pid_t pid;
+ char *ifargv[7];
+ char ipaddr[IFNAMSIZ];
+ int ret = 0;
+
+ pid = fork();
+ if (pid == 0) {
+ ifargv[0] = "ip";
+ ifargv[1] = "link";
+ ifargv[2] = "set&...
2023 Mar 01
6
[libnbd PATCH 0/6] common: catch up with nbdkit
If we compare the "common" subdirectory between nbdkit @ 6b4178d0fdfe
("ci: Temporarily disable perl in MacOS", 2023-02-27) and libnbd @
d05cd8f384a7 ("Version 1.15.11.", 2023-02-28), we find differences. We
can categorize these differences along two (orthogonal) axes:
- Intentional or unintentional.
Intentional differences are for example when one of the libnbd
2014 Aug 04
6
[hivex] Segfault for an integer value to node_set_value
Hi,
When an integer argument is passed as value, node_set_value
segfaults. Reproducer is at the end of this message
The backtrace points at hivex-py.c, function get_value. While obj
is non-NULL, `bytes = PyUnicode_AsUTF8String (obj);` returns NULL.
Kind regards,
Peter
https://lekensteyn.nl
#!/usr/bin/env python3
import hivex, sys
h = hivex.Hivex(sys.argv[1])
print(h)
val = {
2013 Aug 08
10
[PATCH v2 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog:
=========
v1 => v2:
a) License wording cleanup, sysfs ABI documentation, patch 1 refactoring
into 3 smaller patches and function renames, as per feedback from
Greg Kroah-Hartman.
b) Use VRINGH infrastructure for accessing virtio rings from the host
in patch 5, as per feedback from Michael S. Tsirkin.
v1: Initial post @ https://lkml.org/lkml/2013/7/24/810
Description:
2013 Aug 08
10
[PATCH v2 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog:
=========
v1 => v2:
a) License wording cleanup, sysfs ABI documentation, patch 1 refactoring
into 3 smaller patches and function renames, as per feedback from
Greg Kroah-Hartman.
b) Use VRINGH infrastructure for accessing virtio rings from the host
in patch 5, as per feedback from Michael S. Tsirkin.
v1: Initial post @ https://lkml.org/lkml/2013/7/24/810
Description:
2013 Aug 21
10
[PATCH v3 0/7] Enable Drivers for Intel MIC X100 Coprocessors.
ChangeLog:
=========
v2 => v3:
a) Patch 1 data structure cleanups, header file include cleanups,
IDA interface reuse and switching to device_create_with_groups(..)
as per feedback from Greg Kroah-Hartman.
b) Patch 7 signal documentation, sleep workaround removal and sysfs
access API cleanups as per feedback from Michael S. Tsirkin.
v1 => v2: @ http://lwn.net/Articles/563131/
a)