search for: readbytes

Displaying 20 results from an estimated 20 matches for "readbytes".

Did you mean: read_bytes
2007 Jul 24
1
Custom kinit to find device by "label"
...nd using C. This is where I need help. Here is the main function that needs to be translated into C: function FindRootDeviceByLabel(const RootFSLabel: string): boolean; const DEV_MAJOR: dev_t = 8; DEV_MODE: mode_t = S_IFBLK or &0660; var ActualFSLabel: string; FileDescriptor: cint; ReadBytes: TsSize; DeviceFound: boolean; dev_minor: dev_t; begin Result := False; SetLength(ActualFSLabel, Length(RootFSLabel)); //loop through all devices that might have our root filesystem sda2 to sdp2 dev_minor := 2; while dev_minor < 243 do begin // last one is 242 if mknod(DEVICEN...
2003 Jun 13
2
Trouble decoding number of codebooks
...ry and read in the number of codebook entries, I get a number larger than the number of bytes in the file, which I have to assume is wrong :) Anyway this is how I read in the numbers : void readCodeBooks(ifstream *file, int codebookCount) { //read in the 24 bit sync pattern unsigned char *c = readBytes(file, 3); //read the codebook dimensions unsigned char *dimensions = readBytes(file,2); int codebookDimensions = (int)convertArray2(dimensions, 2); //read codebook entries unsigned char *entries = readBytes(file,3); long codebookEntries = convertArray2(entries,3); } long convertArray...
2009 May 13
2
Speex seek with high precision
...ek to position 0 I get the desired result. I've also used ogg_page_granulepos for seeking but it seems more difficult to use. I use something like this: do { while (ogg_sync_pageout(&oy, &og) != 1) { data = ogg_sync_buffer(&oy, 512); readbytes = fread(data, 1, 512, spxfile); ogg_sync_wrote(&oy, readbytes); } //printf("ogg_page_granulepos: %lld\n", ogg_page_granulepos(&og)); } while (ogg_page_granulepos(&og) < time * freq); // time in seconds, freq: 16000 But this way I can'...
2017 Jul 07
2
Swallowing of input in FileCheck
...rerun the failing command manually without piping into FileCheck. Initially I’ve assumed that this is done due to stream processing, but looking at FileCheck source code I can see that it actually gets the entire input into RAM anyway: ``` do { Buffer.reserve(Buffer.size() + ChunkSize); ReadBytes = read(FD, Buffer.end(), ChunkSize); if (ReadBytes == -1) { if (errno == EINTR) continue; return std::error_code(errno, std::generic_category()); } Buffer.set_size(Buffer.size() + ReadBytes); } while (ReadBytes != 0); ``` Thus, I propose modifying FileCheck default behavi...
2007 Dec 07
0
Errno::ECONNRESET (Connection reset by peer):
...#39;Application Error (Rails)'' Any suggestions? production.log as follows: Processing Base#index (for xxx.xxx.xxx.xxx at 2007-12-07 13:39:03) [GET] Session ID: 4bfd0284bd7672b57e65bdb21637adb5 Parameters: {} Errno::ECONNRESET (Connection reset by peer): /usr/local/lib/ruby/1.8/readbytes.rb:16:in `read'' /usr/local/lib/ruby/1.8/readbytes.rb:16:in `readbytes'' /usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/message.rb:32:in `read'' /usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:92:in `query...
2017 Feb 19
5
RFC: Adding llvm::ThinStream
...ils of the block structure. None of LLVM's existing abstractions provided convenient mechanisms for writing this kind of data. So I came up with the following set of abstractions: *ThinStream* - An abstract base class that provides read-only access to data. The interface is: virtual Error readBytes(uint32_t Offset, uint32_t Size, ArrayRef<uint8_t> &Buffer) const = 0; virtual Error readLongestContiguousChunk(uint32_t Offset, ArrayRef<uint8_t> &Buffer) const = 0; virtual uint32_t getLength() const = 0; An important distinction between `ThinStream` and existing stream im...
2009 May 13
0
Speex seek with high precision
...> I've also used ogg_page_granulepos for seeking but it seems more difficult > to use. I use something like this: > > ??? do > ??? { > ??? ??? while (ogg_sync_pageout(&oy, &og) != 1) > ??? ??? { > ??? ??? ??? data = ogg_sync_buffer(&oy, 512); > ??? ??? ??? readbytes = fread(data, 1, 512, spxfile); > ??? ??? ??? ogg_sync_wrote(&oy, readbytes); > ??? ??? } > ??? ??? //printf("ogg_page_granulepos: %lld\n", ogg_page_granulepos(&og)); > ??? } > ??? while (ogg_page_granulepos(&og) < time * freq); // time in seconds, > freq:...
2013 Nov 26
0
[LLVMdev] MCJIT RemoteMemoryManager Failures on ARM
Looking at the code, one obvious source of intermittent failure is that the Linux implementations of ReadBytes and WriteBytes don't check for EINTR. I doubt that's the failure you're seeing because it would be more randomly distributed but it's something that should be fixed. More likely as the cause of failure in your case is that read is returning less than the number of bytes requested....
2009 Aug 19
3
[LLVMdev] X86 Disassembler
...LITY_HIDDEN StringMemoryObject : public MemoryObject { > ... I used VISIBILITY_HIDDEN for both StringMemoryObject and X86DisassemblerEmitter::X86DEBackend. I wrapped StringMemoryObject in an anonymous namespace. I didn't wrap X86DEBackend because it's already nested. > 5. In "readBytes" in StringMemoryObject, you're returning a "-1", > but the method's return type is "uint64_t". Do you *really* want to > return 0xfffffffffffU, or is "-1" a sentinel value of some sort? If > the latter, perhaps changing the return type to &q...
2006 May 21
8
Rails and Postgres
Hi, I''m new to Ruby on Rails and am having a little difficulty working through the ''Rolling with Ruby on Rails'' tutorial. Can anyone help? I''m trying to get the cookbook application to work via a Postgresql db. But get the following error when trying to access http://127.0.0.1:3000/recipe/new Errno::EINVAL in RecipeController#new Invalid argument
2009 Aug 18
0
[LLVMdev] X86 Disassembler
...change them back. 4. If you have a class that's completely contained within a .cpp file, go ahead and define it in an anonymous namespace and mark it "VISIBILITY_HIDDEN". Like this: namespace { class VISIBILITY_HIDDEN StringMemoryObject : public MemoryObject { ... 5. In "readBytes" in StringMemoryObject, you're returning a "-1", but the method's return type is "uint64_t". Do you *really* want to return 0xfffffffffffU, or is "-1" a sentinel value of some sort? If the latter, perhaps changing the return type to "int64_t&quo...
2013 Nov 26
2
[LLVMdev] MCJIT RemoteMemoryManager Failures on ARM
On 26 November 2013 19:05, Kaylor, Andrew <andrew.kaylor at intel.com> wrote: > I would also note that the failure isn’t actually in anything > MCJIT-specific. Aside from the fact that it seems to be clang-specific, > the code that is failing is specific to the lli remote implementation. > It’s not clear to me why it would fail under aggressive optimization with > clang,
2009 Aug 18
2
[LLVMdev] X86 Disassembler
Dear mailing list: the attached diff implements a table-driven disassembler for the X86 architecture (16-, 32-, and 64-bit incarnations), integrated into the MC framework. The disassembler is table-driven, using a custom TableGen backend to generate hierarchical tables optimized for fast decode. The disassembler consumes MemoryObjects and produces arrays of MCInsts, adhering to the
2007 Dec 05
4
Java parser for R data file?
Hi everyone, Has anyone written a parser in Java for either the ASCII or binary format produced by save()? I need to parse a single large 2D array that is structured like this: list( "32609_1" = c(-9549.39231289146, -9574.07159324482, ... ), "32610_2" = c(-6369.12526971635, -6403.99620977124, ... ), "32618_2" = c(-2138.29095689061, -2057.9229403233, ... ),
2013 Feb 07
0
Help R.matlab
Dear useRs, This post relates to a similar problem ( https://stat.ethz.ch/pipermail/r-help/2010-August/250719.html) I am using R.matlab (R.matlab v1.6.3 (2013-01-17) to iterate matrix multiplication in matlab 2012Rb. Everything works fine except for some random iteration of my model the command getVariable would fail to bring matlab objects back to R. Could someone help me understand what's
2017 Feb 22
2
RFC: Adding llvm::ThinStream
...of LLVM's existing > abstractions provided convenient mechanisms for writing this kind of data. > > So I came up with the following set of abstractions: > > *ThinStream* - An abstract base class that provides read-only access to > data. The interface is: > virtual Error readBytes(uint32_t Offset, uint32_t Size, > ArrayRef<uint8_t> &Buffer) const = 0; > virtual Error readLongestContiguousChunk(uint32_t Offset, > ArrayRef<uint8_t> &Buffer) const = 0; > virtual uint32_t getLength() const = 0; > > An important distinction between `ThinS...
2010 Aug 19
1
2.0 migration weirdnesses: logs and hang
...db { args = uid=64020 gid=64020 home=/var/lib/vpopmail/domains/%Ld/%Ln allow_all_users=yes driver = static } valid_chroot_dirs = /var/lib/vpopmail/domains verbose_proctitle = yes protocol imap { imap_client_workarounds = tb-extra-mailbox-sep delay-newmail imap_logout_format = writebytes=%o, readbytes=%i mail_plugins = fts fts_squat zlib } protocol lda { auth_socket_path = /var/run/dovecot/memoryhole2/auth-master hostname = memoryhole.net mail_plugins = fts fts_squat postmaster_address = postmaster at memoryhole.net } -------------- next part -------------- A non-text attachment was sc...
2009 Jul 21
1
zpool import is trying to tell me something...
...0 ONLINE c3t10d0s0 ONLINE c3t8d0s0 ONLINE c3t9d0s0 ONLINE hydra# /usr/lib/zfs/availdevs -p ... pool name="tank" id="12156936533394213216" poolversion="14" used="0" size="0" replacementsize="0" readbytes="0" writebytes="0" readoperations="0" writeoperations="0" readerrors="0" writeerrors="0" checksumerrors="0" devicestate="VDEV_STATE_CANT_OPEN" devicestatus="VDEV_AUX_NO_REPLICAS" poolstate="POOL_STATE_ACT...
2014 Mar 07
2
[LLVMdev] [RFC] C++11: 'virtual' and 'override'
On Thu, Mar 6, 2014 at 3:47 PM, Craig Topper <craig.topper at gmail.com> wrote: > virtual bar *foo() = 0; > > where foo() also exists as pure in the base class. Clang-modernize has a > FIXME that says it can't find the "=0" to do the insert of override. > Does that mean we have a pure virtual function with implementation in Clang/LLVM? If so, I feel it's a
2009 Aug 22
0
[LLVMdev] X86 Disassembler
On Aug 19, 2009, at 4:39 PM, Sean Callanan wrote: > thanks for your comments. I'll respond to them individually. I've > attached a new revision of the patch that addresses them. Patch > built and tested against SVN 79487, with the additional attached fix > that fixes an Intel table bug. Thanks Sean, comments below. Are you sure you attached the updated patch? I