Closed
Bug 1300912
Opened 9 years ago
Closed 4 years ago
Requesting st_ino offset - OSFILE_OFFSETOF_STAT_ST_INO
Categories
(Toolkit Graveyard :: OS.File, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: noitidart, Assigned: noitidart)
Details
Attachments
(1 file, 1 obsolete file)
|
1.25 KB,
patch
|
Yoric
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:49.0) Gecko/20100101 Firefox/49.0
Build ID: 20160902105049
Steps to reproduce:
For Gio file watcher to detect rename we need to get the inode to detect if it was a rename.
We can use g_file_query_info with G_FILE_ATTRIBUTE_UNIX_INODE and then g_file_info_get_attribute_uint64 - however it might be quicker to do the stat, not sure.
We already have offsets in OS.Constants.libc for st_mode, st_uid, st_size, st_mtime, st_ctime, st_gid, st_atime. It might be nice to have st_ino.
I think the stat struct is aligned by 8bytes so I think st_ino is 12, but I'm not sure if its like this everywhere.
If adding this to the constants is acceptable I prepared a patch.
Hey @yoric because you reviewed this one - https://bugzilla.mozilla.org/show_bug.cgi?id=1072922 - I marked your name for review here too I hope it's ok. :)
Flags: needinfo?(dteller)
Attachment #8788702 -
Flags: review?(dteller)
whoops i think i needed r=Yoric in Subject line, so i added that
Attachment #8788702 -
Attachment is obsolete: true
Attachment #8788702 -
Flags: review?(dteller)
Attachment #8788703 -
Flags: review?(dteller)
Comment on attachment 8788703 [details] [diff] [review]
0001-patch-for-1300912.patch - added r=Yoric
Review of attachment 8788703 [details] [diff] [review]:
-----------------------------------------------------------------
r=me assuming it builds on all platforms
Attachment #8788703 -
Flags: review?(dteller) → review+
Assignee: nobody → noitidart
Oh shoot I didn't include a OSFILE_SIZEOF_ST_INO should I add this in?
Well, if you need it, please do :)
(sorry for the slow answer, too much multitasking)
Flags: needinfo?(dteller)
No problem I totally understand. I'm slow too. I'm learning the next steps for this thing. I'll do some research. I think ino_t is only possible to be a uint32_t on old macs. Everywhere else it is uint64_t.
I'll get back on the size. I'm also learning the steps to take after receiving r+ on a patch
Updated•7 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment 7•4 years ago
|
||
Mass closure: OSFIle is being replaced with IOUtils and PathUtils. If you think this bug was closed in error, please re-open.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
Updated•2 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•