Displaying 14 results from an estimated 14 matches for "__cpu_to_le32".
2008 Oct 11
1
[PATCH] fstype: Fix ext4/ext4dev probing
...her or not the
ext4 and/or ext4dev filesystems are present, and properly handles the
test_fs flag. The old code also has some really buggy checks --- for
example, where it compared the set of supported ro_compat features
against the incompat feature bitmask:
(sb->s_feature_incompat & __cpu_to_le32(EXT3_FEATURE_RO_COMPAT_SUPP)
I rewrote the ext4 checks so they are more easily understood and audited.
Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>
---
usr/kinit/fstype/fstype.c | 144 ++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 130 insertions(+), 14...
2008 Jun 16
0
latest fixes
...onst void *buf, unsigned long long *bytes)
const struct ext3_super_block *sb =
(const struct ext3_super_block *)buf;
+ /* ext4dev needs ext2 + journal + test_fs flag + one !ext3 feature */
if (sb->s_magic == __cpu_to_le16(EXT2_SUPER_MAGIC)
+ && (sb->s_feature_compat
+ & __cpu_to_le32(EXT3_FEATURE_COMPAT_HAS_JOURNAL))
+ && (sb->s_flags & __cpu_to_le32(EXT2_FLAGS_TEST_FILESYS))
&& (sb->s_feature_incompat
- & __cpu_to_le32(EXT3_FEATURE_INCOMPAT_EXTENTS)
+ & __cpu_to_le32(EXT3_FEATURE_RO_COMPAT_SUPP)
|| sb->s_feature_incompat
- &...
2018 Feb 01
0
[vhost:vhost 11/22] drivers//firmware/qemu_fw_cfg.c:380:3: error: implicit declaration of function 'paddr_vmcoreinfo_note'
...reinfo':
drivers//firmware/qemu_fw_cfg.c:379:23: error: 'VMCOREINFO_NOTE_SIZE' undeclared (first use in this function)
.size = cpu_to_le32(VMCOREINFO_NOTE_SIZE),
^
include/uapi/linux/byteorder/little_endian.h:33:51: note: in definition of macro '__cpu_to_le32'
#define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
^
drivers//firmware/qemu_fw_cfg.c:379:11: note: in expansion of macro 'cpu_to_le32'
.size = cpu_to_le32(VMCOREINFO_NOTE_SIZE),
^
drivers//firmware/q...
2018 Feb 01
0
[vhost:vhost 11/22] drivers//firmware/qemu_fw_cfg.c:379:23: error: 'VMCOREINFO_NOTE_SIZE' undeclared; did you mean 'MEI_CL_NAME_SIZE'?
...cfg.c:379:23: error: 'VMCOREINFO_NOTE_SIZE' undeclared (first use in this function); did you mean 'MEI_CL_NAME_SIZE'?
.size = cpu_to_le32(VMCOREINFO_NOTE_SIZE),
^
include/uapi/linux/byteorder/little_endian.h:33:51: note: in definition of macro '__cpu_to_le32'
#define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
^
>> drivers//firmware/qemu_fw_cfg.c:379:11: note: in expansion of macro 'cpu_to_le32'
.size = cpu_to_le32(VMCOREINFO_NOTE_SIZE),
^~~~~~~~~~~
dri...
2009 Oct 04
1
[PATCH] recognise ext4 without journal
...nt base_ext4_image(const void *buf, unsigned long long *bytes,
if (sb->s_magic != __cpu_to_le16(EXT2_SUPER_MAGIC))
return 0;
- /*
- * For now, ext4 requires a journal -- but this may change
- * soon if we get that patch from Google. :-)
- */
- if ((sb->s_feature_compat
- & __cpu_to_le32(EXT3_FEATURE_COMPAT_HAS_JOURNAL)) == 0)
- return 0;
-
/* There is at least one feature not supported by ext3 */
if ((sb->s_feature_incompat
& __cpu_to_le32(EXT3_FEATURE_INCOMPAT_UNSUPPORTED)) ||
--
1.6.3.3
2019 Oct 07
0
[klibc:master] fstype: Drop obsolete support for "ext4dev"
...igned long long *bytes,
- int *test_fs)
+static int ext4_image(const void *buf, unsigned long long *bytes)
{
const struct ext3_super_block *sb =
(const struct ext3_super_block *)buf;
@@ -209,43 +128,11 @@ static int base_ext4_image(const void *buf, unsigned long long *bytes,
& __cpu_to_le32(EXT3_FEATURE_RO_COMPAT_UNSUPPORTED))) {
*bytes = (unsigned long long)__le32_to_cpu(sb->s_blocks_count)
<< (10 + __le32_to_cpu(sb->s_log_block_size));
- *test_fs = (sb->s_flags &
- __cpu_to_le32(EXT2_FLAGS_TEST_FILESYS)) != 0;
return 1;
}
return 0;
}
-stati...
2007 Aug 15
0
[git patch] fstype support + minor stuff
...nsigned long long *bytes)
return 0;
}
+static int ext4_image(const void *buf, unsigned long long *bytes)
+{
+ const struct ext3_super_block *sb =
+ (const struct ext3_super_block *)buf;
+
+ if (sb->s_magic == __cpu_to_le16(EXT2_SUPER_MAGIC)
+ && (sb->s_feature_incompat
+ & __cpu_to_le32(EXT3_FEATURE_INCOMPAT_EXTENTS)
+ || sb->s_feature_incompat
+ & __cpu_to_le32(EXT4_FEATURE_INCOMPAT_64BIT)
+ || sb->s_feature_incompat
+ & __cpu_to_le32(EXT4_FEATURE_INCOMPAT_MMP))) {
+ *bytes = (unsigned long long)__le32_to_cpu(sb->s_blocks_count)
+ << (10 + __le32_...
2014 Feb 24
0
[PATCH] fstype: f2fs support
...jfs_superblock to
@@ -472,6 +473,18 @@ static int btrfs_image(const void *buf, unsigned long long *bytes)
return 0;
}
+static int f2fs_image(const void *buf, unsigned long long *bytes)
+{
+ const struct f2fs_super_block *sb =
+ (const struct f2fs_super_block *)buf;
+
+ if (sb->magic == __cpu_to_le32(F2FS_SUPER_MAGIC)) {
+ *bytes = 0;
+ return 1;
+ }
+ return 0;
+}
+
struct imagetype {
off_t block;
const char name[12];
@@ -502,6 +515,7 @@ static struct imagetype images[] = {
{1, "ext2", ext2_image},
{1, "minix", minix_image},
{1, "nilfs2", nilfs2_image...
2008 Mar 03
0
[PATCH] nilfs2 support for fstype
...lock to
@@ -326,6 +327,19 @@
return 0;
}
+static int nilfs2_image(const void *buf, unsigned long long *bytes)
+{
+ const struct nilfs_super_block *sb =
+ (const struct nilfs_super_block *)buf;
+
+ if (sb->s_magic == __cpu_to_le16(NILFS_SUPER_MAGIC) &&
+ sb->s_rev_level == __cpu_to_le32(2)) {
+ *bytes = (unsigned long long)__le64_to_cpu(sb->s_dev_size);
+ return 1;
+ }
+ return 0;
+}
+
struct imagetype {
off_t block;
const char name[12];
@@ -354,6 +368,7 @@
{1, "ext3", ext3_image},
{1, "ext2", ext2_image},
{1, "minix", minix_image},
+...
2011 Mar 11
1
[PATH 9/12] VTPM mini-os: New stubdom applications
This patch ports 5 new applications to the stubdom makefile structure
for inclusion into stubdom domains. While these are required for
vtpm-stubdom and vtpmmgrdom they could be used with other stubdom
applications.
-libgmp 4.3.2
-openssl 1.0.0a
-polarssl 0.12.1
-berlios tpm_emulator 0.6.1
-vtpm_manager (from the tools directory)
Signed off by: Matthew Fioravante
2008 Mar 25
2
bunch of small fixes
hello hpa,
nothing particular stands out,
just syncing with latest Debian upload and subsequent patch emails.
please review merge or nack.
thanks :)
maks
git pull git://git.debian.org/~maks/klibc.git maks
for the changes:
Aaron Griffin (1):
[klibc] kinit: skip md assembly if mdX exists
Colin Watson (1):
[klibc] mount/umount FUSE support
Harald Jenny (1):
[klibc] fstype:
2012 Nov 06
0
[ablock84-btrfs:btrfs-far 19/20] fs/far/far-path.c:42:2: error: implicit declaration of function 'IS_ERR'
...from include/linux/preempt.h:9,
from include/linux/spinlock.h:50,
from include/linux/vmalloc.h:4,
from fs/far/far-mem.h:23,
from fs/far/far-attr.c:21:
include/uapi/linux/byteorder/big_endian.h:32:0: warning: "__cpu_to_le32" redefined [enabled by default]
In file included from include/linux/byteorder/little_endian.h:4:0,
from fs/far/far-attr.h:30,
from fs/far/far-attr.c:19:
include/uapi/linux/byteorder/little_endian.h:32:0: note: this is the location of the previous definition
In...
2020 Oct 17
10
[RFC] treewide: cleanup unreachable breaks
...const u32 *buf,
switch (size_bytes) {
case 2: /* 2 bytes */
buf16 = (const u16 *)buf;
writew(__cpu_to_le16(*buf16), ptr);
return 2;
- break;
case 1: /*
* also needs to write 4 bytes in this case
* so falling through..
*/
+ fallthrough;
case 4: /* 4 bytes */
writel(__cpu_to_le32(*buf), ptr);
return 4;
- break;
}
while (i < size_bytes) {
if (size_bytes - i == 2) {
/* 2 bytes */
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 1731d9728865..09703079db7b 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -318,31 +...
2020 Oct 17
10
[RFC] treewide: cleanup unreachable breaks
...const u32 *buf,
switch (size_bytes) {
case 2: /* 2 bytes */
buf16 = (const u16 *)buf;
writew(__cpu_to_le16(*buf16), ptr);
return 2;
- break;
case 1: /*
* also needs to write 4 bytes in this case
* so falling through..
*/
+ fallthrough;
case 4: /* 4 bytes */
writel(__cpu_to_le32(*buf), ptr);
return 4;
- break;
}
while (i < size_bytes) {
if (size_bytes - i == 2) {
/* 2 bytes */
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 1731d9728865..09703079db7b 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -318,31 +...