Displaying 20 results from an estimated 28 matches for "le64toh".
Did you mean:
be64toh
2013 Feb 25
1
[PATCH] lib: avoid pragma usage in inspect-fs-windows
...,8 @@ map_registry_disk_blob (guestfs_h *g, const void *blob)
* Note deliberate cast-align violation here since the data is in a
* very odd place within the blob. Thanks Microsoft!
*/
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wcast-align"
- part_offset = le64toh (* (uint64_t *) ((char *) blob + 4));
-#pragma GCC diagnostic pop
+ memcpy(&part_offset, (char *) blob + 4, sizeof(part_offset));
+ part_offset = le64toh (part_offset);
partitions = guestfs_part_list (g, devices[i]);
if (partitions == NULL)
2011 Aug 10
1
[PATCH] Report last-modified time of hive root and nodes
...st char *filename, int flags)
@@ -359,6 +348,15 @@ hivex_open (const char *filename, int flags)
goto error;
}
+ /* Last-modified time. */
+ h->last_modified = (char *) calloc(1 + TIMESTAMP_BUF_LEN, sizeof(char));
+ int ft_rc = filetime_to_8601(h->last_modified, TIMESTAMP_BUF_LEN, le64toh ((uint64_t) h->hdr->last_modified));
+ if (ft_rc) {
+ fprintf (stderr, "hivex: failed to parse time value\n");
+ free(h->last_modified);
+ h->last_modified = NULL;
+ }
+
if (h->msglvl >= 2) {
char *name = windows_utf16_to_utf8 (h->hdr->name, 64);...
2011 Aug 10
1
[Hivex][PATCH v2] Report last-modified time of hive root and nodes
...st char *filename, int flags)
@@ -359,6 +388,15 @@ hivex_open (const char *filename, int flags)
goto error;
}
+ /* Last-modified time. */
+ h->last_modified = (char *) calloc(1 + TIMESTAMP_BUF_LEN, sizeof(char));
+ int ft_rc = filetime_to_8601(h->last_modified, TIMESTAMP_BUF_LEN, le64toh ((uint64_t) h->hdr->last_modified));
+ if (ft_rc) {
+ fprintf (stderr, "hivex: failed to parse time value\n");
+ free(h->last_modified);
+ h->last_modified = NULL;
+ }
+
if (h->msglvl >= 2) {
char *name = windows_utf16_to_utf8 (h->hdr->name, 64);...
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:
-
2011 Aug 13
2
[Hivex] [PATCH v3] Report last-modified time of hive root and nodes
...64_t timestamp;
uint32_t unknown1;
uint32_t parent; /* offset of owner/parent */
uint32_t nr_subkeys; /* number of subkeys */
@@ -359,6 +360,9 @@ hivex_open (const char *filename, int flags)
goto error;
}
+ /* Last-modified time. */
+ h->last_modified = le64toh ((int64_t) h->hdr->last_modified);
+
if (h->msglvl >= 2) {
char *name = windows_utf16_to_utf8 (h->hdr->name, 64);
@@ -367,6 +371,8 @@ hivex_open (const char *filename, int flags)
" file version %" PRIu32 ".%" PRIu32 "\n...
2024 Oct 29
1
FYI: fix for big-endian systems pushed to V_9_9 branch
On 27/10/2024 05:45, Damien Miller wrote:
> If you distribute OpenSSH to big-endian systems and have packaged
> OpenSSH 9.9 already, then I recommend you include these fixes as the
> next release of OpenSSH will make this key exchange algorithm the
> default.
>
I tried to update my Solaris builds but ran into a build error.
In file included from kexmlkem768x25519.c:50:
2024 Oct 29
1
FYI: fix for big-endian systems pushed to V_9_9 branch
...(v) & 0xff00000000ULL) >> 8 | \
+ ((uint64_t)(v) & 0xff0000000000ULL) >> 24 | \
+ ((uint64_t)(v) & 0xff000000000000ULL) >> 40 | \
+ ((uint64_t)(v) & 0xff00000000000000ULL) >> 56)
# ifdef WORDS_BIGENDIAN
# define le32toh(v) (openssh_swap32(v))
# define le64toh(v) (openssh_swap64(v))
2015 Feb 12
0
Re: [PATCH 1/3] macosx: Includes/defines for byteswap operations
...ect-fs-windows.c
> +++ b/src/inspect-fs-windows.c
> @@ -36,6 +36,12 @@
> #include <sys/endian.h>
> #endif
>
> +#if defined __APPLE__ && defined __MACH__
> +#include <libkern/OSByteOrder.h>
> +#define le32toh(x) OSSwapLittleToHostInt32(x)
> +#define le64toh(x) OSSwapLittleToHostInt64(x)
> +#endif
> +
> #include <pcre.h>
>
> #include "c-ctype.h"
> diff --git a/src/journal.c b/src/journal.c
> index 1070067..c563b7f 100644
> --- a/src/journal.c
> +++ b/src/journal.c
> @@ -35,6 +35,11 @@
> #include <...
2015 Feb 12
8
[PATCH 1/3] macosx: Includes/defines for byteswap operations
...index 682157a..421a5b1 100644
--- a/src/inspect-fs-windows.c
+++ b/src/inspect-fs-windows.c
@@ -36,6 +36,12 @@
#include <sys/endian.h>
#endif
+#if defined __APPLE__ && defined __MACH__
+#include <libkern/OSByteOrder.h>
+#define le32toh(x) OSSwapLittleToHostInt32(x)
+#define le64toh(x) OSSwapLittleToHostInt64(x)
+#endif
+
#include <pcre.h>
#include "c-ctype.h"
diff --git a/src/journal.c b/src/journal.c
index 1070067..c563b7f 100644
--- a/src/journal.c
+++ b/src/journal.c
@@ -35,6 +35,11 @@
#include <sys/endian.h>
#endif
+#if defined __APPLE__ &...
2019 Jan 20
5
[PATCH nbdkit 0/4] partition: Support MBR logical partitions.
This implements support for MBR logical partitions in
nbdkit-partition-filter, complementing existing support in the
partitioning plugin.
Rich.
2011 Dec 13
1
[hivex] [PATCH 1/2] hivex: Expose hive major and minor version
...d not decode hive minor version\n",
+ filename);
+ errno = EINVAL;
+ goto error;
+ }
+
h->bitmap = calloc (1 + h->size / 32, 1);
if (h->bitmap == NULL)
goto error;
@@ -328,11 +338,11 @@ hivex_open (const char *filename, int flags)
h->last_modified = le64toh ((int64_t) h->hdr->last_modified);
if (h->msglvl >= 2) {
- char *name = windows_utf16_to_utf8 (h->hdr->name, 64);
+ char *name = hivex_name (h);
fprintf (stderr,
"hivex_open: header fields:\n"
- " file version...
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
2018 Feb 09
3
[PATCH] Add a cache for iconv_t handles to hive_t
...flags)
{
@@ -164,11 +193,17 @@ hivex_open (const char *filename, int flags)
goto error;
}
+ for (int t=0; t<3; t++) {
+ pthread_mutex_init (&h->iconv_cache[t].mutex, NULL);
+ h->iconv_cache[t].handle = NULL;
+ }
+
/* Last modified time. */
h->last_modified = le64toh ((int64_t) h->hdr->last_modified);
if (h->msglvl >= 2) {
- char *name = _hivex_windows_utf16_to_utf8 (h->hdr->name, 64);
+ char *name = _hivex_recode (h, utf16le_to_utf8,
+ h->hdr->name, 64, NULL);
fprintf (stderr,...
2018 Feb 09
0
Re: [PATCH] Add a cache for iconv_t handles to hive_t
...char *filename, int flags)
> goto error;
> }
>
> + for (int t=0; t<3; t++) {
> + pthread_mutex_init (&h->iconv_cache[t].mutex, NULL);
> + h->iconv_cache[t].handle = NULL;
> + }
> +
> /* Last modified time. */
> h->last_modified = le64toh ((int64_t) h->hdr->last_modified);
>
> if (h->msglvl >= 2) {
> - char *name = _hivex_windows_utf16_to_utf8 (h->hdr->name, 64);
> + char *name = _hivex_recode (h, utf16le_to_utf8,
> + h->hdr->name, 64, NULL);
>
>...
2018 Feb 09
2
[PATCH] Add a cache for iconv_t handles to hive_t
..., int flags)
{
@@ -164,11 +192,17 @@ hivex_open (const char *filename, int flags)
goto error;
}
+ for (int t=0; t<3; t++) {
+ glthread_lock_init (&h->iconv_cache[t].mutex);
+ h->iconv_cache[t].handle = NULL;
+ }
+
/* Last modified time. */
h->last_modified = le64toh ((int64_t) h->hdr->last_modified);
if (h->msglvl >= 2) {
- char *name = _hivex_windows_utf16_to_utf8 (h->hdr->name, 64);
+ char *name = _hivex_recode (h, utf16le_to_utf8,
+ h->hdr->name, 64, NULL);
fprintf (stderr,...
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 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
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
2013 Jul 25
19
[PATCH hivex 00/19] Fix read/write handling of li-records.
This is, hopefully, a full fix for handling of li-records.
See:
https://bugzilla.redhat.com/show_bug.cgi?id=717583
https://bugzilla.redhat.com/show_bug.cgi?id=987463
Rich.