Ubuntu

Merge lp:~fehwalker/ubuntu/raring/ureadahead/fix-969926 into lp:ubuntu/raring/ureadahead

Proposed by Bryan Fullerton on 2013-03-14
Status: Merged
Merged at revision: 31
Proposed branch: lp:~fehwalker/ubuntu/raring/ureadahead/fix-969926
Merge into: lp:ubuntu/raring/ureadahead
Diff against target: 43 lines (+13/-4) 2 files modified (has conflicts)
Text conflict in debian/changelog
To merge this branch: bzr merge lp:~fehwalker/ubuntu/raring/ureadahead/fix-969926
Reviewer Review Type Date Requested Status
Martin Pitt 2013-03-14 Approve on 2013-03-25
Serge Hallyn 2013-03-14 Approve on 2013-03-14
Review via email: mp+153429@code.launchpad.net

This proposal supersedes a proposal from 2013-03-04.

Description of the Change

Updated to remove extraneous stat() call as requested, tested working as expected on raring.

To post a comment you must log in.
Serge Hallyn (serge-hallyn) wrote : Posted in a previous version of this proposal

Thanks for submitting this patch. I did have one question. Is there any value to keeping the third check, the stat() call? If stat were going to fail, then lstat would also fail, so I think the check can simply become

if ((lstat (pathname, &statbuf) < 0)
     || S_ISLNK (statbuf.st_mode)
     || (! S_ISREG(statbuf.st_mode)))
 return 0;

I certainly could be wrong :) if so please let me know.

review: Needs Fixing
Bryan Fullerton (fehwalker) wrote : Posted in a previous version of this proposal

I think you might be right. I was attempting to not change the logic too much from the original, but probably it is redundant.

I won't be in a position to rebuild and test locally until tomorrow, will update either way then.

Thanks for the review!

Serge Hallyn (serge-hallyn) wrote :

Thanks, this looks good to me. Note lp reports a conflict, but that is only with changelog so shouldn't slow anyone down.

I unfortunately don't have upload rights, so all I can do it mark that I have reviewed and Approve.

Thanks Bryan!

review: Approve
Martin Pitt (pitti) wrote :

Looks good, thanks! Merging/uploading.

review: Approve

Preview Diff

1=== modified file 'debian/changelog'
2--- debian/changelog 2013-03-12 15:35:42 +0000
3+++ debian/changelog 2013-03-14 18:06:20 +0000
4@@ -1,3 +1,4 @@
5+<<<<<<< TREE
6 ureadahead (0.100.0-15) raring; urgency=low
7
8 * src/ureadahead.c: correct help text for --sort command line argument
9@@ -7,6 +8,15 @@
10
11 -- Bryan Fullerton <fehwalker@gmail.com> Tue, 12 Mar 2013 15:06:41 +0000
12
13+=======
14+ureadahead (0.100.0-14ubuntu2) UNRELEASED; urgency=low
15+
16+ * src/trace.c: update to ignore symlinks when tracing + cleanup extra stat()
17+ (LP: #969926)
18+
19+ -- Bryan Fullerton <fehwalker@gmail.com> Thu, 14 Mar 2013 14:01:56 -0400
20+
21+>>>>>>> MERGE-SOURCE
22 ureadahead (0.100.0-14) raring; urgency=low
23
24 * Use dh-autoreconf to ensure (among other things) that config.guess and
25
26=== modified file 'src/trace.c'
27--- src/trace.c 2013-03-02 07:47:41 +0000
28+++ src/trace.c 2013-03-14 18:06:20 +0000
29@@ -490,12 +490,11 @@
30 nih_hash_add (path_hash, &entry->entry);
31 }
32
33- /* Make sure that we have an ordinary file, or a symlink to an
34- * ordinary file. This avoids us opening a fifo or socket.
35+ /* Make sure that we have an ordinary file
36+ * This avoids us opening a fifo or socket or symlink.
37 */
38 if ((lstat (pathname, &statbuf) < 0)
39- || (S_ISLNK (statbuf.st_mode)
40- && (stat (pathname, &statbuf) < 0))
41+ || (S_ISLNK (statbuf.st_mode))
42 || (! S_ISREG (statbuf.st_mode)))
43 return 0;
44

Subscribers

People subscribed via source and target branches