Displaying 20 results from an estimated 31 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.
2024 Sep 25
41
[Bug 3740] New: Tracking bug for OpenSSH 10.0
https://bugzilla.mindrot.org/show_bug.cgi?id=3740
Bug ID: 3740
Summary: Tracking bug for OpenSSH 10.0
Product: Portable OpenSSH
Version: -current
Hardware: Other
OS: Linux
Status: NEW
Keywords: meta
Severity: enhancement
Priority: P5
Component: Miscellaneous
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,...
2025 Apr 02
1
Call for testing: OpenSSH 10.0
...t;
> * Add support for building a standalone sk-libfido2 library,
> enabled by --with-security-key-standalone
>
> * ssh(1), sshd(8), ssh-keyscan(1): include __builtin_popcount
> replacement function. for compilers that lack it.
>
> * All: Check for and replace le32toh, le64toh, htole64 separately.
> It appears that at least some versions of endian.h in glibc do
> not have the latter two. bz#3794
>
> * Remove ancient RHL 6.x config in RPM spec.
>
> OpenSSH is brought to you by Markus Friedl, Niels Provos, Theo de
> Raadt, Kevin Steves, Damien M...
2025 Apr 01
9
Call for testing: OpenSSH 10.0
...ux-memlock-onfault configure flag.
* Add support for building a standalone sk-libfido2 library,
enabled by --with-security-key-standalone
* ssh(1), sshd(8), ssh-keyscan(1): include __builtin_popcount
replacement function. for compilers that lack it.
* All: Check for and replace le32toh, le64toh, htole64 separately.
It appears that at least some versions of endian.h in glibc do
not have the latter two. bz#3794
* Remove ancient RHL 6.x config in RPM spec.
OpenSSH is brought to you by Markus Friedl, Niels Provos, Theo de
Raadt, Kevin Steves, Damien Miller, Darren Tucker, Jason McInt...
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.
-