Merge lp:~csurbhi/ubuntu/natty/mountall/mountall-error.fix into lp:ubuntu/natty/mountall

Proposed by Surbhi Palande
Status: Merged
Merge reported by: Marc Deslauriers
Merged at revision: not available
Proposed branch: lp:~csurbhi/ubuntu/natty/mountall/mountall-error.fix
Merge into: lp:ubuntu/natty/mountall
Diff against target: 40 lines (+11/-2)
2 files modified
debian/changelog (+9/-0)
src/mountall.c (+2/-2)
To merge this branch: bzr merge lp:~csurbhi/ubuntu/natty/mountall/mountall-error.fix
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+57457@code.launchpad.net

Description of the change

This change fixes two errors that I encountered while code browsing/testing.
1) find_mount("/") returns NULL when / is not found, so cannot access root->mounted (as root is NULL in this case)
2) In activate_timer(): the information message about the dev_wait_timeout should be printed after
    dev_wait_timeout is initialized properly.

Please consider merging this for natty.

To post a comment you must log in.
359. By Surbhi Palande

Fixed two errors found while browsing the code: 1) find_mount("/") returns
NULL when / is not found, so cannot access root->mounted. 2) the
information message about the dev_wait_timeout should be printed after
dev_wait_timeout is initialized properly.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Looks like this already got merged, so setting status to "merged".

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-03-19 16:46:02 +0000
3+++ debian/changelog 2011-04-13 11:41:28 +0000
4@@ -1,3 +1,12 @@
5+mountall (2.25ubuntu1) natty; urgency=low
6+
7+ * Fixed two errors found while browsing the code: 1) find_mount("/") returns
8+ NULL when / is not found, so cannot access root->mounted. 2) the
9+ information message about the dev_wait_timeout should be printed after
10+ dev_wait_timeout is initialized properly.
11+
12+ -- Surbhi Palande <surbhi.palande@canonical.com> Wed, 13 Apr 2011 12:59:22 +0300
13+
14 mountall (2.25) natty; urgency=low
15
16 * src/mountall.c: ignore ureadahead's potential mount of
17
18=== modified file 'src/mountall.c'
19--- src/mountall.c 2011-03-19 16:46:02 +0000
20+++ src/mountall.c 2011-04-13 11:41:28 +0000
21@@ -1647,9 +1647,9 @@
22 || (! strncmp (mnt->device, "UUID=", 5))
23 || (! strncmp (mnt->device, "LABEL=", 6))))
24 {
25- nih_message(_("Shall wait for device: %s for %d seconds, starting timer"), MOUNT_NAME (mnt), dev_wait_time);
26 if(!dev_wait_time)
27 dev_wait_time = ROOTDELAY;
28+ nih_message(_("Shall wait for device: %s for %d seconds, starting timer"), MOUNT_NAME (mnt), dev_wait_time);
29 device_ready_timer = NIH_MUST (nih_timer_add_timeout (NULL,
30 dev_wait_time, is_device_ready, NULL));
31 break;
32@@ -3473,7 +3473,7 @@
33
34 /* Sanity check, the root filesystem should be already mounted */
35 root = find_mount ("/");
36- if (! root->mounted) {
37+ if (! root || ! root->mounted ) {
38 nih_fatal ("%s", _("root filesystem isn't mounted"));
39 exit (EXIT_ERROR);
40 }

Subscribers

People subscribed via source and target branches