search for: __cpu_to_le16

Displaying 10 results from an estimated 10 matches for "__cpu_to_le16".

2008 Oct 11
1
[PATCH] fstype: Fix ext4/ext4dev probing
...ose(f); + return (0); +} + +static int base_ext4_image(const void *buf, unsigned long long *bytes, + int *test_fs) { 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_RO_COMPAT_SUPP) - || sb->s_f...
2009 Oct 04
1
[PATCH] recognise ext4 without journal
...ns(+), 8 deletions(-) diff --git a/usr/kinit/fstype/fstype.c b/usr/kinit/fstype/fstype.c index 69e0e30..bf63b1b 100644 --- a/usr/kinit/fstype/fstype.c +++ b/usr/kinit/fstype/fstype.c @@ -196,14 +196,6 @@ static int 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 feat...
2008 Mar 03
0
[PATCH] nilfs2 support for fstype
...uot;nilfs_fs.h" /* * Slightly cleaned up version of jfs_superblock 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,...
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 Jun 16
0
latest fixes
....c +++ b/usr/kinit/fstype/fstype.c @@ -115,11 +115,15 @@ static int ext4_image(const 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) + & __cp...
2007 Aug 15
0
[git patch] fstype support + minor stuff
...nit/fstype/fstype.c @@ -107,6 +107,25 @@ static int minix_image(const void *buf, unsigned 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 = (uns...
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:
2020 Oct 17
10
[RFC] treewide: cleanup unreachable breaks
...goto out; - break; } while (i < size_bytes) { if (size_bytes - i == 2) { /* Handle 2 bytes in the end */ @@ -458,19 +456,18 @@ static u32 write_mem32(void __iomem *mem_addr_start, 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) {...
2020 Oct 17
10
[RFC] treewide: cleanup unreachable breaks
...goto out; - break; } while (i < size_bytes) { if (size_bytes - i == 2) { /* Handle 2 bytes in the end */ @@ -458,19 +456,18 @@ static u32 write_mem32(void __iomem *mem_addr_start, 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) {...
2012 Sep 17
9
[PATCH] Upgrade vtpmd to berlios version 0.7.4
...= NULL) free( (void *) ptr); - } - - /* random numbers */ - -+//FIXME; -+void get_random_bytes(void *buf, int nbytes); -+ - static inline void tpm_get_random_bytes(void *buf, int nbytes) - { - get_random_bytes(buf, nbytes); -@@ -84,9 +93,9 @@ uint64_t tpm_get_ticks(void); - #define CPU_TO_LE16(x) __cpu_to_le16(x) - - #define BE64_TO_CPU(x) __be64_to_cpu(x) --#define LE64_TO_CPU(x) __be64_to_cpu(x) -+#define LE64_TO_CPU(x) __le64_to_cpu(x) - #define BE32_TO_CPU(x) __be32_to_cpu(x) --#define LE32_TO_CPU(x) __be32_to_cpu(x) -+#define LE32_TO_CPU(x) __le32_to_cpu(x) - #define BE16_TO_CPU(x) __be16_to_cpu(x)...