search for: file_status

Displaying 8 results from an estimated 8 matches for "file_status".

2012 Jun 19
0
[LLVMdev] llvm/include/Support/FileSystem.h
This is a proposed patch to enhance FileSystem.h to add functionality (getting and setting permission bits and mapping an unmapping files). This implementation follows the N3365 proposal regarding permission bits. This functionality is needed for my next patch which will implement llvm/include/Support/FileOutputBuffer.h which is needed by lld. -------------- next part -------------- A
2012 May 18
2
[LLVMdev] [RFC] llvm/include/Support/FileOutputBuffer.h
On Fri, May 18, 2012 at 3:07 PM, Michael Spencer <bigcheesegs at gmail.com> wrote: > >> +  error_code ec = sys::fs::status(filePathTwine, stat); > > stat is undefined if ec isn't success. ec will be success even in the case of > file_not_found. Actually I was wrong. The Windows and UNIX implementation disagree on this point. I'm going to change it to match
2011 Sep 20
0
[LLVMdev] [cfe-dev] Unicode path handling on Windows
I spent some more time on this. My idea was to use functionality from llvm::sys::fs like file_status instead of stat struct, but as it turns out this is not really possible. file_status structure is not a replacement for stat, nor are there functions inside llvm::sys::fs that can replace calls to ::stat and ::open. The only solution I can see is to create wrappers around ::stat, ::open, etc. and...
2011 Sep 07
2
[LLVMdev] [cfe-dev] Unicode path handling on Windows
On Wed, Sep 7, 2011 at 12:20 AM, Nikola Smiljanic <popizdeh at gmail.com> wrote: > So what are you exactly saying? Somebody proposed using GetCommandLine > instead of using argv directly. And what about my other points about ::open > and ::stat? Because of the way Windows works, the only fully correct solution is to never touch the native charset, and keep everything in UTF-8/16
2011 Sep 20
2
[LLVMdev] [cfe-dev] Unicode path handling on Windows
On Tue, Sep 20, 2011 at 11:52 AM, Nikola Smiljanic <popizdeh at gmail.com> wrote: > I spent some more time on this. My idea was to use functionality from > llvm::sys::fs like file_status instead of stat struct, but as it turns out > this is not really possible. file_status structure is not a replacement for > stat, nor are there functions inside llvm::sys::fs that can replace calls to > ::stat and ::open. > The only solution I can see is to create wrappers around ::stat...
2012 May 18
0
[LLVMdev] [RFC] llvm/include/Support/FileOutputBuffer.h
...ble). > + Twine filePathTwine(filePath); Twine should not be used like this. It stores references to temporaries. It will work in this case because filePath is not a temporary and you haven't invoked any operators. It's also uneeded. StringRef is convertable to Twine. > + sys::fs::file_status stat; > + bool writable; This is only used in the case below, so it should be folded in there. > + error_code ec = sys::fs::status(filePathTwine, stat); stat is undefined if ec isn't success. ec will be success even in the case of file_not_found. > + switch ( stat.type() ) { No...
2012 May 17
3
[LLVMdev] [RFC] llvm/include/Support/FileOutputBuffer.h
I now have an implementation of FileOutputBuffer (OutputBuffer was already taken). The patch supports the functionality listed below and I've tested that it works for lld. -------------- next part -------------- A non-text attachment was scrubbed... Name: FileOutputBuffer.patch Type: application/octet-stream Size: 25308 bytes Desc: not available URL:
2012 Sep 17
9
[PATCH] Upgrade vtpmd to berlios version 0.7.4
...{ - int res; -- struct file *fp; -- mm_segment_t old_fs = get_fs(); -- fp = filp_open(TPM_STORAGE_FILE, O_RDONLY, 0); -- if (IS_ERR(fp)) return -1; -- *data_length = (size_t)fp->f_dentry->d_inode->i_size; -- /* *data_length = i_size_read(fp->f_dentry->d_inode); */ -+ int fp, file_status; -+ struct stat file_info; -+ fp = open(TPM_STORAGE_FILE, O_RDONLY, 0); -+ file_status = fstat(fp, &file_info); -+ if (file_status < 0) { -+ close(fp); -+ return -1; -+ } -+ -+ *data_length = file_info.st_size; - *data = tpm_malloc(*data_length); - if (*data == NULL) { --...