search for: uint32_max

Displaying 20 results from an estimated 208 matches for "uint32_max".

2007 Aug 27
17
statvfs change
...we return valid (but less precise) block information. + */ +static void +rescale_frsize(struct statvfs64 *sbp) +{ + /* + * We''re limited to 32 bits for the number of frsize blocks. + * Find the smallest power of 2 that won''t cause EOVERFLOW. + */ + while (sbp->f_blocks > UINT32_MAX && sbp->f_frsize < (1U << 31)) { + sbp->f_frsize <<= 1; + sbp->f_blocks >>= 1; + sbp->f_bfree >>= 1; + sbp->f_bavail >>= 1; + } +} + static int cstatvfs32(struct vfs *vfsp, struct statvfs32 *ubp) { @@ -114,10 +135,28 @@ if (ds64.f...
2019 Jun 08
2
Kernel Image CRC checking
...ng time ago... > Ah, it seems that zlib's CRC32 returns the binary inverse of the CRC32 (i.e. crc32 ^ 0xffffffff); so unless the Linux code is broken (and the spec needs to be corrected, since that error would go back many years) using the zlib code one would have to look for 0xffffffff == UINT32_MAX instead of 0. -hpa
2019 Jun 08
2
Kernel Image CRC checking
...t seems that zlib's CRC32 returns the binary inverse of the CRC32 (i.e. >> crc32 ^ 0xffffffff); so unless the Linux code is broken (and the spec needs to >> be corrected, since that error would go back many years) using the zlib code >> one would have to look for 0xffffffff == UINT32_MAX instead of 0. >> > > Just double-checked: the spec is correct. So the zlib crc32() routine should > return UINT32_MAX == ~(uint32_t)0 == (uint32_t)-1 for a correctly loaded kernel. > And just to double check: gzip -9 bzImage gzip -l -v bzImage.gz method crc date time c...
2012 Aug 31
2
[PATCH V2] libxl/xl: implement support for guest iooprt and irq permissions
...exit(1); + } + ul = strtoul(buf, &ep, 16); + if (ep == buf) { + fprintf(stderr, "xl: Invalid argument parsing ioport: %s\n", + buf); + exit(1); + } + if (ul > UINT32_MAX) { + fprintf(stderr, "xl: ioport %lx too big\n", ul); + exit(1); + } + s = e = ul; + + if (*ep == ''-'') { + buf2 = ep + 1; + ul = strtoul(buf2, &ep, 16); + if (...
2013 May 30
1
[Bug 825] New: broken led-delay parameter in the LED extension
...hat whatever parameter of led-delay you are using (other than inf) ends up with a rule at 0 ms. This is due to the checked value never assigned to the structure in https://git.netfilter.org/iptables/tree/extensions/libxt_LED.c#n63 else if (!xtables_strtoui(cb->arg, NULL, &delay, 0, UINT32_MAX)) xtables_error(PARAMETER_PROBLEM, "Delay value must be within range 0..%u", UINT32_MAX); led->delay is never assigned with the value given by the user I changed it to else if (!xtables_strtoui(cb->arg, NULL, &led->delay,...
2019 Feb 20
2
proposal for optimization method
...state+=x<<ctz; state&=mask; } return result; } now consider the following steps: from the 2 constants (d and r) we create 3 constants (with the same bit length): constants uint32 s,u,mmi; mmi = find_mod_mul_inverse(d,32); s = (r*mmi); u = (UINT32_MAX-r)/d; // UINT32_MAX corresponds to pow(2,32)-1. the idea behind these constants is the following formula: mmi_of(d)*x=x/d+(x%d)*mmi_of(d) now after we generated the constants, we will just emit the following code instead of the former: bool check_remainder(uint32 x) { return ((x*mmi)-s)<=u; }...
2019 May 21
1
[PATCH nbdkit] protocol: Fix base:allocation replies when req_one is not set.
I pushed this one already. It should go into the stable-1.12 branch too. Rich.
2015 Jan 09
3
[RESEND/PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...i->setSrc(0, bld.mkImm(res.data.u16)); + break; + case TYPE_U32: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) + res.data.u32 = util_iround(CLAMP(imm0.reg.data.f32, 0, + UINT32_MAX)); + else + res.data.u32 = util_iround(imm0.reg.data.f32); + break; + case TYPE_F64: + if (i->saturate) + res.data.u32 = util_iround(CLAMP(imm0.reg.data.f64, 0, + UINT32_MAX)); +...
2014 Jul 05
1
[PATCH v4] nv50/ir: Handle OP_CVT when folding constant expressions
...ase TYPE_U32: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) { + int32_t conv = util_iround(imm0.reg.data.f32); + res.data.u32 = (conv < 0) ? 0 : CLAMP((uint32_t)conv, 0, + UINT32_MAX); + } + else res.data.u32 = util_iround(imm0.reg.data.f32); + break; + case TYPE_F64: + if (i->saturate) { + int32_t conv = util_iround(imm0.reg.data.f64); + res.data.u32 = (conv < 0) ? 0 : CLAMP((uint32_t)conv, 0...
2015 Mar 27
9
[LLVMdev] fix for loop scale limiting in BFI
...his was causing me grief in the double nested loop case because the inner loop had a freq of about 6e20 while the outer blocks had a frequency of 2e19. With a scaling factor of 1, we were saturating everything to UINT64_MAX. I changed it so it uses a scaling factor that puts the frequencies in [1, UINT32_MAX], but only if the Max frequency is outside that range. This is causing two failures in the testsuite, which seem to be caused by RA spilling differently. I believe that in CodeGen/X86/lsr-i386.ll we are hoisting into the wrong loop now, but I'm not sure. The other failure is in CodeGen/Thumb2/...
2019 Jun 08
0
Kernel Image CRC checking
...> Ah, it seems that zlib's CRC32 returns the binary inverse of the CRC32 (i.e. > crc32 ^ 0xffffffff); so unless the Linux code is broken (and the spec needs to > be corrected, since that error would go back many years) using the zlib code > one would have to look for 0xffffffff == UINT32_MAX instead of 0. > Just double-checked: the spec is correct. So the zlib crc32() routine should return UINT32_MAX == ~(uint32_t)0 == (uint32_t)-1 for a correctly loaded kernel. In case someone is morbidly curious, if Linux had used an inverted CRC, then the final CRC of the kernel image would st...
2019 Jun 09
0
Kernel Image CRC checking
...returns the binary inverse of the > >> CRC32 (i.e. crc32 ^ 0xffffffff); so unless the Linux code is > >> broken (and the spec needs to be corrected, since that error would > >> go back many years) using the zlib code one would have to look for > >> 0xffffffff == UINT32_MAX instead of 0. > > > > Just double-checked: the spec is correct. So the zlib crc32() > > routine should return UINT32_MAX == ~(uint32_t)0 == (uint32_t)-1 > > for a correctly loaded kernel. > > And just to double check: > > > gzip -9 bzImage > gzip -l -v bzIm...
2015 Jan 19
1
[PATCH] gobject: fix printf conversion specifier
...81,7 @@ guestfs_session_event_from_guestfs_event (uint64_t event) pr " } - g_warning (\"guestfs_session_event_from_guestfs_event: invalid event %%lu\", + g_warning (\"guestfs_session_event_from_guestfs_event: invalid event %%\" PRIu64, event); return UINT32_MAX; } -- 1.9.3
2004 Jul 26
3
Maximum and minimum OCFS2 volume sizes?
Just a quick question. What is the maximum and minimum volume sizes that OCFS2 supports? I'm working on doing a plugin for EVMS to support OCFS2. One of the functions needs that info. Thanks, John
2020 Oct 17
1
[libnbd PATCH] info: Keep request within 4G bound
...ign, max_len; /* Did we get the requested map? */ if (!nbd_can_meta_context (nbd, map)) { @@ -276,6 +278,8 @@ main (int argc, char *argv[]) progname, map); exit (EXIT_FAILURE); } + align = nbd_get_block_size (nbd, LIBNBD_SIZE_MINIMUM) ?: 512; + max_len = UINT32_MAX - align + 1; size = nbd_get_size (nbd); if (size == -1) { @@ -286,7 +290,7 @@ main (int argc, char *argv[]) if (json_output) fprintf (fp, "[\n"); for (offset = 0; offset < size;) { prev_offset = offset; - if (nbd_block_status (nbd, size - offset, offset...
2019 Apr 24
0
[nbdkit PATCH 4/4] filters: Check for mutex failures
....c @@ -283,9 +283,10 @@ random_error (const struct error_settings *error_settings, * representable in a 64 bit integer, and because we don't need all * this precision anyway, let's work in 32 bits. */ - pthread_mutex_lock (&lock); - rand = xrandom (&random_state) & UINT32_MAX; - pthread_mutex_unlock (&lock); + { + ACQUIRE_LOCK_FOR_CURRENT_SCOPE (&lock); + rand = xrandom (&random_state) & UINT32_MAX; + } if (rand >= error_settings->rate * UINT32_MAX) return false; diff --git a/filters/log/log.c b/filters/log/log.c index 63afcf3..76...
2007 Aug 30
0
[ufs-discuss] statvfs change
...1" is, hmm, >to say it politically correct, "difficult to meet with a filesystem that >does compress/tail-compact". The point I was complaining about with "X free - not X+1" was that the suggested changes cap the values returned in f_files, f_ffree, and f_favail at UINT32_MAX. If a 32-bit statvfs() returns UINT32_MAX for any of these values when a simultaneous 64-bit statvfs() or a statvfs64() would set one or more of those values to a larger value (I don''t care if it is +1, *2, or *1000), I think we have a problem. >The "X not X-1" is, on the ot...
2015 Jan 10
0
[RESEND/PATCH] nv50/ir: Handle OP_CVT when folding constant expressions
...es.data.u16)); > + break; > + case TYPE_U32: > + switch (i->sType) { > + case TYPE_F32: > + if (i->saturate) > + res.data.u32 = util_iround(CLAMP(imm0.reg.data.f32, 0, > + UINT32_MAX)); > + else > + res.data.u32 = util_iround(imm0.reg.data.f32); > + break; > + case TYPE_F64: > + if (i->saturate) > + res.data.u32 = util_iround(CLAMP(imm0.reg.data.f64, 0, > +...
2004 Jul 14
1
[LLVMdev] Constants.cpp:368: error: `INT8_MAX' undeclared (first use this function)
...ction `static bool llvm::ConstantUInt::isValueValidForType(const llvm::Type*, long long unsigned int)': Constants.cpp:387: error: `UINT8_MAX' undeclared (first use this function) Constants.cpp:389: error: `UINT16_MAX' undeclared (first use this function) Constants.cpp:391: error: `UINT32_MAX' undeclared (first use this function) gmake[2]: *** [/usr/local/src/llvm/lib/VMCore/Debug/Constants.lo] Error 1 ----------------------------------- Does anyone have an idea where to #include or #define these constants? Kind regards Henrik ____________________________________________________...
2014 Jul 06
0
[PATCH v5] nv50/ir: Handle OP_CVT when folding constant expressions
...i->setSrc(0, bld.mkImm(res.data.u16)); + break; + case TYPE_U32: + switch (i->sType) { + case TYPE_F32: + if (i->saturate) + res.data.u32 = util_iround(CLAMP(imm0.reg.data.f32, 0, + UINT32_MAX)); + else + res.data.u32 = util_iround(imm0.reg.data.f32); + break; + case TYPE_F64: + if (i->saturate) + res.data.u32 = util_iround(CLAMP(imm0.reg.data.f64, 0, + UINT32_MAX)); +...